Browse Source

Merge branch 'dev_personal_center' of http://121.42.41.42:7070/r/epmet-cloud into dev_personal_center

master
liushaowen 5 years ago
parent
commit
827f1c79df
  1. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java
  2. 2
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ResiUserBadgeDTO.java
  3. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBadgeController.java
  4. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBadgeService.java
  5. 16
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java
  6. 8
      epmet-user/epmet-user-server/src/main/resources/mapper/ResiUserBadgeDao.xml
  7. 4
      epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml

2
epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/feign/GovOrgOpenFeignClient.java

@ -303,6 +303,6 @@ public interface GovOrgOpenFeignClient {
* @Date 2020/11/18 15:34
*/
@PostMapping("/gov/org/customergrid/getcustomergridbygridid")
Result<CustomerGridDTO> getCustomerGridByGridId(CustomerGridFormDTO customerGridFormDTO);
Result<CustomerGridDTO> getCustomerGridByGridId(@RequestBody CustomerGridFormDTO customerGridFormDTO);
}

2
epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ResiUserBadgeDTO.java

@ -101,5 +101,7 @@ public class ResiUserBadgeDTO implements Serializable {
public ResiUserBadgeDTO() {
this.delFlag = "0";
this.revision = 0;
this.createdBy = "APP_USER";
this.updatedBy = "APP_USER";
}
}

4
epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBadgeController.java

@ -116,8 +116,8 @@ public class UserBadgeController {
* @date 2020/11/18 下午3:03
*/
@PostMapping("initbadge")
public Result initPartyMemberBadge(@RequestParam(required = false) String userId) {
userBadgeService.initPartyMemberBadge(userId);
public Result initPartyMemberBadge(@RequestParam(required = false) String userId,@LoginUser TokenDto tokenDto) {
userBadgeService.initPartyMemberBadge(userId,tokenDto);
return new Result();
}
}

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

@ -105,5 +105,5 @@ public interface UserBadgeService {
* @author zxc
* @date 2020/11/18 下午3:03
*/
void initPartyMemberBadge(String userId);
void initPartyMemberBadge(String userId,TokenDto tokenDto);
}

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

@ -29,10 +29,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.*;
import java.util.concurrent.atomic.AtomicReference;
import java.util.stream.Collectors;
@ -124,7 +121,7 @@ public class UserBadgeServiceImpl implements UserBadgeService {
}
});
});
return userOperListResultDTOS;
return userOperListResultDTOS.stream().sorted(Comparator.comparing(UserOperListResultDTO::getBadgeName)).collect(Collectors.toList());
}
/**
@ -134,7 +131,7 @@ public class UserBadgeServiceImpl implements UserBadgeService {
* @date 2020/11/18 下午3:04
*/
@Override
public void initPartyMemberBadge(String userId){
public void initPartyMemberBadge(String userId,TokenDto tokenDto){
List<String> userIds = resiUserBadgeDao.selectUserIds();
List<ResiUserBadgeDTO> badges = new ArrayList<>();
String partyBadgeId = badgeDao.getPartyBadgeId(null);
@ -159,6 +156,7 @@ public class UserBadgeServiceImpl implements UserBadgeService {
dto.setCustomerId(u.getCustomerId());
dto.setGridId(u.getRegisteredGridId());
dto.setIsOpened(NumConstant.ZERO);
dto.setUserId(u.getUserId());
badges.add(dto);
});
resiUserBadgeDao.insertResiUserBadge(badges);
@ -183,6 +181,9 @@ public class UserBadgeServiceImpl implements UserBadgeService {
dto.setCustomerId(u.getCustomerId());
dto.setGridId(u.getRegisteredGridId());
dto.setIsOpened(NumConstant.ZERO);
dto.setUserId(u.getUserId());
dto.setCreatedBy(tokenDto.getUserId());
dto.setUpdatedBy(tokenDto.getUserId());
badges.add(dto);
});
}
@ -194,6 +195,9 @@ public class UserBadgeServiceImpl implements UserBadgeService {
dto.setCustomerId(u.getCustomerId());
dto.setGridId(u.getRegisteredGridId());
dto.setIsOpened(NumConstant.ZERO);
dto.setUserId(u.getUserId());
dto.setCreatedBy(tokenDto.getUserId());
dto.setUpdatedBy(tokenDto.getUserId());
badges.add(dto);
});
}

8
epmet-user/epmet-user-server/src/main/resources/mapper/ResiUserBadgeDao.xml

@ -17,7 +17,9 @@
DEL_FLAG,
REVISION,
CREATED_TIME,
UPDATED_TIME
CREATED_BY,
UPDATED_TIME,
UPDATED_BY
)
VALUES
<foreach collection="badges" item="b" separator=",">
@ -32,7 +34,9 @@
#{b.delFlag},
#{b.revision},
NOW(),
NOW()
#{b.createdBy},
NOW(),
#{b.updatedBy}
)
</foreach>
</insert>

4
epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml

@ -99,8 +99,8 @@
<if test ='null != idNum and "" != idNum'>id_num = #{idNum},</if>
<if test ='null != gender and "" != gender'>gender = #{gender},</if>
<if test ='null != street and "" != street'>street = #{street},</if>
<if test ='null != district and "" != district'>district = #{district},</if>
<if test ='null != buildingAddress and "" != buildingAddress'>building_address = #{buildingAddress},</if>
<if test ='null != district'>district = #{district},</if>
<if test ='null != buildingAddress'>building_address = #{buildingAddress},</if>
<if test ='null != nickname and "" != nickname'>nickname = #{nickname},</if>
<if test ='null != headImgUrl and "" != headImgUrl'>head_img_url = #{headImgUrl},</if>
<if test ='null != delFlag and "" != delFlag'>del_flag = #{delFlag},</if>

Loading…
Cancel
Save