Browse Source
# Conflicts: # epmet-module/epmet-oss/epmet-oss-server/src/main/java/com/epmet/controller/OssController.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/CustomerAgencyController.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/dao/CustomerAgencyDao.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/CustomerAgencyService.java # epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/CustomerAgencyServiceImpl.java # epmet-module/gov-org/gov-org-server/src/main/resources/mapper/CustomerAgencyDao.xml # epmet-user/epmet-user-client/src/main/java/com/epmet/feign/EpmetUserOpenFeignClient.java # epmet-user/epmet-user-client/src/main/java/com/epmet/feign/fallback/EpmetUserOpenFeignClientFallback.javamaster
116 changed files with 7594 additions and 10 deletions
@ -0,0 +1,33 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonInclude; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
import java.util.Set; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: liushaowen |
|||
* @date: 2020/11/6 13:54 |
|||
*/ |
|||
@Data |
|||
public class AgencyElementTreeResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private Set<String> defaultKeys; |
|||
|
|||
private List<Agency> list; |
|||
|
|||
@Data |
|||
public static class Agency{ |
|||
private String id; |
|||
|
|||
private String label; |
|||
|
|||
@JsonInclude(JsonInclude.Include.NON_EMPTY) |
|||
private List<AgencyElementTreeResultDTO.Agency> children; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.epmet.resi.mine.dto.from; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 11:07 上午 |
|||
*/ |
|||
@Data |
|||
public class BadgeListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 9082922684993474574L; |
|||
|
|||
public interface BadgeList{} |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
@NotBlank(message = "客户ID不能为空",groups = {BadgeList.class}) |
|||
private String customerId; |
|||
} |
@ -0,0 +1,10 @@ |
|||
package com.epmet.resi.mine.dto.from; |
|||
|
|||
/** |
|||
* @description: 我的建议列表DTO |
|||
* @author: liushaowen |
|||
* @date: 2020/11/5 10:38 |
|||
*/ |
|||
|
|||
public class MyAdviceListFormDTO { |
|||
} |
@ -0,0 +1,21 @@ |
|||
package com.epmet.resi.mine.dto.from; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 4:18 下午 |
|||
*/ |
|||
@Data |
|||
public class OperListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -1872129597916414752L; |
|||
|
|||
public interface OperList{} |
|||
|
|||
@NotBlank(message = "客户ID不能为空",groups = {OperList.class}) |
|||
private String customerId; |
|||
} |
@ -0,0 +1,13 @@ |
|||
package com.epmet.resi.mine.dto.from; |
|||
|
|||
import lombok.Data; |
|||
|
|||
/** |
|||
* @description: 提交建议DTO |
|||
* @author: liushaowen |
|||
* @date: 2020/11/5 10:35 |
|||
*/ |
|||
|
|||
@Data |
|||
public class SubmitAdviceFormDTO { |
|||
} |
@ -0,0 +1,32 @@ |
|||
package com.epmet.resi.mine.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 11:08 上午 |
|||
*/ |
|||
@Data |
|||
public class BadgeListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6542233940679158922L; |
|||
|
|||
/** |
|||
* 徽章ID |
|||
*/ |
|||
private String badgeId; |
|||
|
|||
/** |
|||
* 徽章图片地址 |
|||
*/ |
|||
private String badgeIcon; |
|||
|
|||
/** |
|||
* 徽章是否点亮 |
|||
*/ |
|||
private String isOpened; |
|||
|
|||
private String badgeType; |
|||
} |
@ -0,0 +1,39 @@ |
|||
package com.epmet.resi.mine.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/3 9:58 |
|||
*/ |
|||
@Data |
|||
public class InitInfoResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 144944007101324497L; |
|||
/** |
|||
* 头像 |
|||
*/ |
|||
private String headImgUrl; |
|||
/** |
|||
* 姓 |
|||
*/ |
|||
private String surname; |
|||
/** |
|||
* 名 |
|||
*/ |
|||
private String name; |
|||
/** |
|||
* 路牌号 |
|||
*/ |
|||
private String street; |
|||
/** |
|||
* 小区名称 |
|||
*/ |
|||
private String district; |
|||
/** |
|||
* 详细地址 |
|||
*/ |
|||
private String buildingAddress; |
|||
} |
@ -0,0 +1,51 @@ |
|||
package com.epmet.resi.mine.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 4:20 下午 |
|||
*/ |
|||
@Data |
|||
public class OperListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6185696177370545937L; |
|||
|
|||
/** |
|||
* 徽章ID |
|||
*/ |
|||
private String badgeId; |
|||
|
|||
/** |
|||
* 徽章名字 |
|||
*/ |
|||
private String badgeName; |
|||
|
|||
/** |
|||
* 点亮状态 yes:已点亮,no:未点亮 |
|||
*/ |
|||
private String isLighted; |
|||
|
|||
/** |
|||
* 是否认证 yes 认证 no 已认证 |
|||
*/ |
|||
private String isCertificated; |
|||
|
|||
/** |
|||
* 徽章图片地址 |
|||
*/ |
|||
private String badgeIcon; |
|||
|
|||
/** |
|||
* 是否被驳回 true:已驳回,false:未驳回 |
|||
*/ |
|||
private Boolean isReject; |
|||
|
|||
/** |
|||
* 徽章类型:党员徽章;party,无:none |
|||
*/ |
|||
private String badgeType; |
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.epmet.modules.advice.controller; |
|||
|
|||
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.modules.advice.service.AdviceService; |
|||
import com.epmet.resi.mine.dto.from.MyAdviceListFormDTO; |
|||
import com.epmet.resi.mine.dto.from.SubmitAdviceFormDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* @description: 用户建议controller |
|||
* @author: liushaowen |
|||
* @date: 2020/11/5 9:34 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("advice") |
|||
public class AdviceController { |
|||
@Autowired |
|||
private AdviceService adviceService; |
|||
|
|||
@Autowired |
|||
private LoginUserUtil loginUserUtil; |
|||
|
|||
/** |
|||
* @Description 提交建议 |
|||
* @param dto |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author liushaowen |
|||
* @Date 2020/11/5 10:37 |
|||
*/ |
|||
@PostMapping("submitadvice") |
|||
public Result submitAdvice(SubmitAdviceFormDTO dto){ |
|||
ValidatorUtils.validateEntity(dto); |
|||
return adviceService.submitAdvice(dto); |
|||
} |
|||
|
|||
/** |
|||
* @Description 我的建议列表 |
|||
* @param dto |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author liushaowen |
|||
* @Date 2020/11/5 13:26 |
|||
*/ |
|||
@PostMapping("myadvicelist") |
|||
public Result getMyAdviceList(MyAdviceListFormDTO dto){ |
|||
ValidatorUtils.validateEntity(dto); |
|||
return adviceService.getMyAdviceList(dto); |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
package com.epmet.modules.advice.service; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.resi.mine.dto.from.MyAdviceListFormDTO; |
|||
import com.epmet.resi.mine.dto.from.SubmitAdviceFormDTO; |
|||
|
|||
public interface AdviceService { |
|||
Result submitAdvice(SubmitAdviceFormDTO dto); |
|||
|
|||
Result getMyAdviceList(MyAdviceListFormDTO dto); |
|||
} |
@ -0,0 +1,41 @@ |
|||
package com.epmet.modules.advice.service.impl; |
|||
|
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.feign.EpmetUserOpenFeignClient; |
|||
import com.epmet.modules.advice.service.AdviceService; |
|||
import com.epmet.resi.mine.dto.from.MyAdviceListFormDTO; |
|||
import com.epmet.resi.mine.dto.from.SubmitAdviceFormDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: liushaowen |
|||
* @date: 2020/11/5 10:27 |
|||
*/ |
|||
@Service |
|||
public class AdviceServiceImpl implements AdviceService { |
|||
@Autowired |
|||
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|||
/*** |
|||
* 提交建议 |
|||
* @param dto |
|||
* @return |
|||
*/ |
|||
@Override |
|||
public Result submitAdvice(SubmitAdviceFormDTO dto) { |
|||
return null; |
|||
} |
|||
|
|||
/** |
|||
* @Description 我的建议列表 |
|||
* @param dto |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
* @Author liushaowen |
|||
* @Date 2020/11/5 10:40 |
|||
*/ |
|||
@Override |
|||
public Result getMyAdviceList(MyAdviceListFormDTO dto) { |
|||
return null; |
|||
} |
|||
} |
@ -0,0 +1,84 @@ |
|||
package com.epmet.modules.badege.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.form.OpenedOrClosedFormDTO; |
|||
import com.epmet.modules.badege.service.BadgeService; |
|||
import com.epmet.resi.mine.dto.from.BadgeListFormDTO; |
|||
import com.epmet.dto.form.CertificationAddFormDTO; |
|||
import com.epmet.resi.mine.dto.from.OperListFormDTO; |
|||
import com.epmet.resi.mine.dto.result.BadgeListResultDTO; |
|||
import com.epmet.resi.mine.dto.result.OperListResultDTO; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 10:42 上午 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("badge") |
|||
public class BadgeController { |
|||
|
|||
@Autowired |
|||
private BadgeService badgeService; |
|||
|
|||
/** |
|||
* @Description 个人中心-获取个人徽章点亮列表 |
|||
* @Param badgeListFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/3 4:11 下午 |
|||
*/ |
|||
@PostMapping("list") |
|||
public Result<List<BadgeListResultDTO>> getBadgeList(@LoginUser TokenDto tokenDto,@RequestBody BadgeListFormDTO badgeListFormDTO){ |
|||
ValidatorUtils.validateEntity(badgeListFormDTO, BadgeListFormDTO.BadgeList.class); |
|||
return new Result<List<BadgeListResultDTO>>().ok(badgeService.getBadgeList(tokenDto,badgeListFormDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 个人中心-获取徽章可操作列表(点亮,取消,认证) |
|||
* @Param operListFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/3 4:28 下午 |
|||
*/ |
|||
@PostMapping("operlist") |
|||
public Result<List<OperListResultDTO>> getOperList(@LoginUser TokenDto tokenDto,@RequestBody OperListFormDTO operListFormDTO){ |
|||
ValidatorUtils.validateEntity(operListFormDTO, OperListFormDTO.OperList.class); |
|||
return new Result<List<OperListResultDTO>>().ok(badgeService.getOperList(tokenDto,operListFormDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 个人中心-提交徽章认证 |
|||
* @Param tokenDto |
|||
* @Param certificationAddFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 11:16 上午 |
|||
*/ |
|||
@PostMapping("certification/add") |
|||
public Result certificationAdd(@LoginUser TokenDto tokenDto,@RequestBody CertificationAddFormDTO certificationAddFormDTO){ |
|||
ValidatorUtils.validateEntity(certificationAddFormDTO, CertificationAddFormDTO.CertificationAdd.class); |
|||
return badgeService.certificationAdd(tokenDto,certificationAddFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 个人中心-取消/点亮徽章 |
|||
* @Param openedOrClosedFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/5 9:23 上午 |
|||
*/ |
|||
@PostMapping("openedorclosed") |
|||
public Result openedOrClosed(@LoginUser TokenDto tokenDto,@RequestBody OpenedOrClosedFormDTO openedOrClosedFormDTO){ |
|||
ValidatorUtils.validateEntity(openedOrClosedFormDTO, OpenedOrClosedFormDTO.OpenedOrClosed.class); |
|||
badgeService.openedOrClosed(tokenDto,openedOrClosedFormDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
|
|||
} |
@ -0,0 +1,53 @@ |
|||
package com.epmet.modules.badege.service; |
|||
|
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.OpenedOrClosedFormDTO; |
|||
import com.epmet.resi.mine.dto.from.BadgeListFormDTO; |
|||
import com.epmet.dto.form.CertificationAddFormDTO; |
|||
import com.epmet.resi.mine.dto.from.OperListFormDTO; |
|||
import com.epmet.resi.mine.dto.result.BadgeListResultDTO; |
|||
import com.epmet.resi.mine.dto.result.OperListResultDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 10:52 上午 |
|||
*/ |
|||
public interface BadgeService { |
|||
|
|||
/** |
|||
* @Description 个人中心-获取个人徽章点亮列表 |
|||
* @Param badgeListFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/3 4:11 下午 |
|||
*/ |
|||
List<BadgeListResultDTO> getBadgeList(TokenDto tokenDto,BadgeListFormDTO badgeListFormDTO); |
|||
|
|||
/** |
|||
* @Description 个人中心-获取徽章可操作列表(点亮,取消,认证) |
|||
* @Param operListFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/3 4:28 下午 |
|||
*/ |
|||
List<OperListResultDTO> getOperList(TokenDto tokenDto,OperListFormDTO operListFormDTO); |
|||
|
|||
/** |
|||
* @Description 个人中心-提交徽章认证 |
|||
* @Param tokenDto |
|||
* @Param certificationAddFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 11:16 上午 |
|||
*/ |
|||
Result certificationAdd(TokenDto tokenDto, CertificationAddFormDTO certificationAddFormDTO); |
|||
|
|||
/** |
|||
* @Description 个人中心-取消/点亮徽章 |
|||
* @Param openedOrClosedFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/5 9:23 上午 |
|||
*/ |
|||
void openedOrClosed(TokenDto tokenDto,OpenedOrClosedFormDTO openedOrClosedFormDTO); |
|||
|
|||
} |
@ -0,0 +1,109 @@ |
|||
package com.epmet.modules.badege.service.impl; |
|||
|
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.OpenedOrClosedFormDTO; |
|||
import com.epmet.dto.form.UserBadgeListFormDTO; |
|||
import com.epmet.dto.form.UserOperListFormDTO; |
|||
import com.epmet.dto.result.UserBadgeListResultDTO; |
|||
import com.epmet.dto.result.UserOperListResultDTO; |
|||
import com.epmet.feign.EpmetUserOpenFeignClient; |
|||
import com.epmet.modules.badege.service.BadgeService; |
|||
import com.epmet.resi.mine.dto.from.BadgeListFormDTO; |
|||
import com.epmet.dto.form.CertificationAddFormDTO; |
|||
import com.epmet.resi.mine.dto.from.OperListFormDTO; |
|||
import com.epmet.resi.mine.dto.result.BadgeListResultDTO; |
|||
import com.epmet.resi.mine.dto.result.OperListResultDTO; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
import java.util.ArrayList; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 10:53 上午 |
|||
*/ |
|||
@Service |
|||
@Slf4j |
|||
public class BadgeServiceImpl implements BadgeService { |
|||
|
|||
@Autowired |
|||
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|||
|
|||
/** |
|||
* @Description 个人中心-获取个人徽章点亮列表 |
|||
* @Param badgeListFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/3 4:11 下午 |
|||
*/ |
|||
@Override |
|||
public List<BadgeListResultDTO> getBadgeList(TokenDto tokenDto,BadgeListFormDTO badgeListFormDTO) { |
|||
UserBadgeListFormDTO form = new UserBadgeListFormDTO(); |
|||
form.setCustomerId(badgeListFormDTO.getCustomerId()); |
|||
form.setUserId(tokenDto.getUserId()); |
|||
Result<List<UserBadgeListResultDTO>> listResult = epmetUserOpenFeignClient.selectBadgeList(form); |
|||
if (!listResult.success()){ |
|||
throw new RenException("获取徽章点亮列表失败......"); |
|||
} |
|||
if (null == listResult.getData()){ |
|||
return new ArrayList<>(); |
|||
} |
|||
List<BadgeListResultDTO> result = ConvertUtils.sourceToTarget(listResult.getData(), BadgeListResultDTO.class); |
|||
return result; |
|||
} |
|||
|
|||
/** |
|||
* @Description 个人中心-获取徽章可操作列表(点亮,取消,认证) |
|||
* @Param operListFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/3 4:28 下午 |
|||
*/ |
|||
@Override |
|||
public List<OperListResultDTO> getOperList(TokenDto tokenDto,OperListFormDTO operListFormDTO) { |
|||
UserOperListFormDTO userOperListFormDTO = new UserOperListFormDTO(); |
|||
userOperListFormDTO.setCustomerId(operListFormDTO.getCustomerId()); |
|||
userOperListFormDTO.setUserId(tokenDto.getUserId()); |
|||
Result<List<UserOperListResultDTO>> listResult = epmetUserOpenFeignClient.selectOperList(userOperListFormDTO); |
|||
if (!listResult.success()){ |
|||
throw new RenException("获取徽章列表失败......"); |
|||
} |
|||
if (null == listResult.getData()){ |
|||
return new ArrayList<>(); |
|||
} |
|||
List<OperListResultDTO> result = ConvertUtils.sourceToTarget(listResult.getData(), OperListResultDTO.class); |
|||
return result; |
|||
} |
|||
|
|||
/** |
|||
* @Description 个人中心-提交徽章认证 |
|||
* @Param tokenDto |
|||
* @Param certificationAddFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 11:16 上午 |
|||
*/ |
|||
@Override |
|||
public Result certificationAdd(TokenDto tokenDto, CertificationAddFormDTO certificationAddFormDTO) { |
|||
certificationAddFormDTO.setUserId(tokenDto.getUserId()); |
|||
Result result = epmetUserOpenFeignClient.authBadgeRecord(certificationAddFormDTO); |
|||
return result; |
|||
} |
|||
|
|||
/** |
|||
* @Description 个人中心-取消/点亮徽章 |
|||
* @Param openedOrClosedFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/5 9:23 上午 |
|||
*/ |
|||
@Override |
|||
public void openedOrClosed(TokenDto tokenDto,OpenedOrClosedFormDTO openedOrClosedFormDTO) { |
|||
openedOrClosedFormDTO.setUserId(tokenDto.getUserId()); |
|||
Result result = epmetUserOpenFeignClient.openedOrClosed(openedOrClosedFormDTO); |
|||
if (!result.success()){ |
|||
throw new RenException("取消/点亮徽章失败了......"); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,55 @@ |
|||
package com.epmet.modules.mine.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.EditInfoFormDTO; |
|||
import com.epmet.modules.mine.service.PersonalCenterService; |
|||
import com.epmet.resi.mine.dto.result.InitInfoResultDTO; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
/** |
|||
* 个人中心 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/3 9:48 |
|||
*/ |
|||
@Slf4j |
|||
@RestController |
|||
@RequestMapping("personalcenter") |
|||
public class PersonalCenterController { |
|||
@Autowired |
|||
private PersonalCenterService personalCenterService; |
|||
|
|||
/** |
|||
* 修改信息页面初始化 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/3 10:03 |
|||
* @param tokenDto |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.resi.mine.dto.result.InitInfoResultDTO> |
|||
*/ |
|||
@PostMapping("initinfo") |
|||
public Result<InitInfoResultDTO> initInfo(@LoginUser TokenDto tokenDto) { |
|||
InitInfoResultDTO resultDTO = personalCenterService.initInfo(tokenDto); |
|||
return new Result<InitInfoResultDTO>().ok(resultDTO); |
|||
|
|||
} |
|||
|
|||
/** |
|||
* 修改信息 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/3 10:03 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
*/ |
|||
@PostMapping("editinfo") |
|||
public Result editInfo(@LoginUser TokenDto tokenDto, @RequestBody EditInfoFormDTO formDTO) { |
|||
personalCenterService.editInfo(tokenDto, formDTO); |
|||
return new Result(); |
|||
} |
|||
} |
@ -0,0 +1,17 @@ |
|||
package com.epmet.modules.mine.service; |
|||
|
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.dto.form.EditInfoFormDTO; |
|||
import com.epmet.resi.mine.dto.result.InitInfoResultDTO; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/3 9:50 |
|||
*/ |
|||
public interface PersonalCenterService { |
|||
|
|||
InitInfoResultDTO initInfo(TokenDto tokenDto); |
|||
|
|||
void editInfo(TokenDto tokenDto, EditInfoFormDTO formDTO); |
|||
} |
@ -0,0 +1,51 @@ |
|||
package com.epmet.modules.mine.service.impl; |
|||
|
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.EditInfoFormDTO; |
|||
import com.epmet.dto.result.ResiUserBaseInfoResultDTO; |
|||
import com.epmet.feign.EpmetUserOpenFeignClient; |
|||
import com.epmet.modules.mine.service.PersonalCenterService; |
|||
import com.epmet.resi.mine.dto.result.InitInfoResultDTO; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/3 9:50 |
|||
*/ |
|||
@Slf4j |
|||
@Service |
|||
public class PersonalCenterServiceImpl implements PersonalCenterService { |
|||
|
|||
@Autowired |
|||
private EpmetUserOpenFeignClient epmetUserOpenFeignClient; |
|||
|
|||
@Override |
|||
public InitInfoResultDTO initInfo(TokenDto tokenDto) { |
|||
Result<ResiUserBaseInfoResultDTO> baseInfoResult = epmetUserOpenFeignClient.selectUserBaseInfo(tokenDto); |
|||
if (!baseInfoResult.success()) { |
|||
throw new RenException(baseInfoResult.getCode(), baseInfoResult.getMsg()); |
|||
} |
|||
InitInfoResultDTO resultDTO = new InitInfoResultDTO(); |
|||
resultDTO.setHeadImgUrl(baseInfoResult.getData().getHeadImgUrl()); |
|||
resultDTO.setSurname(baseInfoResult.getData().getSurname()); |
|||
resultDTO.setName(baseInfoResult.getData().getName()); |
|||
resultDTO.setStreet(baseInfoResult.getData().getStreet()); |
|||
resultDTO.setDistrict(baseInfoResult.getData().getDistrict()); |
|||
resultDTO.setBuildingAddress(baseInfoResult.getData().getBuildingAddress()); |
|||
return resultDTO; |
|||
} |
|||
|
|||
@Override |
|||
public void editInfo(TokenDto tokenDto, EditInfoFormDTO formDTO) { |
|||
formDTO.setUserId(tokenDto.getUserId()); |
|||
Result result = epmetUserOpenFeignClient.editUserInfo(formDTO); |
|||
if (!result.success()) { |
|||
throw new RenException(result.getCode(), result.getMsg()); |
|||
} |
|||
} |
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 2:45 下午 |
|||
*/ |
|||
public interface BadgeConstant { |
|||
|
|||
String BADGE_KEY = "epmet:badge:customer:"; |
|||
|
|||
String BADGE = "badge"; |
|||
|
|||
String DEFAULT_CUSTOMER = "default"; |
|||
|
|||
String YES = "yes"; |
|||
|
|||
String NO = "no"; |
|||
|
|||
String REJECTED = "rejected"; |
|||
|
|||
String APPROVED = "approved"; |
|||
|
|||
String NONE ="none"; |
|||
|
|||
String SMS_CODE_KEY = "epmet:smsCode:badge:"; |
|||
|
|||
String PARTY ="party"; |
|||
|
|||
String ONLINE ="online"; |
|||
|
|||
String OFFLINE ="offline"; |
|||
|
|||
String RESI = "resi"; |
|||
|
|||
String AUTH_TITLE = "您有一条认证消息"; |
|||
|
|||
String GET_BADGE_NAME_FAILURE = "获取徽章名称失败......"; |
|||
|
|||
String MESSAGE_CONTENT = "您好,您的%s因认证失败未成功点亮,请查看"; |
|||
|
|||
String READ_FLAG = "unread"; |
|||
|
|||
String DEFAULT = "default"; |
|||
|
|||
} |
@ -0,0 +1,86 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 徽章认证配置 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-03 |
|||
*/ |
|||
@Data |
|||
public class BadgeCertificationConfigDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id 默认配置id:default |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 徽章ID |
|||
*/ |
|||
private String badgeId; |
|||
|
|||
/** |
|||
* 认证信息类型 手机号:mobile;全名:fullname;身份证:idcard;认证证件: certificate;认证说明(备注):remark |
|||
*/ |
|||
private String certificationType; |
|||
|
|||
/** |
|||
* 删除标识 1删除;0未删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,96 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 徽章 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-03 |
|||
*/ |
|||
@Data |
|||
public class BadgeDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id 默认配置id:default |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 徽章名称 |
|||
*/ |
|||
private String badgeName; |
|||
|
|||
/** |
|||
* 徽章图标url |
|||
*/ |
|||
private String badgeIcon; |
|||
|
|||
/** |
|||
* 固有徽章类型 前端页面跳转标识,党员徽章:party;无:none |
|||
*/ |
|||
private String fixationBadgeType; |
|||
|
|||
/** |
|||
* 状态 上线:online;下线:offline; |
|||
*/ |
|||
private String badgeStatus; |
|||
|
|||
/** |
|||
* 删除标识 1删除;0未删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,101 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 用户徽章关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-06 |
|||
*/ |
|||
@Data |
|||
public class ResiUserBadgeDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键ID |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户Id 默认配置id:default |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 用户注册网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 徽章ID |
|||
*/ |
|||
private String badgeId; |
|||
|
|||
/** |
|||
* 是否开启(点亮) 1:点亮;0:未点亮 |
|||
*/ |
|||
private Integer isOpened; |
|||
|
|||
/** |
|||
* 认证(审核)状态 待审核:auditing;审核通过:pass;驳回:rejected; |
|||
*/ |
|||
private String certificationAutidStatus; |
|||
|
|||
/** |
|||
* 删除标识 1删除;0未删除 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,156 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* user_advice |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-06 |
|||
*/ |
|||
@Data |
|||
public class UserAdviceDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 客户名 |
|||
*/ |
|||
private String customerName; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 组织名 |
|||
*/ |
|||
private String agencyName; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 网格名 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* userid |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 用户姓名 |
|||
*/ |
|||
private String userName; |
|||
|
|||
/** |
|||
* 用户注册手机号 |
|||
*/ |
|||
private String regPhone; |
|||
|
|||
/** |
|||
* 建议描述 |
|||
*/ |
|||
private String adviceContent; |
|||
|
|||
/** |
|||
* 填写手机号 |
|||
*/ |
|||
private String phone; |
|||
|
|||
/** |
|||
* 问题分类(gov政府software软件,逗号分隔) |
|||
*/ |
|||
private String adviceType; |
|||
|
|||
/** |
|||
* 回复内容 |
|||
*/ |
|||
private String replyContent; |
|||
|
|||
/** |
|||
* 回复人id |
|||
*/ |
|||
private String replyUserId; |
|||
|
|||
/** |
|||
* 回复人姓名 |
|||
*/ |
|||
private String replyUserName; |
|||
|
|||
/** |
|||
* 回复时间 |
|||
*/ |
|||
private Date replyTime; |
|||
|
|||
/** |
|||
* 政府存证文字 |
|||
*/ |
|||
private String govContent; |
|||
|
|||
/** |
|||
* 删除标志 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,86 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dto; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import lombok.Data; |
|||
|
|||
|
|||
/** |
|||
* 用户建议图片 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-04 |
|||
*/ |
|||
@Data |
|||
public class UserAdviceImgDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 主键 |
|||
*/ |
|||
private String id; |
|||
|
|||
/** |
|||
* 建议id |
|||
*/ |
|||
private String adviceId; |
|||
|
|||
/** |
|||
* 类型,resi为用户上传,oper为运营上传 |
|||
*/ |
|||
private String type; |
|||
|
|||
/** |
|||
* 图片url |
|||
*/ |
|||
private String imgUrl; |
|||
|
|||
/** |
|||
* 删除标志 |
|||
*/ |
|||
private String delFlag; |
|||
|
|||
/** |
|||
* 乐观锁 |
|||
*/ |
|||
private Integer revision; |
|||
|
|||
/** |
|||
* 创建人 |
|||
*/ |
|||
private String createdBy; |
|||
|
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Date createdTime; |
|||
|
|||
/** |
|||
* 更新人 |
|||
*/ |
|||
private String updatedBy; |
|||
|
|||
/** |
|||
* 更新时间 |
|||
*/ |
|||
private Date updatedTime; |
|||
|
|||
} |
@ -0,0 +1,45 @@ |
|||
package com.epmet.dto; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/4 1:46 下午 |
|||
*/ |
|||
@Data |
|||
public class UserBadgeCertificateRecordDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 3207509834642386145L; |
|||
private String id; |
|||
private String customerId; |
|||
private String gridId; |
|||
private String userId; |
|||
private String badgeId; |
|||
private String surname; |
|||
private String name; |
|||
private String mobile; |
|||
private String idNum; |
|||
private String certificationImg; |
|||
private String remark; |
|||
private String auditStatus; |
|||
private String auditRemark; |
|||
private String staffId; |
|||
private Date auditTime; |
|||
private String isLast; |
|||
private String delFlag; |
|||
private Integer revision; |
|||
private String createdBy; |
|||
private String updatedBy; |
|||
|
|||
public UserBadgeCertificateRecordDTO() { |
|||
this.auditStatus = "auditing"; |
|||
this.isLast = "yes"; |
|||
this.delFlag = "0"; |
|||
this.revision = 0; |
|||
this.createdBy = "APP_USER"; |
|||
this.updatedBy = "APP_USER"; |
|||
} |
|||
} |
@ -0,0 +1,42 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotEmpty; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/4 9:47 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class AddBadgeFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -5220529162950147825L; |
|||
/** |
|||
* 徽章名称 |
|||
*/ |
|||
@NotBlank(message = "徽章名称不能为空") |
|||
private String badgeName; |
|||
/** |
|||
* 徽章图标 |
|||
*/ |
|||
@NotBlank(message = "徽章图标不能为空") |
|||
private String badgeIcon; |
|||
/** |
|||
* 徽章状态 上线:online;下线:offline; |
|||
*/ |
|||
@NotBlank(message = "徽章状态不能为空") |
|||
private String badgeStatus; |
|||
/** |
|||
* 认证信息类型数组 手机号:mobile;姓名:fullname;身份证:idcard;认证证件: certificate;认证说明(备注):remark |
|||
*/ |
|||
@NotEmpty(message = "认证信息类型不能为空") |
|||
private List<String> certificationTypes; |
|||
} |
@ -0,0 +1,56 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: liushaowen |
|||
* @date: 2020/11/9 10:37 |
|||
*/ |
|||
@Data |
|||
public class AdviceListFormDTO { |
|||
/** |
|||
* 客户id 不填查询所有 |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 组织id 不填查询所有 |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 是否被回复,0未回复,1回复, 传空查询所有 |
|||
*/ |
|||
private String isReply; |
|||
|
|||
/** |
|||
* 问题类型 gov政府,software软件 ,传空查询全部,单选 |
|||
*/ |
|||
private String adviceType; |
|||
|
|||
/** |
|||
* 开始时间 可不填 |
|||
*/ |
|||
private Date startTime; |
|||
|
|||
/** |
|||
* 结束时间 可不填 |
|||
*/ |
|||
private Date endTime; |
|||
|
|||
/** |
|||
* 页码 |
|||
*/ |
|||
@Min(1) |
|||
private int pageNo; |
|||
|
|||
/** |
|||
* 页大小 |
|||
*/ |
|||
@Min(1) |
|||
private int pageSize; |
|||
} |
@ -0,0 +1,24 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/4 4:54 下午 |
|||
*/ |
|||
@Data |
|||
public class AuthFieldFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1976515427065841752L; |
|||
|
|||
public interface AuthField{} |
|||
|
|||
@NotBlank(message = "客户ID不能为空",groups = {AuthField.class}) |
|||
private String customerId; |
|||
|
|||
@NotBlank(message = "徽章ID不能为空",groups = {AuthField.class}) |
|||
private String badgeId; |
|||
} |
@ -0,0 +1,20 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/5 11:06 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class BadgeAuditFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 2209535364555130964L; |
|||
private String recordId; |
|||
private String auditStatus; |
|||
private String auditRemark; |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/4 14:22 |
|||
*/ |
|||
@Data |
|||
public class BadgeFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 9156247659994638103L; |
|||
private String badgeId; |
|||
/** |
|||
* 页码 |
|||
*/ |
|||
private Integer pageNo = 1; |
|||
/** |
|||
* 每页显示数量 |
|||
*/ |
|||
private Integer pageSize = 20; |
|||
/** |
|||
* 网格Id |
|||
*/ |
|||
private String gridId; |
|||
} |
@ -0,0 +1,22 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/4 3:11 下午 |
|||
*/ |
|||
@Data |
|||
public class BadgeSendCodeFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -3926070129364657241L; |
|||
|
|||
public interface BadgeSendCode{} |
|||
|
|||
@NotBlank(message = "手机号不能为空", groups = {BadgeSendCode.class}) |
|||
private String mobile; |
|||
|
|||
} |
@ -0,0 +1,67 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/4 11:05 上午 |
|||
*/ |
|||
@Data |
|||
public class CertificationAddFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1330773325803513330L; |
|||
|
|||
public interface CertificationAdd{} |
|||
|
|||
private String userId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
@NotBlank(message = "客户ID不能为空",groups = {CertificationAdd.class}) |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 徽章ID |
|||
*/ |
|||
private String badgeId; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 姓 |
|||
*/ |
|||
private String surname; |
|||
|
|||
/** |
|||
* 名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idcard; |
|||
|
|||
/** |
|||
* 认证证件图片url |
|||
*/ |
|||
private String certificationImg; |
|||
|
|||
/** |
|||
* 认证说明 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 验证码 |
|||
*/ |
|||
private String code; |
|||
|
|||
} |
@ -0,0 +1,29 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/4 3:51 下午 |
|||
*/ |
|||
@Data |
|||
public class CertificationDetailFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -398879254354767770L; |
|||
|
|||
public interface CertificationDetail{} |
|||
|
|||
@NotBlank(message = "客户ID不能为空",groups = {CertificationDetail.class}) |
|||
private String customerId; |
|||
|
|||
@NotBlank(message = "徽章ID不能为空",groups = {CertificationDetail.class}) |
|||
private String badgeId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String userId; |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import javax.validation.constraints.NotEmpty; |
|||
import javax.validation.constraints.NotNull; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/4 14:23 |
|||
*/ |
|||
@Data |
|||
public class EditBadgeFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 1578890423002035200L; |
|||
private String badgeId; |
|||
/** |
|||
* 徽章名称 |
|||
*/ |
|||
@NotBlank(message = "徽章名称不能为空") |
|||
private String badgeName; |
|||
/** |
|||
* 徽章图标 |
|||
*/ |
|||
@NotBlank(message = "徽章图标不能为空") |
|||
private String badgeIcon; |
|||
/** |
|||
* 徽章状态 上线:online;下线:offline; |
|||
*/ |
|||
@NotBlank(message = "徽章状态不能为空") |
|||
private String badgeStatus; |
|||
/** |
|||
* 认证信息类型数组 手机号:mobile;姓名:fullname;身份证:idcard;认证证件: certificate;认证说明(备注):remark |
|||
*/ |
|||
@NotEmpty(message = "认证信息类型不能为空") |
|||
private List<String> certificationTypes; |
|||
} |
@ -0,0 +1,52 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/3 9:55 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class EditInfoFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1280489016677129419L; |
|||
/** |
|||
* 头像 |
|||
*/ |
|||
@NotBlank(message = "头像不能为空") |
|||
private String userId; |
|||
/** |
|||
* 头像 |
|||
*/ |
|||
@NotBlank(message = "头像不能为空") |
|||
private String headImgUrl; |
|||
/** |
|||
* 姓 |
|||
*/ |
|||
@NotBlank(message = "姓不能为空") |
|||
private String surname; |
|||
/** |
|||
* 名 |
|||
*/ |
|||
@NotBlank(message = "名不能为空") |
|||
private String name; |
|||
/** |
|||
* 路牌号 |
|||
*/ |
|||
@NotBlank(message = "路牌号不能为空") |
|||
private String street; |
|||
/** |
|||
* 小区名称 |
|||
*/ |
|||
private String district; |
|||
/** |
|||
* 详细地址 |
|||
*/ |
|||
private String buildingAddress; |
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/4 5:43 下午 |
|||
*/ |
|||
@Data |
|||
public class OpenedOrClosedFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 483466676158603066L; |
|||
|
|||
public interface OpenedOrClosed{} |
|||
|
|||
@NotBlank(message = "客户ID不能为空",groups = {OpenedOrClosed.class}) |
|||
private String customerId; |
|||
|
|||
private String userId; |
|||
|
|||
@NotBlank(message = "徽章ID不能为空",groups = {OpenedOrClosed.class}) |
|||
private String badgeId; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.Min; |
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: liushaowen |
|||
* @date: 2020/11/5 17:25 |
|||
*/ |
|||
@Data |
|||
public class OperAdviceListFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
private String customerId; |
|||
|
|||
private String isReply; |
|||
|
|||
private String adviceType; |
|||
|
|||
private String startTime; |
|||
|
|||
private String endTime; |
|||
|
|||
@Min(1) |
|||
private Integer pageNo; |
|||
|
|||
@Min(1) |
|||
private Integer pageSize; |
|||
|
|||
} |
@ -0,0 +1,27 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import javax.validation.constraints.NotBlank; |
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description:回复建议FormDTO |
|||
* @author: liushaowen |
|||
* @date: 2020/11/6 10:37 |
|||
*/ |
|||
@Data |
|||
public class ReplyAdviceFormDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
@NotBlank(message = "adviceId不能为空") |
|||
private String adviceId; |
|||
|
|||
@NotBlank(message = "回复内容不能为空") |
|||
private String replyContent; |
|||
|
|||
private List<String> govImgList; |
|||
|
|||
private String govContent; |
|||
} |
@ -0,0 +1,33 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 11:07 上午 |
|||
*/ |
|||
@Data |
|||
public class UserBadgeListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 9002922684993474574L; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
public UserBadgeListFormDTO(String userId, String customerId) { |
|||
this.userId = userId; |
|||
this.customerId = customerId; |
|||
} |
|||
|
|||
public UserBadgeListFormDTO() { |
|||
} |
|||
} |
@ -0,0 +1,48 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Objects; |
|||
|
|||
/** |
|||
* @Description 用户-徽章缓存单元 |
|||
* @ClassName UserBadgeUnitFormDTO |
|||
* @Auth wangc |
|||
* @Date 2020-11-05 10:00 |
|||
*/ |
|||
@Data |
|||
public class UserBadgeUnitFormDTO implements Serializable { |
|||
private static final long serialVersionUID = -4497394865738168850L; |
|||
|
|||
/** |
|||
* 徽章Id |
|||
*/ |
|||
private String badgeId; |
|||
|
|||
/** |
|||
* 徽章图标 url |
|||
*/ |
|||
private String badgeIcon; |
|||
|
|||
/** |
|||
* 徽章名称 |
|||
*/ |
|||
private String badgeName; |
|||
|
|||
|
|||
@Override |
|||
public boolean equals(Object o) { |
|||
if (this == o) return true; |
|||
if (o == null || getClass() != o.getClass()) return false; |
|||
UserBadgeUnitFormDTO that = (UserBadgeUnitFormDTO) o; |
|||
return badgeId.equals(that.badgeId) && |
|||
badgeIcon.equals(that.badgeIcon) && |
|||
badgeName.equals(that.badgeName); |
|||
} |
|||
|
|||
@Override |
|||
public int hashCode() { |
|||
return Objects.hash(badgeId, badgeIcon, badgeName); |
|||
} |
|||
} |
@ -0,0 +1,28 @@ |
|||
package com.epmet.dto.form; |
|||
|
|||
import lombok.AllArgsConstructor; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 4:18 下午 |
|||
*/ |
|||
@Data |
|||
public class UserOperListFormDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -1872129597916414712L; |
|||
|
|||
private String userId; |
|||
|
|||
private String customerId; |
|||
|
|||
public UserOperListFormDTO(String userId, String customerId) { |
|||
this.userId = userId; |
|||
this.customerId = customerId; |
|||
} |
|||
|
|||
public UserOperListFormDTO() { |
|||
} |
|||
} |
@ -0,0 +1,99 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonFormat; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.Date; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: liushaowen |
|||
* @date: 2020/11/5 17:37 |
|||
*/ |
|||
@Data |
|||
public class AdviceDetailResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 建议id |
|||
*/ |
|||
private String adviceId; |
|||
|
|||
/** |
|||
* 客户名 |
|||
*/ |
|||
private String customerName; |
|||
|
|||
/** |
|||
* 组织名 |
|||
*/ |
|||
private String agencyName; |
|||
|
|||
/** |
|||
* 网格名 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* 注册电话 |
|||
*/ |
|||
private String regPhone; |
|||
|
|||
/** |
|||
* 意见类型 |
|||
*/ |
|||
private String adviceType; |
|||
|
|||
/** |
|||
* 提建议人姓名 |
|||
*/ |
|||
private String userName; |
|||
|
|||
/** |
|||
* 建议内容 |
|||
*/ |
|||
private String adviceContent; |
|||
|
|||
/** |
|||
* 填写的电话 |
|||
*/ |
|||
private String phone; |
|||
|
|||
/** |
|||
* 建议时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date adviceTime; |
|||
|
|||
/** |
|||
* 回复内容 |
|||
*/ |
|||
private String replyContent; |
|||
|
|||
/** |
|||
* 回复时间 |
|||
*/ |
|||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
|||
private Date replyTime; |
|||
|
|||
/** |
|||
* 回复人姓名 |
|||
*/ |
|||
private String replyUserName; |
|||
|
|||
/** |
|||
* 建议图片列表 |
|||
*/ |
|||
private List<String> imgList; |
|||
|
|||
/** |
|||
* 政府回应图片 |
|||
*/ |
|||
private List<String> govImgList; |
|||
|
|||
/** |
|||
* 政府回应文字 |
|||
*/ |
|||
private String govContent; |
|||
} |
@ -0,0 +1,40 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/4 4:54 下午 |
|||
*/ |
|||
@Data |
|||
public class AuthFieldResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 1856490232343125419L; |
|||
|
|||
/** |
|||
* 中文名 |
|||
*/ |
|||
private String cnName; |
|||
|
|||
/** |
|||
* 英文名【字段】 |
|||
*/ |
|||
private String enName; |
|||
|
|||
/** |
|||
* 字段类型,text:文本,img:图片 |
|||
*/ |
|||
private String fieldType; |
|||
|
|||
/** |
|||
* 是否必填 |
|||
*/ |
|||
private String isRequired; |
|||
|
|||
/** |
|||
* 排序 |
|||
*/ |
|||
private Integer sort; |
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/5 10:57 |
|||
*/ |
|||
@Data |
|||
public class BadgeAuditRecordResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 6004101838042628105L; |
|||
/** |
|||
* 徽章Id |
|||
*/ |
|||
private String badgeId; |
|||
/** |
|||
* 徽章名称 |
|||
*/ |
|||
private String badgeName; |
|||
/** |
|||
* 徽章图标url |
|||
*/ |
|||
private String badgeIcon; |
|||
/** |
|||
* 用户Id |
|||
*/ |
|||
private String userId; |
|||
/** |
|||
* 用户名 |
|||
*/ |
|||
private String userName; |
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Long createTime; |
|||
/** |
|||
* 用户名 |
|||
*/ |
|||
private String auditStatus; |
|||
} |
@ -0,0 +1,43 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/5 9:34 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class BadgeAuditingResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -361914591952483084L; |
|||
/** |
|||
* 徽章Id |
|||
*/ |
|||
private String badgeId; |
|||
/** |
|||
* 徽章名称 |
|||
*/ |
|||
private String badgeName; |
|||
/** |
|||
* 徽章图标url |
|||
*/ |
|||
private String badgeIcon; |
|||
/** |
|||
* 用户Id |
|||
*/ |
|||
private String userId; |
|||
/** |
|||
* 用户名 |
|||
*/ |
|||
private String userName; |
|||
/** |
|||
* 创建时间 |
|||
*/ |
|||
private Long createTime; |
|||
|
|||
} |
@ -0,0 +1,26 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
import java.io.Serializable; |
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/4 14:17 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class BadgeDetailResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 7698898330565297328L; |
|||
|
|||
private String badgeId; |
|||
private String badgeName; |
|||
private String badgeIcon; |
|||
private String badgeStatus; |
|||
private List<String> certificationTypes; |
|||
|
|||
} |
@ -0,0 +1,31 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
import lombok.NoArgsConstructor; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/3 16:58 |
|||
*/ |
|||
@NoArgsConstructor |
|||
@Data |
|||
public class BadgeListResultDTO { |
|||
|
|||
/** |
|||
* 徽章Id |
|||
*/ |
|||
private String badgeId; |
|||
/** |
|||
* 徽章名称 |
|||
*/ |
|||
private String badgeName; |
|||
/** |
|||
* 徽章图标url |
|||
*/ |
|||
private String badgeIcon; |
|||
/** |
|||
* 徽章状态 上线:online;下线:offline; |
|||
*/ |
|||
private String badgeStatus; |
|||
} |
@ -0,0 +1,65 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/4 3:51 下午 |
|||
*/ |
|||
@Data |
|||
public class CertificationDetailResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = 6538150132908927308L; |
|||
|
|||
/** |
|||
* 姓 |
|||
*/ |
|||
private String surname; |
|||
|
|||
/** |
|||
* 名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 身份证号 |
|||
*/ |
|||
private String idCard; |
|||
|
|||
/** |
|||
* 是否认证 yes 认证 no 已认证 |
|||
*/ |
|||
private String isCertificated; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 认证图片地址 |
|||
*/ |
|||
private String certificationImg; |
|||
|
|||
/** |
|||
* 备注 |
|||
*/ |
|||
private String remark; |
|||
|
|||
/** |
|||
* 审核结果 |
|||
*/ |
|||
private String authResult; |
|||
|
|||
/** |
|||
* 驳回原因 |
|||
*/ |
|||
private String authReason; |
|||
|
|||
/** |
|||
* 审核记录ID |
|||
*/ |
|||
private String recordId; |
|||
} |
@ -0,0 +1,44 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @description: |
|||
* @author: liushaowen |
|||
* @date: 2020/11/5 17:26 |
|||
*/ |
|||
@Data |
|||
public class OperAdviceListResultDTO implements Serializable { |
|||
private static final long serialVersionUID = 1L; |
|||
/** |
|||
* 客户名 |
|||
*/ |
|||
private String customerName; |
|||
|
|||
/** |
|||
* 建议id |
|||
*/ |
|||
private String adviceId; |
|||
|
|||
/** |
|||
* 是否回复 0否1是 |
|||
*/ |
|||
private String isReply; |
|||
|
|||
/** |
|||
* 回复内容 |
|||
*/ |
|||
private String adviceContent; |
|||
|
|||
/** |
|||
* 手机 空为* |
|||
*/ |
|||
private String phone; |
|||
|
|||
/** |
|||
* 建议类型 空为* |
|||
*/ |
|||
private String adviceType; |
|||
} |
@ -0,0 +1,49 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 11:08 上午 |
|||
*/ |
|||
@Data |
|||
public class UserBadgeListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6542233940679158922L; |
|||
|
|||
/** |
|||
* 徽章ID |
|||
*/ |
|||
private String badgeId; |
|||
|
|||
/** |
|||
* 徽章图片地址 |
|||
*/ |
|||
private String badgeIcon; |
|||
|
|||
/** |
|||
* 徽章是否点亮 |
|||
*/ |
|||
private String isOpened; |
|||
|
|||
private String badgeType; |
|||
|
|||
@JsonIgnore |
|||
private String customerId; |
|||
@JsonIgnore |
|||
private String badgeName; |
|||
@JsonIgnore |
|||
private String fixationBadgeType; |
|||
@JsonIgnore |
|||
private Boolean status; |
|||
|
|||
public UserBadgeListResultDTO() { |
|||
this.badgeId = ""; |
|||
this.badgeIcon = ""; |
|||
this.isOpened = "0"; |
|||
this.status = false; |
|||
} |
|||
} |
@ -0,0 +1,67 @@ |
|||
package com.epmet.dto.result; |
|||
|
|||
import com.fasterxml.jackson.annotation.JsonIgnore; |
|||
import lombok.Data; |
|||
|
|||
import java.io.Serializable; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 4:20 下午 |
|||
*/ |
|||
@Data |
|||
public class UserOperListResultDTO implements Serializable { |
|||
|
|||
private static final long serialVersionUID = -6185696177370545937L; |
|||
|
|||
/** |
|||
* 徽章ID |
|||
*/ |
|||
private String badgeId; |
|||
|
|||
/** |
|||
* 徽章名字 |
|||
*/ |
|||
private String badgeName; |
|||
|
|||
/** |
|||
* 点亮状态 yes:已点亮,no:未点亮 |
|||
*/ |
|||
private String isLighted; |
|||
|
|||
/** |
|||
* 是否认证 yes 认证 no 已认证 |
|||
*/ |
|||
private String isCertificated; |
|||
|
|||
/** |
|||
* 徽章图片地址 |
|||
*/ |
|||
private String badgeIcon; |
|||
|
|||
/** |
|||
* 是否被驳回 true:已驳回,false:未驳回 |
|||
*/ |
|||
private Boolean isReject; |
|||
|
|||
/** |
|||
* 徽章类型:党员徽章;party,无:none |
|||
*/ |
|||
private String badgeType; |
|||
|
|||
@JsonIgnore |
|||
private String customerId; |
|||
@JsonIgnore |
|||
private String isOpened; |
|||
@JsonIgnore |
|||
private String auditStatus; |
|||
|
|||
public UserOperListResultDTO() { |
|||
this.badgeId = ""; |
|||
this.badgeName = ""; |
|||
this.isLighted = "no"; |
|||
this.isCertificated = "no"; |
|||
this.badgeIcon = ""; |
|||
this.isReject = false; |
|||
} |
|||
} |
@ -0,0 +1,23 @@ |
|||
package com.epmet.constant; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/9 10:32 |
|||
*/ |
|||
public interface BadgeMessageConstant { |
|||
/** |
|||
* 消息标题 |
|||
*/ |
|||
String TITLE = "您有一条认证消息"; |
|||
|
|||
|
|||
/** |
|||
* 审核通过消息模板 |
|||
*/ |
|||
String APPROVED_MSG = "您好,您提交的%s申请已通过,请查看。"; |
|||
/** |
|||
* 审核驳回消息模板 |
|||
*/ |
|||
String REJECTED_MSG = "您好,您提交的%s申请,由于%s,已被驳回。"; |
|||
} |
@ -0,0 +1,7 @@ |
|||
package com.epmet.constant; |
|||
|
|||
public interface UserAdviceConstant { |
|||
String GOV_TYPE_TEXT = "政府业务建议"; |
|||
|
|||
String SOFTWARE_TYPE_TEXT = "软件功能及体验问题"; |
|||
} |
@ -0,0 +1,153 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.form.AddBadgeFormDTO; |
|||
import com.epmet.dto.form.BadgeAuditFormDTO; |
|||
import com.epmet.dto.form.BadgeFormDTO; |
|||
import com.epmet.dto.form.EditBadgeFormDTO; |
|||
import com.epmet.dto.result.BadgeAuditRecordResultDTO; |
|||
import com.epmet.dto.result.BadgeAuditingResultDTO; |
|||
import com.epmet.dto.result.BadgeDetailResultDTO; |
|||
import com.epmet.dto.result.BadgeListResultDTO; |
|||
import com.epmet.service.BadgeService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @author zhaoqifeng |
|||
* @dscription |
|||
* @date 2020/11/3 16:09 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("badge") |
|||
public class BadgeController { |
|||
@Autowired |
|||
private BadgeService badgeService; |
|||
|
|||
/** |
|||
* 徽章列表 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 14:27 |
|||
* @param tokenDto |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.BadgeListResultDTO>> |
|||
*/ |
|||
@PostMapping("list") |
|||
public Result<List<BadgeListResultDTO>> list(@LoginUser TokenDto tokenDto) { |
|||
List<BadgeListResultDTO> result = badgeService.getList(tokenDto.getCustomerId()); |
|||
return new Result<List<BadgeListResultDTO>>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 添加徽章 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 14:27 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
*/ |
|||
@PostMapping("add") |
|||
public Result add(@LoginUser TokenDto tokenDto, @RequestBody AddBadgeFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
badgeService.add(tokenDto, formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 徽章详情 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 14:27 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<com.epmet.dto.result.BadgeDetailResultDTO> |
|||
*/ |
|||
@PostMapping("detail") |
|||
public Result<BadgeDetailResultDTO> detail(@LoginUser TokenDto tokenDto, @RequestBody BadgeFormDTO formDTO) { |
|||
BadgeDetailResultDTO result = badgeService.detail(tokenDto, formDTO); |
|||
return new Result<BadgeDetailResultDTO>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 修改 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 15:32 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
*/ |
|||
@PostMapping("edit") |
|||
public Result edit(@LoginUser TokenDto tokenDto, @RequestBody EditBadgeFormDTO formDTO) { |
|||
ValidatorUtils.validateEntity(formDTO); |
|||
badgeService.edit(tokenDto, formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* 删除徽章 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 15:34 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
*/ |
|||
@PostMapping("delete") |
|||
public Result delete(@LoginUser TokenDto tokenDto, @RequestBody BadgeFormDTO formDTO) { |
|||
badgeService.deleteBadge(tokenDto, formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("test-cache") |
|||
public Result testCache(){ |
|||
badgeService.testCache(); |
|||
return new Result(); |
|||
} |
|||
/** |
|||
* 待审核列表 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/5 9:51 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.BadgeAuditingResultDTO>> |
|||
*/ |
|||
@PostMapping("auditinglist") |
|||
public Result<List<BadgeAuditingResultDTO>> auditingList(@LoginUser TokenDto tokenDto, @RequestBody BadgeFormDTO formDTO) { |
|||
List<BadgeAuditingResultDTO> result = badgeService.auditingList(tokenDto, formDTO); |
|||
return new Result<List<BadgeAuditingResultDTO>>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 审核历史列表 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/5 10:59 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result<java.util.List<com.epmet.dto.result.BadgeAuditRecordResultDTO>> |
|||
*/ |
|||
@PostMapping("auditrecord") |
|||
public Result<List<BadgeAuditRecordResultDTO>> auditRecord(@LoginUser TokenDto tokenDto, @RequestBody BadgeFormDTO formDTO) { |
|||
List<BadgeAuditRecordResultDTO> result = badgeService.auditRecord(tokenDto, formDTO); |
|||
return new Result<List<BadgeAuditRecordResultDTO>>().ok(result); |
|||
} |
|||
|
|||
/** |
|||
* 审核 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/5 11:09 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.commons.tools.utils.Result |
|||
*/ |
|||
@PostMapping("audit") |
|||
public Result audit(@LoginUser TokenDto tokenDto, @RequestBody BadgeAuditFormDTO formDTO) { |
|||
badgeService.audit(tokenDto, formDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,124 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.exception.RenException; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.user.LoginUserUtil; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.UserAdviceDTO; |
|||
import com.epmet.dto.form.AdviceListFormDTO; |
|||
import com.epmet.dto.form.ReplyAdviceFormDTO; |
|||
import com.epmet.dto.result.AdviceDetailResultDTO; |
|||
import com.epmet.excel.UserAdviceExcel; |
|||
import com.epmet.service.UserAdviceService; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* user_advice |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-06 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("useradvice") |
|||
public class UserAdviceController { |
|||
|
|||
@Autowired |
|||
private UserAdviceService userAdviceService; |
|||
|
|||
@Autowired |
|||
private LoginUserUtil loginUserUtil; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<UserAdviceDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<UserAdviceDTO> page = userAdviceService.page(params); |
|||
return new Result<PageData<UserAdviceDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<UserAdviceDTO> get(@PathVariable("id") String id){ |
|||
UserAdviceDTO data = userAdviceService.get(id); |
|||
return new Result<UserAdviceDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody UserAdviceDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
userAdviceService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody UserAdviceDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
userAdviceService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
userAdviceService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<UserAdviceDTO> list = userAdviceService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, UserAdviceExcel.class); |
|||
} |
|||
|
|||
@PostMapping("replyadvice") |
|||
public Result replyAdvice(@RequestBody ReplyAdviceFormDTO dto){ |
|||
ValidatorUtils.validateEntity(dto); |
|||
userAdviceService.replyAdvice(dto,loginUserUtil.getLoginUserId()); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PostMapping("advicedetail") |
|||
public Result adviceDetail(String adviceId){ |
|||
if (StringUtils.isBlank(adviceId)){ |
|||
throw new RenException("adviceId不能为空"); |
|||
} |
|||
return new Result<AdviceDetailResultDTO>().ok(userAdviceService.adviceDetail(adviceId)); |
|||
} |
|||
|
|||
@PostMapping("advicelist") |
|||
public Result<PageData<UserAdviceDTO>> adviceList(AdviceListFormDTO dto){ |
|||
ValidatorUtils.validateEntity(dto); |
|||
PageData<UserAdviceDTO> page = userAdviceService.adviceList(dto); |
|||
return new Result<PageData<UserAdviceDTO>>().ok(page); |
|||
} |
|||
} |
@ -0,0 +1,94 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ExcelUtils; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.AssertUtils; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.commons.tools.validator.group.AddGroup; |
|||
import com.epmet.commons.tools.validator.group.UpdateGroup; |
|||
import com.epmet.commons.tools.validator.group.DefaultGroup; |
|||
import com.epmet.dto.UserAdviceImgDTO; |
|||
import com.epmet.excel.UserAdviceImgExcel; |
|||
import com.epmet.service.UserAdviceImgService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.*; |
|||
|
|||
import javax.servlet.http.HttpServletResponse; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
|
|||
/** |
|||
* 用户建议图片 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-04 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("useradviceimg") |
|||
public class UserAdviceImgController { |
|||
|
|||
@Autowired |
|||
private UserAdviceImgService userAdviceImgService; |
|||
|
|||
@GetMapping("page") |
|||
public Result<PageData<UserAdviceImgDTO>> page(@RequestParam Map<String, Object> params){ |
|||
PageData<UserAdviceImgDTO> page = userAdviceImgService.page(params); |
|||
return new Result<PageData<UserAdviceImgDTO>>().ok(page); |
|||
} |
|||
|
|||
@GetMapping("{id}") |
|||
public Result<UserAdviceImgDTO> get(@PathVariable("id") String id){ |
|||
UserAdviceImgDTO data = userAdviceImgService.get(id); |
|||
return new Result<UserAdviceImgDTO>().ok(data); |
|||
} |
|||
|
|||
@PostMapping |
|||
public Result save(@RequestBody UserAdviceImgDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, AddGroup.class, DefaultGroup.class); |
|||
userAdviceImgService.save(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@PutMapping |
|||
public Result update(@RequestBody UserAdviceImgDTO dto){ |
|||
//效验数据
|
|||
ValidatorUtils.validateEntity(dto, UpdateGroup.class, DefaultGroup.class); |
|||
userAdviceImgService.update(dto); |
|||
return new Result(); |
|||
} |
|||
|
|||
@DeleteMapping |
|||
public Result delete(@RequestBody String[] ids){ |
|||
//效验数据
|
|||
AssertUtils.isArrayEmpty(ids, "id"); |
|||
userAdviceImgService.delete(ids); |
|||
return new Result(); |
|||
} |
|||
|
|||
@GetMapping("export") |
|||
public void export(@RequestParam Map<String, Object> params, HttpServletResponse response) throws Exception { |
|||
List<UserAdviceImgDTO> list = userAdviceImgService.list(params); |
|||
ExcelUtils.exportExcelToTarget(response, null, list, UserAdviceImgExcel.class); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,115 @@ |
|||
package com.epmet.controller; |
|||
|
|||
import com.epmet.commons.tools.annotation.LoginUser; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.commons.tools.validator.ValidatorUtils; |
|||
import com.epmet.dto.form.*; |
|||
import com.epmet.dto.result.AuthFieldResultDTO; |
|||
import com.epmet.dto.result.CertificationDetailResultDTO; |
|||
import com.epmet.dto.result.UserBadgeListResultDTO; |
|||
import com.epmet.dto.result.UserOperListResultDTO; |
|||
import com.epmet.service.UserBadgeService; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.web.bind.annotation.PostMapping; |
|||
import org.springframework.web.bind.annotation.RequestBody; |
|||
import org.springframework.web.bind.annotation.RequestMapping; |
|||
import org.springframework.web.bind.annotation.RestController; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 11:16 上午 |
|||
*/ |
|||
@RestController |
|||
@RequestMapping("more/badge") |
|||
public class UserBadgeController { |
|||
|
|||
@Autowired |
|||
private UserBadgeService userBadgeService; |
|||
|
|||
/** |
|||
* @Description 查询已经点亮的徽章 |
|||
* @Param userBadgeListFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/3 1:33 下午 |
|||
*/ |
|||
@PostMapping("badgelist") |
|||
public Result<List<UserBadgeListResultDTO>> selectBadgeList(@RequestBody UserBadgeListFormDTO userBadgeListFormDTO){ |
|||
return new Result<List<UserBadgeListResultDTO>>().ok(userBadgeService.selectBadgeList(userBadgeListFormDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 个人中心-获取徽章可操作列表(点亮,取消,认证) |
|||
* @Param userOperListFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/3 4:42 下午 |
|||
*/ |
|||
@PostMapping("badgeoperlist") |
|||
public Result<List<UserOperListResultDTO>> selectOperList(@RequestBody UserOperListFormDTO userOperListFormDTO){ |
|||
return new Result<List<UserOperListResultDTO>>().ok(userBadgeService.selectOperList(userOperListFormDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 个人中心-提交徽章认证 |
|||
* @Param certificationAddFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 1:36 下午 |
|||
*/ |
|||
@PostMapping("authbadgerecord") |
|||
public Result authBadgeRecord(@RequestBody CertificationAddFormDTO certificationAddFormDTO){ |
|||
return userBadgeService.authBadgeRecord(certificationAddFormDTO); |
|||
} |
|||
|
|||
/** |
|||
* @Description 发送验证码 |
|||
* @Param badgeSendCodeFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 3:14 下午 |
|||
*/ |
|||
@PostMapping("badgesendcode") |
|||
public Result badgeSendCode(@RequestBody BadgeSendCodeFormDTO badgeSendCodeFormDTO){ |
|||
ValidatorUtils.validateEntity(badgeSendCodeFormDTO, BadgeSendCodeFormDTO.BadgeSendCode.class); |
|||
userBadgeService.badgeSendCode(badgeSendCodeFormDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
/** |
|||
* @Description 个人中心-获取徽章认证页面详情 |
|||
* @Param tokenDto |
|||
* @Param certificationDetailFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 4:03 下午 |
|||
*/ |
|||
@PostMapping("certification/detail") |
|||
public Result<CertificationDetailResultDTO> certificationDetail(@LoginUser TokenDto tokenDto,@RequestBody CertificationDetailFormDTO certificationDetailFormDTO){ |
|||
ValidatorUtils.validateEntity(certificationDetailFormDTO); |
|||
return new Result<CertificationDetailResultDTO>().ok(userBadgeService.certificationDetail(tokenDto,certificationDetailFormDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 个人中心-查询徽章要显示的认证信息字段 |
|||
* @Param authFieldFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 5:05 下午 |
|||
*/ |
|||
@PostMapping("authfield") |
|||
public Result<List<AuthFieldResultDTO>> authField(@RequestBody AuthFieldFormDTO authFieldFormDTO){ |
|||
ValidatorUtils.validateEntity(authFieldFormDTO, AuthFieldFormDTO.AuthField.class); |
|||
return new Result<List<AuthFieldResultDTO>>().ok(userBadgeService.authField(authFieldFormDTO)); |
|||
} |
|||
|
|||
/** |
|||
* @Description 个人中心-取消/点亮徽章 |
|||
* @Param openedOrClosedFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 5:47 下午 |
|||
*/ |
|||
@PostMapping("openedorclosed") |
|||
public Result openedOrClosed(@RequestBody OpenedOrClosedFormDTO openedOrClosedFormDTO){ |
|||
userBadgeService.openedOrClosed(openedOrClosedFormDTO); |
|||
return new Result(); |
|||
} |
|||
|
|||
} |
@ -0,0 +1,54 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.BadgeCertificationConfigEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 徽章认证配置 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-03 |
|||
*/ |
|||
@Mapper |
|||
public interface BadgeCertificationConfigDao extends BaseDao<BadgeCertificationConfigEntity> { |
|||
/** |
|||
* 获取认证信息类型 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 14:42 |
|||
* @param customerId |
|||
* @param badgeId |
|||
* @return java.util.List<java.lang.String> |
|||
*/ |
|||
List<String> getCertificationType(@Param("customerId") String customerId, @Param("badgeId") String badgeId); |
|||
|
|||
/** |
|||
* 删除认证信息 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 14:43 |
|||
* @param customerId |
|||
* @param badgeId |
|||
* @return int |
|||
*/ |
|||
int deleteConfig(@Param("customerId") String customerId, @Param("badgeId") String badgeId); |
|||
} |
@ -0,0 +1,162 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.dto.BadgeDTO; |
|||
import com.epmet.dto.result.*; |
|||
import com.epmet.entity.BadgeEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* 徽章 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-03 |
|||
*/ |
|||
@Mapper |
|||
public interface BadgeDao extends BaseDao<BadgeEntity> { |
|||
|
|||
/** |
|||
* 获取徽章列表 |
|||
* |
|||
* @param customerId |
|||
* @return java.util.List<com.epmet.dto.result.BadgeListResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/3 17:30 |
|||
*/ |
|||
List<BadgeListResultDTO> selectList(@Param("customerId") String customerId); |
|||
|
|||
/** |
|||
* 重名校验 |
|||
* |
|||
* @param customerId |
|||
* @param badgeName |
|||
* @return java.util.List<com.epmet.dto.result.BadgeListResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 10:40 |
|||
*/ |
|||
List<BadgeListResultDTO> getDuplicateName(@Param("customerId") String customerId, @Param("badgeName") String badgeName); |
|||
|
|||
/** |
|||
* 编辑重名校验 |
|||
* |
|||
* @param customerId |
|||
* @param badgeId |
|||
* @param badgeName |
|||
* @return java.util.List<com.epmet.dto.result.BadgeListResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 15:09 |
|||
*/ |
|||
List<BadgeListResultDTO> getDuplicateNameForEdit(@Param("customerId") String customerId, @Param("badgeId") String badgeId, |
|||
@Param("badgeName") String badgeName); |
|||
|
|||
/** |
|||
* 获取徽章详情 |
|||
* |
|||
* @param customerId |
|||
* @param badgeId |
|||
* @return com.epmet.dto.result.BadgeDetailResultDTO |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 14:30 |
|||
*/ |
|||
BadgeDetailResultDTO selectDetail(@Param("customerId") String customerId, @Param("badgeId") String badgeId); |
|||
|
|||
/** |
|||
* 获取徽章信息 |
|||
* |
|||
* @param customerId |
|||
* @param badgeId |
|||
* @return com.epmet.entity.BadgeEntity |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 15:16 |
|||
*/ |
|||
BadgeEntity selectBadgeInfo(@Param("customerId") String customerId, @Param("badgeId") String badgeId); |
|||
|
|||
/** |
|||
* 更新徽章信息 |
|||
* |
|||
* @param entity |
|||
* @return void |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 15:38 |
|||
*/ |
|||
void updateBadge(BadgeEntity entity); |
|||
|
|||
/** |
|||
* 删除徽章信息 |
|||
* |
|||
* @param customerId |
|||
* @param badgeId |
|||
* @return void |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 15:39 |
|||
*/ |
|||
void deleteBadge(@Param("customerId") String customerId, @Param("badgeId") String badgeId); |
|||
|
|||
|
|||
/** |
|||
* 待审核列表 |
|||
* |
|||
* @param customerId |
|||
* @param pageNo |
|||
* @param pageSize |
|||
* @param gridId |
|||
* @return java.util.List<com.epmet.dto.result.BadgeAuditingResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/5 10:01 |
|||
*/ |
|||
List<BadgeAuditingResultDTO> selectAuditingList(@Param("customerId") String customerId, @Param("pageNo") Integer pageNo, |
|||
@Param("pageSize") Integer pageSize, @Param("gridId") String gridId); |
|||
|
|||
/** |
|||
* 审核历史列表 |
|||
* |
|||
* @param customerId |
|||
* @param pageNo |
|||
* @param pageSize |
|||
* @param gridId |
|||
* @return java.util.List<com.epmet.dto.result.BadgeAuditRecordResultDTO> |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/5 11:01 |
|||
*/ |
|||
List<BadgeAuditRecordResultDTO> selectAuditRecord(@Param("customerId") String customerId, @Param("pageNo") Integer pageNo, |
|||
@Param("pageSize") Integer pageSize, @Param("gridId") String gridId); |
|||
|
|||
/** |
|||
* @param customerId |
|||
* @return java.util.List<com.epmet.dto.result.UserBadgeListResultDTO> |
|||
* @Description 查询客户的徽章 |
|||
* @author wangc |
|||
* @date 2020.11.05 15:50 |
|||
*/ |
|||
List<UserBadgeListResultDTO> selectCustomerBadgePool(@Param("customerId") String customerId); |
|||
|
|||
/** |
|||
* 插入数据 |
|||
* |
|||
* @param entity |
|||
* @return void |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/6 14:46 |
|||
*/ |
|||
void insertBadge(BadgeDTO dto); |
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.ResiUserBadgeEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 用户徽章关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-06 |
|||
*/ |
|||
@Mapper |
|||
public interface ResiUserBadgeDao extends BaseDao<ResiUserBadgeEntity> { |
|||
|
|||
} |
@ -0,0 +1,37 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.UserAdviceEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
/** |
|||
* user_advice |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-06 |
|||
*/ |
|||
@Mapper |
|||
public interface UserAdviceDao extends BaseDao<UserAdviceEntity> { |
|||
void replyAdvice(@Param("adviceId") String adviceId, |
|||
@Param("replyContent") String replyContent, |
|||
@Param("govContent") String govContent, |
|||
@Param("replyUserId") String loginUserId); |
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.UserAdviceImgEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 用户建议图片 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-04 |
|||
*/ |
|||
@Mapper |
|||
public interface UserAdviceImgDao extends BaseDao<UserAdviceImgEntity> { |
|||
|
|||
} |
@ -0,0 +1,33 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.commons.mybatis.dao.BaseDao; |
|||
import com.epmet.entity.UserBadgeCertificateRecordEntity; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
|
|||
/** |
|||
* 用户认证徽章记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-05 |
|||
*/ |
|||
@Mapper |
|||
public interface UserBadgeCertificateRecordDao extends BaseDao<UserBadgeCertificateRecordEntity> { |
|||
|
|||
} |
@ -0,0 +1,104 @@ |
|||
package com.epmet.dao; |
|||
|
|||
import com.epmet.dto.UserBadgeCertificateRecordDTO; |
|||
import com.epmet.dto.form.AuthFieldFormDTO; |
|||
import com.epmet.dto.form.OpenedOrClosedFormDTO; |
|||
import com.epmet.dto.form.UserBadgeListFormDTO; |
|||
import com.epmet.dto.result.AuthFieldResultDTO; |
|||
import com.epmet.dto.result.CertificationDetailResultDTO; |
|||
import com.epmet.dto.result.UserBadgeListResultDTO; |
|||
import com.epmet.dto.result.UserOperListResultDTO; |
|||
import org.apache.ibatis.annotations.Mapper; |
|||
import org.apache.ibatis.annotations.Param; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 1:22 下午 |
|||
*/ |
|||
@Mapper |
|||
public interface UserBadgeDao { |
|||
|
|||
/** |
|||
* @Description 查询已经点亮的徽章 |
|||
* @Param userBadgeListFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/3 1:33 下午 |
|||
*/ |
|||
List<UserBadgeListResultDTO> selectBadgeList(UserBadgeListFormDTO userBadgeListFormDTO); |
|||
|
|||
/** |
|||
* @Description 查询默认徽章和改名后的徽章 |
|||
* @Param userBadgeListFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/3 3:11 下午 |
|||
*/ |
|||
List<UserBadgeListResultDTO> selectAllBadge(@Param("customerId") String customerId); |
|||
|
|||
/** |
|||
* @Description 查询单个徽章信息 |
|||
* @Param customerId |
|||
* @Param badgeId |
|||
* @author zxc |
|||
* @date 2020/11/9 11:17 上午 |
|||
*/ |
|||
UserBadgeListResultDTO selectBadgeByBadgeId(@Param("customerId") String customerId,@Param("badgeId") String badgeId); |
|||
|
|||
/** |
|||
* @Description 查询徽章认证记录 |
|||
* @Param userId |
|||
* @author zxc |
|||
* @date 2020/11/3 5:25 下午 |
|||
*/ |
|||
List<UserOperListResultDTO> selectAuthRecord(@Param("userId")String userId); |
|||
|
|||
/** |
|||
* @Description 根据UserId查询个人徽章点亮信息 |
|||
* @Param userId |
|||
* @author zxc |
|||
* @date 2020/11/4 9:32 上午 |
|||
*/ |
|||
List<UserOperListResultDTO> selectBadgeByUserId(@Param("userId")String userId); |
|||
|
|||
/** |
|||
* @Description 用户认证徽章记录表插入 |
|||
* @Param userBadgeCertificateRecordDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 2:13 下午 |
|||
*/ |
|||
void insertUserBadgeCertificateRecord(UserBadgeCertificateRecordDTO userBadgeCertificateRecordDTO); |
|||
|
|||
/** |
|||
* @Description 更新认证徽章记录最新 |
|||
* @Param badgeId |
|||
* @Param userId |
|||
* @author zxc |
|||
* @date 2020/11/4 2:16 下午 |
|||
*/ |
|||
void updateCertificateRecordIsLast(@Param("badgeId")String badgeId,@Param("userId")String userId); |
|||
|
|||
/** |
|||
* @Description 查询单个徽章的认证记录 |
|||
* @Param userId |
|||
* @Param badgeId |
|||
* @author zxc |
|||
* @date 2020/11/4 4:09 下午 |
|||
*/ |
|||
CertificationDetailResultDTO selectBadgeAuthRecord(@Param("userId")String userId, @Param("badgeId")String badgeId); |
|||
|
|||
/** |
|||
* @Description 个人中心-查询徽章要显示的认证信息字段 |
|||
* @Param authFieldFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 5:05 下午 |
|||
*/ |
|||
List<AuthFieldResultDTO> selectAuthField(AuthFieldFormDTO authFieldFormDTO); |
|||
/** |
|||
* @Description 个人中心-取消/点亮徽章 |
|||
* @Param openedOrClosedFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 6:04 下午 |
|||
*/ |
|||
void updateIsOpen(OpenedOrClosedFormDTO openedOrClosedFormDTO); |
|||
} |
@ -0,0 +1,56 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 徽章认证配置 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-03 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("badge_certification_config") |
|||
public class BadgeCertificationConfigEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id 默认配置id:default |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 徽章ID |
|||
*/ |
|||
private String badgeId; |
|||
|
|||
/** |
|||
* 认证信息类型 手机号:mobile;全名:fullname;身份证:idcard;认证证件: certificate;认证说明(备注):remark |
|||
*/ |
|||
private String certificationType; |
|||
|
|||
} |
@ -0,0 +1,66 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 徽章 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-03 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("badge") |
|||
public class BadgeEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id 默认配置id:default |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 徽章名称 |
|||
*/ |
|||
private String badgeName; |
|||
|
|||
/** |
|||
* 徽章图标url |
|||
*/ |
|||
private String badgeIcon; |
|||
|
|||
/** |
|||
* 固有徽章类型 前端页面跳转标识,党员徽章:party;无:none |
|||
*/ |
|||
private String fixationBadgeType; |
|||
|
|||
/** |
|||
* 状态 上线:online;下线:offline; |
|||
*/ |
|||
private String badgeStatus; |
|||
|
|||
} |
@ -0,0 +1,71 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 用户徽章关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-06 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("resi_user_badge") |
|||
public class ResiUserBadgeEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id 默认配置id:default |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 用户注册网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 徽章ID |
|||
*/ |
|||
private String badgeId; |
|||
|
|||
/** |
|||
* 是否开启(点亮) 1:点亮;0:未点亮 |
|||
*/ |
|||
private Integer isOpened; |
|||
|
|||
/** |
|||
* 认证(审核)状态 待审核:auditing;审核通过:pass;驳回:rejected; |
|||
*/ |
|||
private String certificationAutidStatus; |
|||
|
|||
} |
@ -0,0 +1,126 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* user_advice |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-06 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("user_advice") |
|||
public class UserAdviceEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户ID |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 客户名 |
|||
*/ |
|||
private String customerName; |
|||
|
|||
/** |
|||
* 组织ID |
|||
*/ |
|||
private String agencyId; |
|||
|
|||
/** |
|||
* 组织名 |
|||
*/ |
|||
private String agencyName; |
|||
|
|||
/** |
|||
* 网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 网格名 |
|||
*/ |
|||
private String gridName; |
|||
|
|||
/** |
|||
* userid |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 用户姓名 |
|||
*/ |
|||
private String userName; |
|||
|
|||
/** |
|||
* 用户注册手机号 |
|||
*/ |
|||
private String regPhone; |
|||
|
|||
/** |
|||
* 建议描述 |
|||
*/ |
|||
private String adviceContent; |
|||
|
|||
/** |
|||
* 填写手机号 |
|||
*/ |
|||
private String phone; |
|||
|
|||
/** |
|||
* 问题分类(gov政府software软件,逗号分隔) |
|||
*/ |
|||
private String adviceType; |
|||
|
|||
/** |
|||
* 回复内容 |
|||
*/ |
|||
private String replyContent; |
|||
|
|||
/** |
|||
* 回复人id |
|||
*/ |
|||
private String replyUserId; |
|||
|
|||
/** |
|||
* 回复人姓名 |
|||
*/ |
|||
private String replyUserName; |
|||
|
|||
/** |
|||
* 回复时间 |
|||
*/ |
|||
private Date replyTime; |
|||
|
|||
/** |
|||
* 政府存证文字 |
|||
*/ |
|||
private String govContent; |
|||
|
|||
} |
@ -0,0 +1,56 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 用户建议图片 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-04 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("user_advice_img") |
|||
public class UserAdviceImgEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 建议id |
|||
*/ |
|||
private String adviceId; |
|||
|
|||
/** |
|||
* 类型,resi为用户上传,oper为运营上传 |
|||
*/ |
|||
private String type; |
|||
|
|||
/** |
|||
* 图片url |
|||
*/ |
|||
private String imgUrl; |
|||
|
|||
} |
@ -0,0 +1,116 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.entity; |
|||
|
|||
import com.baomidou.mybatisplus.annotation.TableName; |
|||
|
|||
import com.epmet.commons.mybatis.entity.BaseEpmetEntity; |
|||
import lombok.Data; |
|||
import lombok.EqualsAndHashCode; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 用户认证徽章记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-05 |
|||
*/ |
|||
@Data |
|||
@EqualsAndHashCode(callSuper=false) |
|||
@TableName("user_badge_certificate_record") |
|||
public class UserBadgeCertificateRecordEntity extends BaseEpmetEntity { |
|||
|
|||
private static final long serialVersionUID = 1L; |
|||
|
|||
/** |
|||
* 客户Id |
|||
*/ |
|||
private String customerId; |
|||
|
|||
/** |
|||
* 用户注册网格ID |
|||
*/ |
|||
private String gridId; |
|||
|
|||
/** |
|||
* 用户ID |
|||
*/ |
|||
private String userId; |
|||
|
|||
/** |
|||
* 徽章ID |
|||
*/ |
|||
private String badgeId; |
|||
|
|||
/** |
|||
* 姓 |
|||
*/ |
|||
private String surname; |
|||
|
|||
/** |
|||
* 名 |
|||
*/ |
|||
private String name; |
|||
|
|||
/** |
|||
* 手机号 |
|||
*/ |
|||
private String mobile; |
|||
|
|||
/** |
|||
* 身份证号 网格内去重 |
|||
*/ |
|||
private String idNum; |
|||
|
|||
/** |
|||
* 认证证件图片 |
|||
*/ |
|||
private String certificationImg; |
|||
|
|||
/** |
|||
* 认证说明(备注) |
|||
*/ |
|||
private String remaek; |
|||
|
|||
/** |
|||
* 审核状态 approved:审核通过,rejected:审核驳回;auditing:审核中 |
|||
*/ |
|||
private String auditStatus; |
|||
|
|||
/** |
|||
* 审核意见 |
|||
*/ |
|||
private String auditRemark; |
|||
|
|||
/** |
|||
* 审核人 审核人Id |
|||
*/ |
|||
private String staffId; |
|||
|
|||
/** |
|||
* 审核时间 |
|||
*/ |
|||
private Date auditTime; |
|||
|
|||
/** |
|||
* 是否是最新纪录:yes:最新纪录,no:非最新纪录 |
|||
*/ |
|||
private String isLast; |
|||
|
|||
} |
@ -0,0 +1,107 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* user_advice |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-06 |
|||
*/ |
|||
@Data |
|||
public class UserAdviceExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "客户ID") |
|||
private String customerId; |
|||
|
|||
@Excel(name = "客户名") |
|||
private String customerName; |
|||
|
|||
@Excel(name = "组织ID") |
|||
private String agencyId; |
|||
|
|||
@Excel(name = "组织名") |
|||
private String agencyName; |
|||
|
|||
@Excel(name = "网格ID") |
|||
private String gridId; |
|||
|
|||
@Excel(name = "网格名") |
|||
private String gridName; |
|||
|
|||
@Excel(name = "userid") |
|||
private String userId; |
|||
|
|||
@Excel(name = "用户姓名") |
|||
private String userName; |
|||
|
|||
@Excel(name = "用户注册手机号") |
|||
private String regPhone; |
|||
|
|||
@Excel(name = "建议描述") |
|||
private String adviceContent; |
|||
|
|||
@Excel(name = "填写手机号") |
|||
private String phone; |
|||
|
|||
@Excel(name = "问题分类(gov政府software软件,逗号分隔)") |
|||
private String adviceType; |
|||
|
|||
@Excel(name = "回复内容") |
|||
private String replyContent; |
|||
|
|||
@Excel(name = "回复人id") |
|||
private String replyUserId; |
|||
|
|||
@Excel(name = "回复人姓名") |
|||
private String replyUserName; |
|||
|
|||
@Excel(name = "回复时间") |
|||
private Date replyTime; |
|||
|
|||
@Excel(name = "政府存证文字") |
|||
private String govContent; |
|||
|
|||
@Excel(name = "删除标志") |
|||
private String delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
@ -0,0 +1,65 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.excel; |
|||
|
|||
import cn.afterturn.easypoi.excel.annotation.Excel; |
|||
import lombok.Data; |
|||
|
|||
import java.util.Date; |
|||
|
|||
/** |
|||
* 用户建议图片 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-04 |
|||
*/ |
|||
@Data |
|||
public class UserAdviceImgExcel { |
|||
|
|||
@Excel(name = "主键") |
|||
private String id; |
|||
|
|||
@Excel(name = "建议id") |
|||
private String adviceId; |
|||
|
|||
@Excel(name = "类型") |
|||
private String type; |
|||
|
|||
@Excel(name = "图片url") |
|||
private String imgUrl; |
|||
|
|||
@Excel(name = "删除标志") |
|||
private String delFlag; |
|||
|
|||
@Excel(name = "乐观锁") |
|||
private Integer revision; |
|||
|
|||
@Excel(name = "创建人") |
|||
private String createdBy; |
|||
|
|||
@Excel(name = "创建时间") |
|||
private Date createdTime; |
|||
|
|||
@Excel(name = "更新人") |
|||
private String updatedBy; |
|||
|
|||
@Excel(name = "更新时间") |
|||
private Date updatedTime; |
|||
|
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* 用户建议图片 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-04 |
|||
*/ |
|||
@Component |
|||
public class UserAdviceImgRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,47 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.redis; |
|||
|
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
/** |
|||
* user_advice |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-06 |
|||
*/ |
|||
@Component |
|||
public class UserAdviceRedis { |
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
|
|||
public void delete(Object[] ids) { |
|||
|
|||
} |
|||
|
|||
public void set(){ |
|||
|
|||
} |
|||
|
|||
public String get(String id){ |
|||
return null; |
|||
} |
|||
|
|||
} |
@ -0,0 +1,150 @@ |
|||
package com.epmet.redis; |
|||
|
|||
|
|||
|
|||
import com.alibaba.fastjson.JSON; |
|||
import com.epmet.commons.tools.constant.NumConstant; |
|||
import com.epmet.commons.tools.redis.RedisUtils; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.constant.BadgeConstant; |
|||
import com.epmet.constant.UserRedisKeys; |
|||
import com.epmet.dao.BadgeDao; |
|||
import com.epmet.dto.form.UserBadgeUnitFormDTO; |
|||
import com.epmet.dto.result.UserBadgeListResultDTO; |
|||
import com.epmet.service.UserBadgeService; |
|||
import lombok.extern.slf4j.Slf4j; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Component; |
|||
|
|||
import java.util.List; |
|||
import java.util.Optional; |
|||
|
|||
import static com.epmet.commons.tools.redis.RedisUtils.MINUTE_THIRTY_EXPIRE; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 2:21 下午 |
|||
*/ |
|||
@Component |
|||
@Slf4j |
|||
public class UserBadgeRedis { |
|||
|
|||
@Autowired |
|||
private RedisUtils redisUtils; |
|||
@Autowired |
|||
private BadgeDao badgeDao; |
|||
@Autowired |
|||
private UserBadgeService badgeService; |
|||
|
|||
/** |
|||
* @Description 获取客户徽章信息 |
|||
* @Param customerId |
|||
* @author zxc |
|||
* @date 2020/11/3 2:50 下午 |
|||
*/ |
|||
public Object getCustomerBadge(String customerId) { |
|||
Object userBadge = redisUtils.hGet(BadgeConstant.BADGE_KEY + customerId, BadgeConstant.BADGE); |
|||
return userBadge; |
|||
} |
|||
|
|||
/** |
|||
* @Description 存放客户徽章信息 |
|||
* @Param userBadge |
|||
* @Param customerId |
|||
* @author zxc |
|||
* @date 2020/11/3 2:51 下午 |
|||
*/ |
|||
public void setCustomerBadge(List<UserBadgeListResultDTO> userBadge, String customerId) { |
|||
redisUtils.hSet(BadgeConstant.BADGE_KEY + customerId, BadgeConstant.BADGE, JSON.toJSON(userBadge).toString(), -1); |
|||
} |
|||
|
|||
/** |
|||
* @Description 删除客户徽章信息 |
|||
* @Param customerId |
|||
* @author zxc |
|||
* @date 2020/11/5 3:06 下午 |
|||
*/ |
|||
public void delCustomerBadge(String customerId) { |
|||
redisUtils.hDel(BadgeConstant.BADGE_KEY + customerId, BadgeConstant.BADGE); |
|||
} |
|||
|
|||
/** |
|||
* @Description 存放徽章审核 手机验证码 |
|||
* @Param mobile |
|||
* @author zxc |
|||
* @date 2020/11/5 10:30 上午 |
|||
*/ |
|||
public void saveBadgeSmsCode(String mobile, String smsCode) { |
|||
String smsCodeKey = BadgeConstant.SMS_CODE_KEY + mobile; |
|||
redisUtils.set(smsCodeKey, smsCode, MINUTE_THIRTY_EXPIRE); |
|||
} |
|||
|
|||
/** |
|||
* @Description 获取徽章审核 手机验证码 |
|||
* @Param mobile |
|||
* @author zxc |
|||
* @date 2020/11/5 10:30 上午 |
|||
*/ |
|||
public String getBadgeSmsCode(String mobile) { |
|||
String smsCodeKey = BadgeConstant.SMS_CODE_KEY + mobile; |
|||
String smsCode = (String) redisUtils.get(smsCodeKey); |
|||
return smsCode; |
|||
} |
|||
|
|||
/** |
|||
* @param userId |
|||
* @return java.util.List<com.epmet.dto.form.UserBadgeUnitFormDTO> |
|||
* @Description 获取用户的全部勋章信息(点亮的 、 排序从前到后) |
|||
* @author wangc |
|||
* @date 2020.11.05 13:26 |
|||
*/ |
|||
public List<UserBadgeUnitFormDTO> obtainUserBadge2List(String userId,String customerId) { |
|||
//TODO 补偿
|
|||
return redisUtils.lrange(UserRedisKeys.getResiUserBadgeKey(customerId,userId), NumConstant.ZERO, NumConstant.ONE_NEG, UserBadgeUnitFormDTO.class); |
|||
} |
|||
|
|||
/** |
|||
* 用户点亮或取消徽章 |
|||
* @param |
|||
* @return int |
|||
* @Description 入栈时使用lpush 出栈时使用lrem |
|||
* @author wangc |
|||
* @date 2020.11.05 13:37 |
|||
*/ |
|||
public long pushOrRemoveUserBadge4List(String userId, String badgeId, String customerId) { |
|||
List<UserBadgeUnitFormDTO> orient = obtainUserBadge2List(userId,customerId); |
|||
UserBadgeUnitFormDTO unit = null; |
|||
|
|||
if (!CollectionUtils.isEmpty(orient)) { |
|||
Optional<UserBadgeUnitFormDTO> opt = orient.stream().filter(badge -> StringUtils.equals(badgeId, badge.getBadgeId())).findFirst(); |
|||
if (opt.isPresent()) { |
|||
unit = opt.get(); |
|||
return redisUtils.lrem(UserRedisKeys.getResiUserBadgeKey(customerId, userId), NumConstant.ONE, unit); |
|||
} |
|||
} |
|||
|
|||
//徽章池
|
|||
Object badgeObj = getCustomerBadge(customerId); |
|||
|
|||
List<UserBadgeListResultDTO> badgePool = |
|||
null == badgeObj ? badgeDao.selectCustomerBadgePool(customerId) : JSON.parseArray(badgeObj.toString(), UserBadgeListResultDTO.class); |
|||
|
|||
if (CollectionUtils.isEmpty(badgePool)) { |
|||
log.error("com.epmet.redis.UserBadgeRedis.pushOrRemoveUserBadge4List,缓存中客户{}下的徽章池为空", customerId); |
|||
return NumConstant.ZERO; |
|||
} |
|||
|
|||
if (null == unit) { |
|||
Optional<UserBadgeListResultDTO> poolOpt = |
|||
badgePool.stream().filter(badge -> StringUtils.equals(badge.getBadgeId(), badgeId)).findFirst(); |
|||
if (poolOpt.isPresent()) unit = ConvertUtils.sourceToTarget(poolOpt.get(), UserBadgeUnitFormDTO.class); |
|||
else return NumConstant.ZERO; |
|||
} |
|||
redisUtils.leftPush(UserRedisKeys.getResiUserBadgeKey(customerId, userId), unit); |
|||
return NumConstant.ONE; |
|||
} |
|||
|
|||
} |
|||
|
@ -0,0 +1,127 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.BadgeCertificationConfigDTO; |
|||
import com.epmet.entity.BadgeCertificationConfigEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 徽章认证配置 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-03 |
|||
*/ |
|||
public interface BadgeCertificationConfigService extends BaseService<BadgeCertificationConfigEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<BadgeCertificationConfigDTO> |
|||
* @author generator |
|||
* @date 2020-11-03 |
|||
*/ |
|||
PageData<BadgeCertificationConfigDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<BadgeCertificationConfigDTO> |
|||
* @author generator |
|||
* @date 2020-11-03 |
|||
*/ |
|||
List<BadgeCertificationConfigDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return BadgeCertificationConfigDTO |
|||
* @author generator |
|||
* @date 2020-11-03 |
|||
*/ |
|||
BadgeCertificationConfigDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-03 |
|||
*/ |
|||
void save(BadgeCertificationConfigDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-03 |
|||
*/ |
|||
void update(BadgeCertificationConfigDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-03 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* 获取认证信息类型 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 14:39 |
|||
* @param customerId |
|||
* @param badgeId |
|||
* @return java.util.List<java.lang.String> |
|||
*/ |
|||
List<String> getCertificationType(String customerId, String badgeId); |
|||
|
|||
/** |
|||
* 保存认证信息配置 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 15:29 |
|||
* @param customerId |
|||
* @param badgeId |
|||
* @param list |
|||
* @return void |
|||
*/ |
|||
void saveConfig(String customerId, String badgeId, List<BadgeCertificationConfigEntity> list); |
|||
|
|||
/** |
|||
* 删除配置 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 15:41 |
|||
* @param customerId |
|||
* @param badgeId |
|||
* @return void |
|||
*/ |
|||
void deleteConfig(String customerId, String badgeId); |
|||
|
|||
} |
@ -0,0 +1,185 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.dto.BadgeDTO; |
|||
import com.epmet.dto.form.AddBadgeFormDTO; |
|||
import com.epmet.dto.form.BadgeAuditFormDTO; |
|||
import com.epmet.dto.form.BadgeFormDTO; |
|||
import com.epmet.dto.form.EditBadgeFormDTO; |
|||
import com.epmet.dto.result.BadgeAuditRecordResultDTO; |
|||
import com.epmet.dto.result.BadgeAuditingResultDTO; |
|||
import com.epmet.dto.result.BadgeDetailResultDTO; |
|||
import com.epmet.dto.result.BadgeListResultDTO; |
|||
import com.epmet.entity.BadgeEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 徽章 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-03 |
|||
*/ |
|||
public interface BadgeService extends BaseService<BadgeEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<BadgeDTO> |
|||
* @author generator |
|||
* @date 2020-11-03 |
|||
*/ |
|||
PageData<BadgeDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<BadgeDTO> |
|||
* @author generator |
|||
* @date 2020-11-03 |
|||
*/ |
|||
List<BadgeDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return BadgeDTO |
|||
* @author generator |
|||
* @date 2020-11-03 |
|||
*/ |
|||
BadgeDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-03 |
|||
*/ |
|||
void save(BadgeDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-03 |
|||
*/ |
|||
void update(BadgeDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-03 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* 获取徽章列表 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/3 17:04 |
|||
* @param customerId |
|||
* @return java.util.List<com.epmet.dto.result.BadgeListResultDTO> |
|||
*/ |
|||
List<BadgeListResultDTO> getList(String customerId); |
|||
|
|||
/** |
|||
* 添加徽章 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 10:09 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return void |
|||
*/ |
|||
void add(TokenDto tokenDto, AddBadgeFormDTO formDTO); |
|||
|
|||
/** |
|||
* 徽章详情 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 14:25 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return com.epmet.dto.result.BadgeDetailResultDTO |
|||
*/ |
|||
BadgeDetailResultDTO detail(TokenDto tokenDto, BadgeFormDTO formDTO); |
|||
|
|||
/** |
|||
* 编辑徽章 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 14:28 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return void |
|||
*/ |
|||
void edit(TokenDto tokenDto, EditBadgeFormDTO formDTO); |
|||
|
|||
/** |
|||
* 删除徽章 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 15:34 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return void |
|||
*/ |
|||
void deleteBadge(TokenDto tokenDto, BadgeFormDTO formDTO); |
|||
|
|||
/** |
|||
* 待审核列表 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/5 9:50 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.dto.result.BadgeAuditingResultDTO> |
|||
*/ |
|||
List<BadgeAuditingResultDTO> auditingList(TokenDto tokenDto, BadgeFormDTO formDTO); |
|||
|
|||
/** |
|||
* 审核历史列表 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/5 10:59 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return java.util.List<com.epmet.dto.result.BadgeAuditRecordResultDTO> |
|||
*/ |
|||
List<BadgeAuditRecordResultDTO> auditRecord(TokenDto tokenDto, BadgeFormDTO formDTO); |
|||
|
|||
/** |
|||
* 审核 |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/5 11:08 |
|||
* @param tokenDto |
|||
* @param formDTO |
|||
* @return void |
|||
*/ |
|||
void audit(TokenDto tokenDto, BadgeAuditFormDTO formDTO); |
|||
|
|||
void testCache(); |
|||
} |
@ -0,0 +1,95 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.ResiUserBadgeDTO; |
|||
import com.epmet.entity.ResiUserBadgeEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 用户徽章关系表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-06 |
|||
*/ |
|||
public interface ResiUserBadgeService extends BaseService<ResiUserBadgeEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<ResiUserBadgeDTO> |
|||
* @author generator |
|||
* @date 2020-11-06 |
|||
*/ |
|||
PageData<ResiUserBadgeDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<ResiUserBadgeDTO> |
|||
* @author generator |
|||
* @date 2020-11-06 |
|||
*/ |
|||
List<ResiUserBadgeDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return ResiUserBadgeDTO |
|||
* @author generator |
|||
* @date 2020-11-06 |
|||
*/ |
|||
ResiUserBadgeDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-06 |
|||
*/ |
|||
void save(ResiUserBadgeDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-06 |
|||
*/ |
|||
void update(ResiUserBadgeDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-06 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,104 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.UserAdviceImgDTO; |
|||
import com.epmet.entity.UserAdviceImgEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 用户建议图片 |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-04 |
|||
*/ |
|||
public interface UserAdviceImgService extends BaseService<UserAdviceImgEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<UserAdviceImgDTO> |
|||
* @author generator |
|||
* @date 2020-11-04 |
|||
*/ |
|||
PageData<UserAdviceImgDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<UserAdviceImgDTO> |
|||
* @author generator |
|||
* @date 2020-11-04 |
|||
*/ |
|||
List<UserAdviceImgDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return UserAdviceImgDTO |
|||
* @author generator |
|||
* @date 2020-11-04 |
|||
*/ |
|||
UserAdviceImgDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-04 |
|||
*/ |
|||
void save(UserAdviceImgDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-04 |
|||
*/ |
|||
void update(UserAdviceImgDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-04 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Description 根据adviceId获取关联的图片 |
|||
* @param adviceId |
|||
* @return void |
|||
* @Author liushaowen |
|||
* @Date 2020/11/9 9:59 |
|||
*/ |
|||
List<UserAdviceImgEntity> getImgsByAdviceId(String adviceId); |
|||
} |
@ -0,0 +1,126 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.UserAdviceDTO; |
|||
import com.epmet.dto.form.AdviceListFormDTO; |
|||
import com.epmet.dto.form.ReplyAdviceFormDTO; |
|||
import com.epmet.dto.result.AdviceDetailResultDTO; |
|||
import com.epmet.entity.UserAdviceEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* user_advice |
|||
* |
|||
* @author qu qu@elink-cn.com |
|||
* @since v1.0.0 2020-11-06 |
|||
*/ |
|||
public interface UserAdviceService extends BaseService<UserAdviceEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<UserAdviceDTO> |
|||
* @author generator |
|||
* @date 2020-11-06 |
|||
*/ |
|||
PageData<UserAdviceDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<UserAdviceDTO> |
|||
* @author generator |
|||
* @date 2020-11-06 |
|||
*/ |
|||
List<UserAdviceDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return UserAdviceDTO |
|||
* @author generator |
|||
* @date 2020-11-06 |
|||
*/ |
|||
UserAdviceDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-06 |
|||
*/ |
|||
void save(UserAdviceDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-06 |
|||
*/ |
|||
void update(UserAdviceDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-06 |
|||
*/ |
|||
void delete(String[] ids); |
|||
|
|||
/** |
|||
* @Description 回复建议 |
|||
* @param dto |
|||
* @param loginUserId |
|||
* @return void |
|||
* @Author liushaowen |
|||
* @Date 2020/11/6 16:44 |
|||
*/ |
|||
void replyAdvice(ReplyAdviceFormDTO dto, String loginUserId); |
|||
|
|||
/** |
|||
* @Description 建议详情 |
|||
* @param adviceId |
|||
* @return com.epmet.dto.result.AdviceDetailResultDTO |
|||
* @Author liushaowen |
|||
* @Date 2020/11/6 17:19 |
|||
*/ |
|||
AdviceDetailResultDTO adviceDetail(String adviceId); |
|||
|
|||
/** |
|||
* @Description 查询建议列表 |
|||
* @param dto |
|||
* @return com.epmet.commons.tools.page.PageData<com.epmet.dto.UserAdviceDTO> |
|||
* @Author liushaowen |
|||
* @Date 2020/11/9 10:41 |
|||
*/ |
|||
PageData<UserAdviceDTO> adviceList(AdviceListFormDTO dto); |
|||
} |
@ -0,0 +1,95 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.mybatis.service.BaseService; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.dto.UserBadgeCertificateRecordDTO; |
|||
import com.epmet.entity.UserBadgeCertificateRecordEntity; |
|||
|
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 用户认证徽章记录表 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-05 |
|||
*/ |
|||
public interface UserBadgeCertificateRecordService extends BaseService<UserBadgeCertificateRecordEntity> { |
|||
|
|||
/** |
|||
* 默认分页 |
|||
* |
|||
* @param params |
|||
* @return PageData<UserBadgeCertificateRecordDTO> |
|||
* @author generator |
|||
* @date 2020-11-05 |
|||
*/ |
|||
PageData<UserBadgeCertificateRecordDTO> page(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 默认查询 |
|||
* |
|||
* @param params |
|||
* @return java.util.List<UserBadgeCertificateRecordDTO> |
|||
* @author generator |
|||
* @date 2020-11-05 |
|||
*/ |
|||
List<UserBadgeCertificateRecordDTO> list(Map<String, Object> params); |
|||
|
|||
/** |
|||
* 单条查询 |
|||
* |
|||
* @param id |
|||
* @return UserBadgeCertificateRecordDTO |
|||
* @author generator |
|||
* @date 2020-11-05 |
|||
*/ |
|||
UserBadgeCertificateRecordDTO get(String id); |
|||
|
|||
/** |
|||
* 默认保存 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-05 |
|||
*/ |
|||
void save(UserBadgeCertificateRecordDTO dto); |
|||
|
|||
/** |
|||
* 默认更新 |
|||
* |
|||
* @param dto |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-05 |
|||
*/ |
|||
void update(UserBadgeCertificateRecordDTO dto); |
|||
|
|||
/** |
|||
* 批量删除 |
|||
* |
|||
* @param ids |
|||
* @return void |
|||
* @author generator |
|||
* @date 2020-11-05 |
|||
*/ |
|||
void delete(String[] ids); |
|||
} |
@ -0,0 +1,84 @@ |
|||
package com.epmet.service; |
|||
|
|||
import com.epmet.commons.tools.security.dto.TokenDto; |
|||
import com.epmet.commons.tools.utils.Result; |
|||
import com.epmet.dto.form.*; |
|||
import com.epmet.dto.result.AuthFieldResultDTO; |
|||
import com.epmet.dto.result.CertificationDetailResultDTO; |
|||
import com.epmet.dto.result.UserBadgeListResultDTO; |
|||
import com.epmet.dto.result.UserOperListResultDTO; |
|||
|
|||
import java.util.List; |
|||
|
|||
/** |
|||
* @Author zxc |
|||
* @DateTime 2020/11/3 11:18 上午 |
|||
*/ |
|||
public interface UserBadgeService { |
|||
|
|||
/** |
|||
* @Description 查询已经点亮的徽章 |
|||
* @Param userBadgeListFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/3 1:33 下午 |
|||
*/ |
|||
List<UserBadgeListResultDTO> selectBadgeList(UserBadgeListFormDTO userBadgeListFormDTO); |
|||
|
|||
/** |
|||
* @Description 个人中心-获取徽章可操作列表(点亮,取消,认证) |
|||
* @Param userOperListFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/3 4:42 下午 |
|||
*/ |
|||
List<UserOperListResultDTO> selectOperList(UserOperListFormDTO userOperListFormDTO); |
|||
|
|||
/** |
|||
* @Description 个人中心-提交徽章认证 |
|||
* @Param certificationAddFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 1:36 下午 |
|||
*/ |
|||
Result authBadgeRecord(CertificationAddFormDTO certificationAddFormDTO); |
|||
|
|||
/** |
|||
* @Description 发送验证码 |
|||
* @Param badgeSendCodeFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 3:14 下午 |
|||
*/ |
|||
void badgeSendCode(BadgeSendCodeFormDTO badgeSendCodeFormDTO); |
|||
|
|||
/** |
|||
* @Description 个人中心-获取徽章认证页面详情 |
|||
* @Param tokenDto |
|||
* @Param certificationDetailFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 4:03 下午 |
|||
*/ |
|||
CertificationDetailResultDTO certificationDetail(TokenDto tokenDto, CertificationDetailFormDTO certificationDetailFormDTO); |
|||
|
|||
/** |
|||
* @Description 个人中心-查询徽章要显示的认证信息字段 |
|||
* @Param authFieldFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 5:05 下午 |
|||
*/ |
|||
List<AuthFieldResultDTO> authField(AuthFieldFormDTO authFieldFormDTO); |
|||
|
|||
/** |
|||
* @Description 个人中心-取消/点亮徽章 |
|||
* @Param openedOrClosedFormDTO |
|||
* @author zxc |
|||
* @date 2020/11/4 5:47 下午 |
|||
*/ |
|||
void openedOrClosed(OpenedOrClosedFormDTO openedOrClosedFormDTO); |
|||
|
|||
/** |
|||
* @Description 客户徽章缓存初始化 |
|||
* @Param customerId |
|||
* @author zxc |
|||
* @date 2020/11/5 3:12 下午 |
|||
*/ |
|||
void reloadCustomerBadge(String customerId); |
|||
|
|||
} |
@ -0,0 +1,149 @@ |
|||
/** |
|||
* Copyright 2018 人人开源 https://www.renren.io
|
|||
* <p> |
|||
* This program is free software: you can redistribute it and/or modify |
|||
* it under the terms of the GNU General Public License as published by |
|||
* the Free Software Foundation, either version 3 of the License, or |
|||
* (at your option) any later version. |
|||
* <p> |
|||
* This program is distributed in the hope that it will be useful, |
|||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
|||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|||
* GNU General Public License for more details. |
|||
* <p> |
|||
* You should have received a copy of the GNU General Public License |
|||
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|||
*/ |
|||
|
|||
package com.epmet.service.impl; |
|||
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
|||
import com.baomidou.mybatisplus.core.metadata.IPage; |
|||
import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; |
|||
import com.epmet.commons.tools.page.PageData; |
|||
import com.epmet.commons.tools.utils.ConvertUtils; |
|||
import com.epmet.commons.tools.constant.FieldConstant; |
|||
import com.epmet.dao.BadgeCertificationConfigDao; |
|||
import com.epmet.dto.BadgeCertificationConfigDTO; |
|||
import com.epmet.entity.BadgeCertificationConfigEntity; |
|||
import com.epmet.service.BadgeCertificationConfigService; |
|||
import org.apache.commons.collections4.CollectionUtils; |
|||
import org.apache.commons.lang3.StringUtils; |
|||
import org.springframework.beans.factory.annotation.Autowired; |
|||
import org.springframework.stereotype.Service; |
|||
import org.springframework.transaction.annotation.Transactional; |
|||
|
|||
import java.util.Arrays; |
|||
import java.util.List; |
|||
import java.util.Map; |
|||
|
|||
/** |
|||
* 徽章认证配置 |
|||
* |
|||
* @author generator generator@elink-cn.com |
|||
* @since v1.0.0 2020-11-03 |
|||
*/ |
|||
@Service |
|||
public class BadgeCertificationConfigServiceImpl extends BaseServiceImpl<BadgeCertificationConfigDao, BadgeCertificationConfigEntity> implements BadgeCertificationConfigService { |
|||
|
|||
|
|||
@Override |
|||
public PageData<BadgeCertificationConfigDTO> page(Map<String, Object> params) { |
|||
IPage<BadgeCertificationConfigEntity> page = baseDao.selectPage( |
|||
getPage(params, FieldConstant.CREATED_TIME, false), |
|||
getWrapper(params) |
|||
); |
|||
return getPageData(page, BadgeCertificationConfigDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
public List<BadgeCertificationConfigDTO> list(Map<String, Object> params) { |
|||
List<BadgeCertificationConfigEntity> entityList = baseDao.selectList(getWrapper(params)); |
|||
|
|||
return ConvertUtils.sourceToTarget(entityList, BadgeCertificationConfigDTO.class); |
|||
} |
|||
|
|||
private QueryWrapper<BadgeCertificationConfigEntity> getWrapper(Map<String, Object> params){ |
|||
String id = (String)params.get(FieldConstant.ID_HUMP); |
|||
|
|||
QueryWrapper<BadgeCertificationConfigEntity> wrapper = new QueryWrapper<>(); |
|||
wrapper.eq(StringUtils.isNotBlank(id), FieldConstant.ID, id); |
|||
|
|||
return wrapper; |
|||
} |
|||
|
|||
@Override |
|||
public BadgeCertificationConfigDTO get(String id) { |
|||
BadgeCertificationConfigEntity entity = baseDao.selectById(id); |
|||
return ConvertUtils.sourceToTarget(entity, BadgeCertificationConfigDTO.class); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void save(BadgeCertificationConfigDTO dto) { |
|||
BadgeCertificationConfigEntity entity = ConvertUtils.sourceToTarget(dto, BadgeCertificationConfigEntity.class); |
|||
insert(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void update(BadgeCertificationConfigDTO dto) { |
|||
BadgeCertificationConfigEntity entity = ConvertUtils.sourceToTarget(dto, BadgeCertificationConfigEntity.class); |
|||
updateById(entity); |
|||
} |
|||
|
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void delete(String[] ids) { |
|||
// 逻辑删除(@TableLogic 注解)
|
|||
baseDao.deleteBatchIds(Arrays.asList(ids)); |
|||
} |
|||
|
|||
/** |
|||
* 获取认证信息类型 |
|||
* |
|||
* @param customerId |
|||
* @param badgeId |
|||
* @return java.util.List<java.lang.String> |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 14:39 |
|||
*/ |
|||
@Override |
|||
public List<String> getCertificationType(String customerId, String badgeId) { |
|||
List<String> list = baseDao.getCertificationType(customerId, badgeId); |
|||
if (CollectionUtils.isEmpty(list)) { |
|||
list = baseDao.getCertificationType("default", badgeId); |
|||
} |
|||
return list; |
|||
} |
|||
|
|||
/** |
|||
* 保存认证信息配置 |
|||
* |
|||
* @param list |
|||
* @return void |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 15:28 |
|||
*/ |
|||
@Override |
|||
@Transactional(rollbackFor = Exception.class) |
|||
public void saveConfig(String customerId, String badgeId, List<BadgeCertificationConfigEntity> list) { |
|||
baseDao.deleteConfig(customerId, badgeId); |
|||
insertBatch(list); |
|||
} |
|||
|
|||
/** |
|||
* 删除配置 |
|||
* |
|||
* @param customerId |
|||
* @param badgeId |
|||
* @return void |
|||
* @author zhaoqifeng |
|||
* @date 2020/11/4 15:41 |
|||
*/ |
|||
@Override |
|||
public void deleteConfig(String customerId, String badgeId) { |
|||
baseDao.deleteConfig(customerId, badgeId); |
|||
} |
|||
|
|||
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue