Browse Source

Merge remote-tracking branch 'origin/dev_temp' into dev_temp

master
yinzuomei 5 years ago
parent
commit
9d2fdf2f54
  1. 1
      epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java
  2. 2
      epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AccessConfigOpesFormDTO.java
  3. 3
      epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AccessConfigSaveConfigDTO.java
  4. 5
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/AccessConfigController.java
  5. 4
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/AccessConfigService.java
  6. 6
      epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessConfigServiceImpl.java
  7. 10
      epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/UpdateCustomerFunctionFormDTO.java
  8. 1
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java
  9. 1
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java
  10. 1
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionDetailService.java
  11. 5
      epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java
  12. 7
      epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml
  13. 3
      epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java
  14. 5
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserInfoFormDTO.java
  15. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserEntity.java
  16. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java
  17. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java
  18. 3
      epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml

1
epmet-auth/src/main/java/com/epmet/service/impl/SsoServiceImpl.java

@ -116,6 +116,7 @@ public class SsoServiceImpl implements SsoService {
userInfoFormDTO.setUid(userInfo.getOpenId()); userInfoFormDTO.setUid(userInfo.getOpenId());
userInfoFormDTO.setName(userInfo.getName()); userInfoFormDTO.setName(userInfo.getName());
userInfoFormDTO.setMobile(userInfo.getMobile()); userInfoFormDTO.setMobile(userInfo.getMobile());
userInfoFormDTO.setCustomerId(customerId);
Result<UserDTO> userDTOResult = epmetUserOpenFeignClient.saveUserInfo(userInfoFormDTO); Result<UserDTO> userDTOResult = epmetUserOpenFeignClient.saveUserInfo(userInfoFormDTO);
if (!userDTOResult.success()){ if (!userDTOResult.success()){

2
epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AccessConfigOpesFormDTO.java

@ -11,6 +11,8 @@ public class AccessConfigOpesFormDTO {
@NotBlank(message = "角色ID不能为空") @NotBlank(message = "角色ID不能为空")
private String roleId; private String roleId;
@NotBlank(message = "客户ID不能为空")
private String customerId;
private List<AccessConfigOpesResultDTO> opes; private List<AccessConfigOpesResultDTO> opes;
} }

3
epmet-module/gov-access/gov-access-client/src/main/java/com/epmet/dto/form/AccessConfigSaveConfigDTO.java

@ -15,4 +15,7 @@ public class AccessConfigSaveConfigDTO {
private Set<String> scopeKeys; private Set<String> scopeKeys;
private Set<String> settingKeys; private Set<String> settingKeys;
@NotBlank(message = "客户ID不能为空")
private String customerId;
} }

5
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/controller/AccessConfigController.java

@ -51,7 +51,7 @@ public class AccessConfigController {
*/ */
@PostMapping("saveroleopes") @PostMapping("saveroleopes")
public Result saveRoleOpes(@RequestBody AccessConfigOpesFormDTO formDTO) { public Result saveRoleOpes(@RequestBody AccessConfigOpesFormDTO formDTO) {
accessConfigService.saveRoleOpes(formDTO.getRoleId(), formDTO.getOpes()); accessConfigService.saveRoleOpes(formDTO.getRoleId(), formDTO.getOpes(), formDTO.getCustomerId());
return new Result(); return new Result();
} }
@ -77,7 +77,8 @@ public class AccessConfigController {
String roleId = config.getRoleId(); String roleId = config.getRoleId();
String operationKey = config.getOperationKey(); String operationKey = config.getOperationKey();
Set<String> scopeKeys = config.getScopeKeys(); Set<String> scopeKeys = config.getScopeKeys();
accessConfigService.saveConfig(roleId, operationKey, scopeKeys); String customerId = config.getCustomerId();
accessConfigService.saveConfig(roleId, operationKey, scopeKeys, customerId);
return new Result(); return new Result();
} }

4
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/AccessConfigService.java

@ -12,11 +12,11 @@ import java.util.Set;
public interface AccessConfigService { public interface AccessConfigService {
List<AccessConfigOpesResultDTO> listOpesByRole(String roleId); List<AccessConfigOpesResultDTO> listOpesByRole(String roleId);
void saveRoleOpes(String roleId, List<AccessConfigOpesResultDTO> opes); void saveRoleOpes(String roleId, List<AccessConfigOpesResultDTO> opes, String customerId);
AccessConfigOptionsResultDTO listScopeOptionsForAccessConfig(String roleId, String operationKey); AccessConfigOptionsResultDTO listScopeOptionsForAccessConfig(String roleId, String operationKey);
void saveConfig(String roleId, String operationKey, Set<String> scopeKeys); void saveConfig(String roleId, String operationKey, Set<String> scopeKeys, String customerId);
List<RoleOperationDefaultResultDTO> listRoleDefaultOpsByRoleKey(String roleKey); List<RoleOperationDefaultResultDTO> listRoleDefaultOpsByRoleKey(String roleKey);

6
epmet-module/gov-access/gov-access-server/src/main/java/com/epmet/service/impl/AccessConfigServiceImpl.java

@ -54,7 +54,7 @@ public class AccessConfigServiceImpl implements AccessConfigService {
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public void saveRoleOpes(String roleId, List<AccessConfigOpesResultDTO> opes) { public void saveRoleOpes(String roleId, List<AccessConfigOpesResultDTO> opes, String customerId) {
List<RoleOperationResultDTO> operationsDB = roleOperationDao.listOperationsByRoleId(roleId); List<RoleOperationResultDTO> operationsDB = roleOperationDao.listOperationsByRoleId(roleId);
Set<String> opeKeysDB = operationsDB.stream().map(opeDB -> opeDB.getOperationKey()).collect(Collectors.toSet()); Set<String> opeKeysDB = operationsDB.stream().map(opeDB -> opeDB.getOperationKey()).collect(Collectors.toSet());
Set<String> opeKeysForm = opes.stream().map(opeForm -> opeForm.getOperationKey()).collect(Collectors.toSet()); Set<String> opeKeysForm = opes.stream().map(opeForm -> opeForm.getOperationKey()).collect(Collectors.toSet());
@ -80,6 +80,7 @@ public class AccessConfigServiceImpl implements AccessConfigService {
RoleOperationEntity newRoleOpe = new RoleOperationEntity(); RoleOperationEntity newRoleOpe = new RoleOperationEntity();
newRoleOpe.setRoleId(roleId); newRoleOpe.setRoleId(roleId);
newRoleOpe.setOperationKey(s); newRoleOpe.setOperationKey(s);
newRoleOpe.setCustomerId(customerId);
roleOperationDao.insert(newRoleOpe); roleOperationDao.insert(newRoleOpe);
} }
} }
@ -100,7 +101,7 @@ public class AccessConfigServiceImpl implements AccessConfigService {
@Override @Override
@Transactional @Transactional
public void saveConfig(String roleId, String operationKey, Set<String> scopeKeys) { public void saveConfig(String roleId, String operationKey, Set<String> scopeKeys, String customerId) {
List<RoleScopeEntity> scopesDB = roleScopeDao.listScopeEntities(roleId, operationKey); List<RoleScopeEntity> scopesDB = roleScopeDao.listScopeEntities(roleId, operationKey);
// 数据库中已有的scopeKey列表 // 数据库中已有的scopeKey列表
Set<String> scopeKeysDB = scopesDB.stream().map(scope -> scope.getScopeKey()).collect(Collectors.toSet()); Set<String> scopeKeysDB = scopesDB.stream().map(scope -> scope.getScopeKey()).collect(Collectors.toSet());
@ -119,6 +120,7 @@ public class AccessConfigServiceImpl implements AccessConfigService {
rs2Add.setRoleId(roleId); rs2Add.setRoleId(roleId);
rs2Add.setOperationKey(operationKey); rs2Add.setOperationKey(operationKey);
rs2Add.setScopeKey(scopeKey); rs2Add.setScopeKey(scopeKey);
rs2Add.setCustomerId(customerId);
roleScopeDao.insert(rs2Add); roleScopeDao.insert(rs2Add);
} }
}); });

10
epmet-module/oper-customize/oper-customize-client/src/main/java/com/epmet/dto/form/UpdateCustomerFunctionFormDTO.java

@ -50,4 +50,14 @@ public class UpdateCustomerFunctionFormDTO implements Serializable {
private String iconSmallImg; private String iconSmallImg;
private String userId; private String userId;
/**
* 外链地址
*/
private String targetLink;
/**
* 自定义业务域名(可设置多个 用分号分隔)
*/
private String domainName;
} }

1
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/controller/CustomerFunctionDetailController.java

@ -143,7 +143,6 @@ public class CustomerFunctionDetailController {
/** /**
* 客户定制功能修改 入参 * 客户定制功能修改 入参
* 目前允许修改功能名称大小图标
* *
* @param tokenDto * @param tokenDto
* @param formDTO * @param formDTO

1
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/dao/CustomerFunctionDetailDao.java

@ -73,6 +73,7 @@ public interface CustomerFunctionDetailDao extends BaseDao<CustomerFunctionDetai
/** /**
* 客户定制功能修改 入参 * 客户定制功能修改 入参
* 目前允许修改功能名称大小图标 * 目前允许修改功能名称大小图标
* 2021-03-12 追加修改范围业务域名外链地址
* *
* @param formDTO * @param formDTO
* @Author zhangyong * @Author zhangyong

1
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/CustomerFunctionDetailService.java

@ -120,6 +120,7 @@ public interface CustomerFunctionDetailService extends BaseService<CustomerFunct
/** /**
* 客户定制功能修改 入参 * 客户定制功能修改 入参
* 目前允许修改功能名称大小图标 * 目前允许修改功能名称大小图标
* 2021-03-12 追加修改范围业务域名外链地址
* *
* @param formDTO * @param formDTO
* @return com.epmet.commons.tools.utils.Result * @return com.epmet.commons.tools.utils.Result

5
epmet-module/oper-customize/oper-customize-server/src/main/java/com/epmet/service/impl/HomeServiceImpl.java

@ -118,7 +118,10 @@ public class HomeServiceImpl implements HomeService {
customerHomeDetailDao.deleteCustomerHomeDetailByHomeId(customerHomeEntity.getId()); customerHomeDetailDao.deleteCustomerHomeDetailByHomeId(customerHomeEntity.getId());
List<CustomerHomeDetailEntity> list = ConvertUtils.sourceToTarget(formDTO.getComponentList(), CustomerHomeDetailEntity.class); List<CustomerHomeDetailEntity> list = ConvertUtils.sourceToTarget(formDTO.getComponentList(), CustomerHomeDetailEntity.class);
list.forEach(homeDetail -> homeDetail.setHomeId(customerHomeEntity.getId())); list.forEach(homeDetail -> {
homeDetail.setHomeId(customerHomeEntity.getId());
homeDetail.setCustomerId(formDTO.getCustomerId());
});
//将数据存入客户首页详情表 //将数据存入客户首页详情表
customerHomeDetailService.insertBatch(list); customerHomeDetailService.insertBatch(list);

7
epmet-module/oper-customize/oper-customize-server/src/main/resources/mapper/CustomerFunctionDetailDao.xml

@ -145,6 +145,13 @@
<if test="iconSmallImg != null and iconSmallImg.trim() != ''"> <if test="iconSmallImg != null and iconSmallImg.trim() != ''">
ICON_SMALL_IMG = #{iconSmallImg}, ICON_SMALL_IMG = #{iconSmallImg},
</if> </if>
<if test="domainName != null and domainName.trim() != ''">
DOMAIN_NAME = #{domainName},
</if>
<if test="targetLink != null and targetLink.trim() != ''">
TARGET_LINK = #{targetLink},
</if>
UPDATED_BY = #{userId}, UPDATED_BY = #{userId},
UPDATED_TIME = now() UPDATED_TIME = now()
WHERE WHERE

3
epmet-module/resi-group/resi-group-server/src/main/java/com/epmet/modules/topic/service/impl/TopicDraftServiceImpl.java

@ -831,6 +831,7 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase()); attachment.setAttachmentFormat(url.substring(url.lastIndexOf(".") + NumConstant.ONE).toLowerCase());
attachment.setSort(sort++); attachment.setSort(sort++);
attachment.setAttachmentType("image"); attachment.setAttachmentType("image");
attachment.setCustomerId(resiGroupMemberDTO.getCustomerId());
resiTopicAttachmentDao.insertOne(attachment); resiTopicAttachmentDao.insertOne(attachment);
} }
} }
@ -846,6 +847,7 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
attachment.setSort(sort++); attachment.setSort(sort++);
attachment.setDuration(file.getDuration()); attachment.setDuration(file.getDuration());
attachment.setAttachmentType("voice"); attachment.setAttachmentType("voice");
attachment.setCustomerId(resiGroupMemberDTO.getCustomerId());
resiTopicAttachmentDao.insertOne(attachment); resiTopicAttachmentDao.insertOne(attachment);
} }
} }
@ -855,6 +857,7 @@ public class TopicDraftServiceImpl extends BaseServiceImpl<TopicDraftDao, TopicD
operation.setTopicId(topic.getId()); operation.setTopicId(topic.getId());
operation.setOperationType(TopicConstant.PUBLISHMENT); operation.setOperationType(TopicConstant.PUBLISHMENT);
operation.setCreatedBy(tokenDto.getUserId()); operation.setCreatedBy(tokenDto.getUserId());
operation.setCustomerId(resiGroupMemberDTO.getCustomerId());
resiTopicOperationDao.insertOne(operation); resiTopicOperationDao.insertOne(operation);
//4.小组统计信息,话题数+1 //4.小组统计信息,话题数+1

5
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/form/UserInfoFormDTO.java

@ -37,4 +37,9 @@ public class UserInfoFormDTO implements Serializable {
private String account; private String account;
private String userId; private String userId;
/**
* 客户ID
*/
private String customerId;
} }

2
epmet-user/epmet-user-server/src/main/java/com/epmet/entity/UserEntity.java

@ -35,6 +35,6 @@ public class UserEntity extends BaseEpmetEntity {
* 客户ID * 客户ID
*/ */
@TableField(fill = FieldFill.INSERT) @TableField(fill = FieldFill.INSERT)
private String customerId; private String customerId = "";
} }

4
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java

@ -195,10 +195,11 @@ public class UserBadgeServiceImpl implements UserBadgeService {
List<String> oneUserIds = new ArrayList<>(); List<String> oneUserIds = new ArrayList<>();
oneUserIds.add(userId); oneUserIds.add(userId);
List<UserBaseInfoResultDTO> userBaseInfoResultDTOS = userBaseInfoService.queryUserBaseInfo(oneUserIds); List<UserBaseInfoResultDTO> userBaseInfoResultDTOS = userBaseInfoService.queryUserBaseInfo(oneUserIds);
log.info("user【"+userId+"】基本信息:"+userBaseInfoResultDTOS.toString());
if (!CollectionUtils.isEmpty(userIds)) { if (!CollectionUtils.isEmpty(userIds)) {
AtomicReference<Boolean> status = new AtomicReference<>(true); AtomicReference<Boolean> status = new AtomicReference<>(true);
userIds.forEach(u -> { userIds.forEach(u -> {
if(u.equals(userId)){ if(u.getUserId().equals(userId)){
status.set(false); status.set(false);
} }
}); });
@ -232,6 +233,7 @@ public class UserBadgeServiceImpl implements UserBadgeService {
badges.add(dto); badges.add(dto);
}); });
} }
log.info("即将插入的徽章信息:"+badges);
resiUserBadgeDao.insertResiUserBadge(badges); resiUserBadgeDao.insertResiUserBadge(badges);
} }
} }

2
epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserServiceImpl.java

@ -298,11 +298,13 @@ public class UserServiceImpl extends BaseServiceImpl<UserDao, UserEntity> implem
UserEntity userEntity = new UserEntity(); UserEntity userEntity = new UserEntity();
userEntity.setFromApp(UserConstant.APP_RESI); userEntity.setFromApp(UserConstant.APP_RESI);
userEntity.setFromClient(UserConstant.APP); userEntity.setFromClient(UserConstant.APP);
userEntity.setCustomerId(formDTO.getCustomerId());
if (baseDao.insert(userEntity) < NumConstant.ONE) { if (baseDao.insert(userEntity) < NumConstant.ONE) {
log.error("小程序登陆,居民端user表新增数据失败"); log.error("小程序登陆,居民端user表新增数据失败");
throw new RenException(UserConstant.SAVE_USER); throw new RenException(UserConstant.SAVE_USER);
} }
UserWechatEntity entity = new UserWechatEntity(); UserWechatEntity entity = new UserWechatEntity();
entity.setCustomerId(formDTO.getCustomerId());
entity.setMobile(formDTO.getMobile()); entity.setMobile(formDTO.getMobile());
entity.setUserId(userEntity.getId()); entity.setUserId(userEntity.getId());
entity.setNickname(formDTO.getName()); entity.setNickname(formDTO.getName());

3
epmet-user/epmet-user-server/src/main/resources/mapper/UserWechatDao.xml

@ -49,7 +49,8 @@
MOBILE = #{mobile}, MOBILE = #{mobile},
</if> </if>
UPDATED_BY = #{userId}, UPDATED_BY = #{userId},
UPDATED_TIME = NOW() UPDATED_TIME = NOW(),
CUSTOMER_ID = #{customerId}
</set> </set>
WHERE WHERE
DEL_FLAG = 0 DEL_FLAG = 0

Loading…
Cancel
Save