yang_shj
9 months ago
12 changed files with 229 additions and 78 deletions
@ -0,0 +1,17 @@
|
||||
package com.hnac.hzims.operational.config.vo; |
||||
|
||||
import com.hnac.hzims.operational.config.entity.AreaMapEntity; |
||||
import io.swagger.annotations.ApiModelProperty; |
||||
import lombok.Data; |
||||
import lombok.EqualsAndHashCode; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
@EqualsAndHashCode(callSuper = true) |
||||
@Data |
||||
public class AreaMapVo extends AreaMapEntity { |
||||
|
||||
@ApiModelProperty("用户名称") |
||||
private String userName; |
||||
} |
@ -1,12 +1,22 @@
|
||||
package com.hnac.hzims.operational.config.service; |
||||
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
import com.hnac.hzims.operational.config.entity.AreaMapEntity; |
||||
import com.hnac.hzims.operational.config.vo.AreaMapVo; |
||||
import com.hnac.hzims.operational.main.vo.MapMarkerVo; |
||||
import org.springblade.core.mp.base.BaseService; |
||||
import org.springblade.core.mp.support.Query; |
||||
import org.springblade.core.tool.api.R; |
||||
|
||||
import java.util.List; |
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public interface AreaMapService extends BaseService<AreaMapEntity> { |
||||
|
||||
IPage<AreaMapVo> pageCondition(AreaMapVo vo, Query query); |
||||
|
||||
List<MapMarkerVo> map(Long deptId, List<Integer> types, boolean make); |
||||
} |
@ -0,0 +1,32 @@
|
||||
package com.hnac.hzims.operational.config.wrapper; |
||||
|
||||
import com.hnac.hzims.operational.config.entity.AreaMapEntity; |
||||
import com.hnac.hzims.operational.config.vo.AreaMapVo; |
||||
import org.springblade.core.mp.support.BaseEntityWrapper; |
||||
import org.springblade.core.tool.utils.BeanUtil; |
||||
import org.springblade.core.tool.utils.ObjectUtil; |
||||
import org.springblade.system.user.cache.UserCache; |
||||
import org.springblade.system.user.entity.User; |
||||
|
||||
|
||||
/** |
||||
* @author ysj |
||||
*/ |
||||
public class AreaMapWrapper extends BaseEntityWrapper<AreaMapEntity, AreaMapVo> { |
||||
|
||||
public static AreaMapWrapper build() { |
||||
return new AreaMapWrapper(); |
||||
} |
||||
|
||||
@Override |
||||
public AreaMapVo entityVO(AreaMapEntity entity) { |
||||
AreaMapVo vo = BeanUtil.copy(entity, AreaMapVo.class); |
||||
User createUser = UserCache.getUser(entity.getCreateUser()); |
||||
if(ObjectUtil.isEmpty(createUser)){ |
||||
return vo; |
||||
} |
||||
assert vo != null; |
||||
vo.setUserName(createUser.getName()); |
||||
return vo; |
||||
} |
||||
} |
Loading…
Reference in new issue