Browse Source

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

dev_shibei_match
zxc 5 years ago
parent
commit
f8bd8b78ce
  1. 2
      epmet-user/epmet-user-client/src/main/java/com/epmet/dto/ResiUserBadgeDTO.java
  2. 4
      epmet-user/epmet-user-server/src/main/java/com/epmet/controller/UserBadgeController.java
  3. 2
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/UserBadgeService.java
  4. 9
      epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/UserBadgeServiceImpl.java
  5. 8
      epmet-user/epmet-user-server/src/main/resources/mapper/ResiUserBadgeDao.xml
  6. 4
      epmet-user/epmet-user-server/src/main/resources/mapper/UserBaseInfoDao.xml

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);
}

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

@ -134,7 +134,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 +159,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 +184,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 +198,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