提交 388dcfe5 作者: zhenjie

Merge branch 'develop'

......@@ -98,5 +98,10 @@ public class PilotCertificationDTO {
*/
@ApiModelProperty(value = "申请飞手的手机号", example = "18921312312")
private String phoneNum;
@ApiModelProperty(value = "审批不通过原因id", example = "1")
private Integer reasonId;
@ApiModelProperty(value = "审批不通过的原因", example = "1")
private String reason;
@ApiModelProperty(value = "飞手头像", example = "http://")
private String userImg;
}
package com.mmc.iuav.user.model.dto.dronepilot;
import com.mmc.iuav.group.Update;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
/**
* @Author small
* @Date 2023/8/3 16:25
* @Version 1.0
*/
@Builder
@Data
@AllArgsConstructor
@NoArgsConstructor
public class PilotReasonDTO {
@ApiModelProperty(value = "原因id", example = "1")
@NotNull(message = "原因id", groups = Update.class)
private Integer id;
@ApiModelProperty(value = "原因", example = "1")
private String reason;
}
......@@ -44,7 +44,7 @@ public class UserAccountQO implements Serializable {
@ApiModelProperty(value = "结束时间", example = "2023-10-18 23:59:59")
private String endTime;
@ApiModelProperty(value = "实名认证状态(0未通过,1通过)", hidden = true)
@ApiModelProperty(value = "实名认证状态(0未通过,1通过)")
private Integer realAuthStatus;
@ApiModelProperty(value = "企业认证状态(0未通过,1通过)", example = "1")
......
......@@ -27,8 +27,8 @@ public class PilotAuditStatusQO {
private Integer auditStatus;
@ApiModelProperty(value = "2不通过的原因", required = false, example = "信息不完善")
private String reason;
@ApiModelProperty(value = "原因id", required = false, example = "1")
private String reasonId;
@ApiModelProperty(value = "审批人", required = false, example = "信息不完善", hidden = true)
private Integer operatorUserId;
......
......@@ -41,4 +41,14 @@ public class ApplyTagEditVO implements Serializable {
private String remark;
@ApiModelProperty(value = "附件")
private List<AttachmentVO> attachmentList;
@ApiModelProperty(value = "公司名称")
private String companyName;
@ApiModelProperty(value = "品牌名称")
private String brandName;
@ApiModelProperty(value = "品牌logo")
private String brandLogo;
@ApiModelProperty(value = "营业执照")
private String licenseImg;
}
......@@ -3,6 +3,7 @@ package com.mmc.iuav.user.controller;
import com.mmc.iuav.group.Create;
import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.user.model.dto.RealNameAuthDTO;
import com.mmc.iuav.user.model.dto.RealNameAuthDetailDTO;
import com.mmc.iuav.user.model.qo.RealNameAuthQO;
import com.mmc.iuav.user.model.vo.RealNameAuthVO;
import com.mmc.iuav.user.service.RealNameAuthService;
......@@ -35,9 +36,9 @@ public class RealNameAuthController extends BaseController {
}
@ApiOperation(value = "实名认证详情")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = RealNameAuthDTO.class)})
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = RealNameAuthDetailDTO.class)})
@GetMapping("detail")
public ResultBody<RealNameAuthDTO> detail(@RequestParam Integer id) {
public ResultBody<RealNameAuthDetailDTO> detail(@RequestParam Integer id) {
return realNameAuthService.detail(id);
}
......@@ -54,4 +55,11 @@ public class RealNameAuthController extends BaseController {
public ResultBody listPage(@RequestBody RealNameAuthQO realNameAuthQO) {
return realNameAuthService.listPage(realNameAuthQO);
}
@ApiOperation(value = "备注修改")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("updateRemark")
public ResultBody updateRemark(@RequestParam Integer id, @RequestParam(required = false) String remark) {
return realNameAuthService.updateRealNameAuthRemark(id, remark);
}
}
......@@ -9,6 +9,7 @@ import com.mmc.iuav.user.model.dto.RoleInfoDTO;
import com.mmc.iuav.user.model.dto.dronepilot.PilotAbilityDTO;
import com.mmc.iuav.user.model.dto.dronepilot.PilotCertificationDTO;
import com.mmc.iuav.user.model.dto.dronepilot.PilotCertificationLogDTO;
import com.mmc.iuav.user.model.dto.dronepilot.PilotReasonDTO;
import com.mmc.iuav.user.model.qo.dronepilot.PilotAuditStatusQO;
import com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationLogQO;
import com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationQO;
......@@ -66,13 +67,21 @@ public class PilotCertificationController extends BaseController {
return ResultBody.success(certificationService.pilotList(param));
}
@ApiOperation(value = "小程序——详情————飞手执照及能力认证")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = PilotCertificationDTO.class)})
@PostMapping("/detailPilot")
@GetMapping("/detailPilot")
public ResultBody<PilotCertificationDTO> detailPilot(HttpServletRequest request, @RequestParam(value = "id", required = true) Integer id) {
return ResultBody.success(certificationService.detailPilot(id));
}
@ApiOperation(value = "小程序——用户详情————飞手执照及能力认证")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = PilotCertificationDTO.class)})
@GetMapping("/userDetailPilot")
public ResultBody<PilotCertificationDTO> userDetailPilot(HttpServletRequest request) {
return ResultBody.success(certificationService.userDetailPilot(this.getUserLoginInfoFromRedis(request).getUserAccountId()));
}
@ApiOperation(value = "后台管理——列表————飞手执照及能力认证")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = PilotCertificationDTO.class)})
......@@ -82,9 +91,18 @@ public class PilotCertificationController extends BaseController {
return ResultBody.success(certificationService.backListPilot(param, this.getUserLoginInfoFromRedis(request)));
}
@ApiOperation(value = "后台管理——审批不通过原因————飞手执照及能力认证")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = PilotCertificationDTO.class)})
@GetMapping("/backListReason")
public ResultBody<PilotReasonDTO> backListReason() {
return certificationService.backListReason();
}
@ApiOperation(value = "后台管理——详情————飞手执照及能力认证")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = PilotCertificationDTO.class)})
@PostMapping("/backDetailPilot")
@GetMapping("/backDetailPilot")
public ResultBody<PilotCertificationDTO> backDetailPilot(HttpServletRequest request, @RequestParam(value = "id", required = true) Integer id) {
return ResultBody.success(certificationService.detailPilot(id));
}
......
......@@ -31,4 +31,6 @@ public interface RealNameAuthDao {
List<RealNameAuthDO> listRealNameAuth(RealNameAuthQO realNameAuthQO);
RealNameAuthDO userDetail(Integer userAccountId);
void updateRealNameAuthRemark(Integer id, String remark);
}
......@@ -4,6 +4,7 @@ import com.mmc.iuav.user.entity.UserAccountDO;
import com.mmc.iuav.user.entity.dronepilot.PilotAbilityDO;
import com.mmc.iuav.user.entity.dronepilot.PilotCertificationDO;
import com.mmc.iuav.user.entity.dronepilot.PilotCertificationLogDO;
import com.mmc.iuav.user.entity.dronepilot.PilotReasonDO;
import com.mmc.iuav.user.model.qo.dronepilot.PilotAuditStatusQO;
import com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationLogQO;
import com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationQO;
......@@ -44,6 +45,8 @@ public interface PilotCertificationDao {
PilotCertificationDO detailPilot(Integer id);
PilotCertificationDO userDetailPilot(Integer userAccountId);
void updateRemark(PilotRemarkQO param);
void updateAuditStatus(PilotAuditStatusQO param);
......@@ -51,4 +54,8 @@ public interface PilotCertificationDao {
UserAccountDO selectUserAccountId(PilotAuditStatusQO param);
List<PilotCertificationLogDO> backPilotLogList(PilotCertificationLogQO param);
List<PilotReasonDO> backListReason();
PilotReasonDO selectPilotReason(String reasonId);
}
......@@ -53,7 +53,7 @@ public class RealNameAuthDO implements Serializable {
public RealNameAuthDTO buildRealNameAuthDTO() {
SimpleDateFormat cur = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
return RealNameAuthDTO.builder().id(this.id).userAccountId(this.userAccountId).uid(this.id + "")
return RealNameAuthDTO.builder().id(this.id).userAccountId(this.userAccountId).uid(this.userAccountId + "")
.nickName(this.nickName).userName(this.userName).phoneNum(this.phoneNum).idNumber(this.idNumber)
.resAddress(this.resAddress).checkStatus(this.checkStatus)
.createTime((this.createTime == null) ? null : cur.format(this.createTime)).remark(this.remark).build();
......
......@@ -82,6 +82,17 @@ public class UserApplyTagDO implements Serializable {
.lon(this.companyInfoDO == null ? null : this.companyInfoDO.getLon())
.content(this.companyInfoDO == null ? null : this.companyInfoDO.getContent())
.score(this.companyInfoDO == null ? null : this.companyInfoDO.getScore())
.attachmentList(this.attachmentList)
.content(this.companyInfoDO == null ? null : this.companyInfoDO.getContent())
.score(this.companyInfoDO == null ? null : this.companyInfoDO.getScore())
.companyName(this.companyInfoDO == null ? null : this.companyInfoDO.getCompanyName())
.brandName(this.companyInfoDO == null ? null : this.companyInfoDO.getBrandName())
.brandLogo(this.companyInfoDO == null ? null : this.companyInfoDO.getBrandLogo())
.licenseImg(this.companyInfoDO == null ? null : this.companyInfoDO.getLicenseImg())
.address(this.companyInfoDO == null ? null : this.companyInfoDO.getAddress())
.lat(this.companyInfoDO == null ? null : this.companyInfoDO.getLat())
.lon(this.companyInfoDO == null ? null : this.companyInfoDO.getLon())
.remark(this.remark)
.build();
}
}
......@@ -101,11 +101,18 @@ public class PilotCertificationDO {
private Integer age;
private Integer reasonId;
private String reason;
/**
* 申请飞手的手机号
*/
private String phoneNum;
@ApiModelProperty(value = "飞手头像", example = "http://")
private String userImg;
public PilotCertificationDO(PilotCertificationVO pilotCertificationVO, Integer userAccountId) {
this.id = pilotCertificationVO.getId();
......@@ -146,6 +153,9 @@ public class PilotCertificationDO {
.age(this.age)
.sex(this.sex)
.phoneNum(this.getPhoneNum())
.reasonId(this.reasonId)
.reason(this.reason)
.userImg(this.userImg)
.build();
}
......
package com.mmc.iuav.user.entity.dronepilot;
import com.mmc.iuav.group.Update;
import com.mmc.iuav.user.model.dto.dronepilot.PilotReasonDTO;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.NotNull;
/**
* @Author small
* @Date 2023/8/3 16:29
* @Version 1.0
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class PilotReasonDO {
@ApiModelProperty(value = "原因id", example = "1")
@NotNull(message = "原因id", groups = Update.class)
private Integer id;
@ApiModelProperty(value = "原因", example = "请提供有效期内的执照")
private String reason;
public PilotReasonDTO buildPilotReasonDTO() {
return PilotReasonDTO.builder()
.id(this.id)
.reason(this.reason)
.build();
}
}
package com.mmc.iuav.user.entity.dronepilot;
/**
* @Author small
* @Date 2023/8/4 17:05
* @Version 1.0
*/
public enum SendCertificationMessage {
COMMITTED(0, "已提交"),
ALREADY_PASSED(1, "已通过"),
NOT_PASS(2, "不通过");
private int code;
private String message;
private SendCertificationMessage(int code, String message) {
this.code = code;
this.message = message;
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
}
public String getMessage() {
return message;
}
public void setMessage(String message) {
this.message = message;
}
public static SendCertificationMessage match(int key) {
SendCertificationMessage result = null;
for (SendCertificationMessage s : values()) {
if (s.getCode() == key) {
result = s;
break;
}
}
return result;
}
public static SendCertificationMessage catchMessage(String msg) {
SendCertificationMessage result = null;
for (SendCertificationMessage s : values()) {
if (s.getMessage().equals(msg)) {
result = s;
break;
}
}
return result;
}
}
......@@ -2,6 +2,7 @@ package com.mmc.iuav.user.service;
import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.user.model.dto.RealNameAuthDTO;
import com.mmc.iuav.user.model.dto.RealNameAuthDetailDTO;
import com.mmc.iuav.user.model.qo.RealNameAuthQO;
import com.mmc.iuav.user.model.vo.RealNameAuthVO;
......@@ -12,9 +13,11 @@ import com.mmc.iuav.user.model.vo.RealNameAuthVO;
public interface RealNameAuthService {
ResultBody add(RealNameAuthVO realNameAuthVO);
ResultBody<RealNameAuthDTO> detail(Integer id);
ResultBody<RealNameAuthDetailDTO> detail(Integer id);
ResultBody listPage(RealNameAuthQO realNameAuthQO);
ResultBody<RealNameAuthDTO> listPage(RealNameAuthQO realNameAuthQO);
ResultBody<RealNameAuthDTO> userDetail(Integer userAccountId);
ResultBody updateRealNameAuthRemark(Integer id, String remark);
}
......@@ -5,6 +5,7 @@ import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.user.model.dto.LoginSuccessDTO;
import com.mmc.iuav.user.model.dto.dronepilot.PilotAbilityDTO;
import com.mmc.iuav.user.model.dto.dronepilot.PilotCertificationDTO;
import com.mmc.iuav.user.model.dto.dronepilot.PilotReasonDTO;
import com.mmc.iuav.user.model.qo.dronepilot.PilotAuditStatusQO;
import com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationLogQO;
import com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationQO;
......@@ -29,6 +30,8 @@ public interface PilotCertificationService {
PilotCertificationDTO detailPilot(Integer id);
PilotCertificationDTO userDetailPilot(Integer userAccountId);
PageResult backListPilot(PilotCertificationQO param, LoginSuccessDTO userLoginInfoFromRedis);
......@@ -37,4 +40,6 @@ public interface PilotCertificationService {
ResultBody updateAuditStatus(PilotAuditStatusQO param, LoginSuccessDTO userLoginInfoFromRedis);
PageResult backPilotLogList(PilotCertificationLogQO param, LoginSuccessDTO userLoginInfoFromRedis);
ResultBody<PilotReasonDTO> backListReason();
}
......@@ -10,14 +10,12 @@ import com.mmc.iuav.user.constant.WxConstant;
import com.mmc.iuav.user.controller.wx.*;
import com.mmc.iuav.user.dao.dronepilot.PilotCertificationDao;
import com.mmc.iuav.user.entity.UserAccountDO;
import com.mmc.iuav.user.entity.dronepilot.CertificationMessage;
import com.mmc.iuav.user.entity.dronepilot.PilotAbilityDO;
import com.mmc.iuav.user.entity.dronepilot.PilotCertificationDO;
import com.mmc.iuav.user.entity.dronepilot.PilotCertificationLogDO;
import com.mmc.iuav.user.entity.dronepilot.*;
import com.mmc.iuav.user.model.dto.LoginSuccessDTO;
import com.mmc.iuav.user.model.dto.dronepilot.PilotAbilityDTO;
import com.mmc.iuav.user.model.dto.dronepilot.PilotCertificationDTO;
import com.mmc.iuav.user.model.dto.dronepilot.PilotCertificationLogDTO;
import com.mmc.iuav.user.model.dto.dronepilot.PilotReasonDTO;
import com.mmc.iuav.user.model.qo.dronepilot.PilotAuditStatusQO;
import com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationLogQO;
import com.mmc.iuav.user.model.qo.dronepilot.PilotCertificationQO;
......@@ -145,6 +143,23 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
}
@Override
public PilotCertificationDTO userDetailPilot(Integer userAccountId) {
PilotCertificationDO certificationDO = certificationDao.userDetailPilot(userAccountId);
if (certificationDO == null) {
return null;
}
int yearsOfWorking = 0;
yearsOfWorking = getYearsOfWorking(certificationDO.getTimeOfApplication());
Integer Working = certificationDO.getYearsOfWorking();
yearsOfWorking = yearsOfWorking + Working;
certificationDO.setYearsOfWorking(yearsOfWorking);
certificationDO.setAge(getAgeByBirth(certificationDO.getBirthday()));
PilotCertificationDTO pilotCertificationDTO = certificationDO.buildPilotCertificationDTO();
return pilotCertificationDTO;
}
@Override
public PageResult backListPilot(PilotCertificationQO param, LoginSuccessDTO userLoginInfoFromRedis) {
Integer pageNo = param.getPageNo();
param.buildCurrentPage();
......@@ -172,6 +187,14 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
return pageResult;
}
@Override
public ResultBody<PilotReasonDTO> backListReason() {
List<PilotReasonDO> pilotReasonDOS = certificationDao.backListReason();
List<PilotReasonDTO> collect = pilotReasonDOS.stream().map(PilotReasonDO::buildPilotReasonDTO).collect(Collectors.toList());
return ResultBody.success(collect);
}
@Override
public ResultBody updateRemark(PilotRemarkQO param, LoginSuccessDTO userLoginInfoFromRedis) {
certificationDao.updateRemark(param);
......@@ -186,13 +209,14 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
PilotCertificationLogDO pilotCertificationLog = new PilotCertificationLogDO(userAccountDO.getId(), userLoginInfoFromRedis.getUserAccountId(), CertificationMessage.match(param.getAuditStatus()));
certificationDao.insertPilotLog(pilotCertificationLog);
CertificationMessage match = CertificationMessage.match(param.getAuditStatus());
this.sendMsgFlyerInfoAuth(userAccountDO, match.getMessage());
SendCertificationMessage match = SendCertificationMessage.match(param.getAuditStatus());
this.sendMsgFlyerInfoAuth(userAccountDO, match.getMessage(), param);
return ResultBody.success();
}
private void sendMsgFlyerInfoAuth(UserAccountDO userAccountDO, String message) {
private void sendMsgFlyerInfoAuth(UserAccountDO userAccountDO, String message, PilotAuditStatusQO param) {
SimpleDateFormat df = new SimpleDateFormat("yyyy/MM/dd HH:mm");// 设置日期格式
String date = df.format(new Date());
JSONObject value1 = new JSONObject();
......@@ -202,8 +226,17 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
JSONObject value3 = new JSONObject();
value3.put("value", message);
JSONObject value4 = new JSONObject();
String userName = userAccountDO.getUserName() + message;
value4.put("value", userName);
CertificationMessage match = CertificationMessage.match(param.getAuditStatus());
//不通过原因
String reason = null;
if (param.getAuditStatus() == 1) {
reason = userAccountDO.getUserName() + match.getMessage();
}
if (param.getAuditStatus() == 2) {
PilotReasonDO pilotReasonDO = certificationDao.selectPilotReason(param.getReasonId());
reason = pilotReasonDO.getReason();
}
value4.put("value", reason);
JSONObject datad = new JSONObject();
datad.put("date2", value1);
datad.put("name3", value2);
......@@ -212,9 +245,9 @@ public class PilotCertificationServiceImpl implements PilotCertificationService
AppletMsgVOS appletMsgVO = new AppletMsgVOS();
appletMsgVO.setTouser(userAccountDO.getOpenId());
appletMsgVO.setTemplate_id(WxMsgTemplete.FW_CHECK_FLYER_AUTH_INFO);
appletMsgVO.setPage("pages/mine/index");
appletMsgVO.setPage("pages/welcome/index");
appletMsgVO.setData(datad);
appletMsgVO.setMiniprogram_state("developer");
appletMsgVO.setMiniprogram_state(userSystemConstant.getMiniProgramState());
appletMsgVO.setLang("zh_CN");
sendUserAppletMsg(appletMsgVO);
}
......
......@@ -87,10 +87,12 @@ public class CooperationServiceImpl implements CooperationService {
UserApplyTagDO userApplyTagDO = new UserApplyTagDO(userApplyTagVO);
cooperationDao.addApply(userApplyTagDO);
List<AttachmentVO> attachmentList = userApplyTagVO.getAttachmentList();
for (AttachmentVO attachmentVO : attachmentList) {
TagApplyResourceDO tagApplyResourceDO =
new TagApplyResourceDO(attachmentVO, userApplyTagDO.getId());
cooperationDao.addApplyResource(tagApplyResourceDO);
if (!CollectionUtils.isEmpty(attachmentList)) {
for (AttachmentVO attachmentVO : attachmentList) {
TagApplyResourceDO tagApplyResourceDO =
new TagApplyResourceDO(attachmentVO, userApplyTagDO.getId());
cooperationDao.addApplyResource(tagApplyResourceDO);
}
}
// 修改单位的位置、品牌信息
appCompanyInfoUId.setLon(userApplyTagVO.getLon());
......@@ -250,8 +252,16 @@ public class CooperationServiceImpl implements CooperationService {
if (!userApplyTag.getApplyStatus().equals(1)) {
return ResultBody.error("当前服务商暂未通过审核!");
}
//if (StringUtils.isBlank(applyTagEditVO.getRemark())) {
UserApplyTagDO userApplyTagDO = new UserApplyTagDO();
userApplyTagDO.setId(applyTagEditVO.getId());
userApplyTagDO.setRemark(applyTagEditVO.getRemark());
cooperationDao.updateUserApplyTag(userApplyTagDO);
// }
cooperationDao.deleteApplyResource(applyTagEditVO.getId());
if (!CollectionUtils.isEmpty(applyTagEditVO.getAttachmentList())) {
cooperationDao.deleteApplyResource(applyTagEditVO.getId());
applyTagEditVO.getAttachmentList().forEach(d -> d.setUserApplyTagId(userApplyTag.getId()));
cooperationDao.insertApplyResource(applyTagEditVO.getAttachmentList());
}
// 修改单位网点位置信息
......
......@@ -7,6 +7,7 @@ import com.mmc.iuav.response.ResultEnum;
import com.mmc.iuav.user.dao.RealNameAuthDao;
import com.mmc.iuav.user.entity.RealNameAuthDO;
import com.mmc.iuav.user.model.dto.RealNameAuthDTO;
import com.mmc.iuav.user.model.dto.RealNameAuthDetailDTO;
import com.mmc.iuav.user.model.qo.RealNameAuthQO;
import com.mmc.iuav.user.model.vo.RealNameAuthVO;
import com.mmc.iuav.user.service.RealNameAuthService;
......@@ -114,16 +115,16 @@ public class RealNameAuthServiceImpl implements RealNameAuthService {
}
@Override
public ResultBody<RealNameAuthDTO> detail(Integer id) {
public ResultBody<RealNameAuthDetailDTO> detail(Integer id) {
RealNameAuthDO realNameAuthDO = realNameAuthDao.getRealNameAuthById(id);
if (realNameAuthDO != null) {
return ResultBody.success(realNameAuthDO.buildRealNameAuthDTO());
return ResultBody.success(realNameAuthDO.buildRealNameAuthDetailDTO());
}
return ResultBody.success();
}
@Override
public ResultBody listPage(RealNameAuthQO realNameAuthQO) {
public ResultBody<RealNameAuthDTO> listPage(RealNameAuthQO realNameAuthQO) {
int count = realNameAuthDao.countListRealNameAuth(realNameAuthQO);
if (count == 0) {
return ResultBody.success(PageResult.buildPage(realNameAuthQO.getPageNo(), realNameAuthQO.getPageSize(), count));
......@@ -146,6 +147,12 @@ public class RealNameAuthServiceImpl implements RealNameAuthService {
return ResultBody.success();
}
@Override
public ResultBody updateRealNameAuthRemark(Integer id, String remark) {
realNameAuthDao.updateRealNameAuthRemark(id, remark);
return ResultBody.success();
}
public Date getDate(String str, String format) {
Date date = null;
try {
......
......@@ -105,9 +105,8 @@
<if test="applyStatus != null">
apply_status = #{applyStatus},
</if>
<if test="remark != null and remark != '' ">
remark = #{remark}
</if>
remark = #{remark},
update_time=NOW()
</set>
WHERE id = #{id}
</update>
......@@ -144,26 +143,30 @@
</select>
<select id="getUserApplyTag" resultMap="UserApplyTagResultMap">
SELECT
ua.id,
ua.cooperation_tag_id,
ua.user_account_id,
ua.apply_name,
ua.apply_phone,
ua.apply_status,
ua.remark,
ua.create_time,
ci.id as company_info_id,
ci.address,
ci.company_name AS `name`,
ci.lat,
ci.lon,
ci.content,
ci.score
FROM
user_apply_tag ua
INNER JOIN company_member cm ON cm.user_account_id = ua.user_account_id
INNER JOIN company_info ci ON cm.company_info_id = ci.id
SELECT ua.id,
ua.cooperation_tag_id,
ua.user_account_id,
ua.apply_name,
ua.apply_phone,
ua.apply_status,
ua.remark,
ua.create_time,
ct.tag_name,
ci.id AS company_info_id,
ci.company_name,
ci.brand_name,
ci.brand_logo,
ci.credit_code,
ci.license_img,
ci.address,
ci.lat,
ci.lon,
ci.content,
ci.score
FROM user_apply_tag ua
INNER JOIN cooperation_tag ct ON ua.cooperation_tag_id = ct.id
INNER JOIN company_member cm ON cm.user_account_id = ua.user_account_id
INNER JOIN company_info ci ON cm.company_info_id = ci.id
WHERE ua.id = #{id}
AND ua.is_deleted = 0
</select>
......@@ -286,28 +289,27 @@
</select>
<select id="countServiceBitmapData" resultType="java.lang.Integer">
SELECT count(*)
FROM
user_apply_tag uat
INNER JOIN cooperation_tag ct ON uat.cooperation_tag_id = ct.id
FROM user_apply_tag uat
INNER JOIN cooperation_tag ct ON uat.cooperation_tag_id = ct.id
WHERE ct.id = #{type}
and uat.is_deleted = 0
</select>
<select id="listServiceBitmapData" resultType="com.mmc.iuav.user.entity.WebsiteInfoDO">
SELECT
uat.id,
ci.company_name AS `name`,
ci.address,
ci.lon,
ci.lat,
ct.id AS type,
ci.content,
ci.score,
st_distance_sphere(point(ci.lon,ci.lat), point(${lon}, ${lat})) AS distance
FROM
user_apply_tag uat
INNER JOIN cooperation_tag ct ON uat.cooperation_tag_id = ct.id
INNER JOIN company_member cm ON cm.user_account_id = uat.user_account_id
INNER JOIN company_info ci ON cm.company_info_id = ci.id
SELECT uat.id,
ci.company_name AS `name`,
ci.address,
ci.lon,
ci.lat,
ct.id AS type,
ci.content,
ci.score,
st_distance_sphere(point(ci.lon, ci.lat), point(${lon}, ${lat})) AS distance
FROM user_apply_tag uat
INNER JOIN cooperation_tag ct ON uat.cooperation_tag_id = ct.id
INNER JOIN company_member cm ON cm.user_account_id = uat.user_account_id
INNER JOIN company_info ci ON cm.company_info_id = ci.id
WHERE ct.id = #{type}
and uat.is_deleted = 0
ORDER BY distance ASC
LIMIT #{pageNo}, #{pageSize}
</select>
......@@ -395,7 +397,8 @@
select count(*)
from user_apply_tag
where user_account_id = #{userAccountId}
and is_deleted = 0 and apply_status = 1
and is_deleted = 0
and apply_status = 1
</select>
......
......@@ -69,6 +69,10 @@
where id = #{id}
</update>
<update id="updateRealNameAuthRemark">
update real_name_auth set remark = #{remark} where id = #{id}
</update>
<select id="existHasBeenAuth" resultType="java.lang.Integer">
select count(*) from real_name_auth where union_id <![CDATA[<>]]> #{unionId} and id_number = #{idNumber} and check_status = 1
</select>
......@@ -104,27 +108,34 @@
</select>
<select id="countListRealNameAuth" resultType="java.lang.Integer">
select count(*) from real_name_auth where is_deleted = 0 and check_status = 1
select count(*) from user_account ua inner join real_name_auth rna on
ua.id=rna.user_account_id
where ua.`disable` = 0 and rna.check_status = 1
<if test="keyword != null and keyword != '' ">
and ( ua.id like concat('%',#{keyword},'%')
or
rna.user_name like concat('%',#{keyword},'%')
or ua.phone_num like
concat('%',#{keyword},'%')
)
</if>
</select>
<select id="listRealNameAuth" resultType="com.mmc.iuav.user.entity.RealNameAuthDO"
parameterType="com.mmc.iuav.user.model.qo.RealNameAuthQO">
select
rna.id,rna.user_account_id,ua.nick_name,rna.user_name,ua.phone_num,rna.check_status,rna.create_time,ua.remark
rna.id,rna.user_account_id,ua.nick_name,rna.user_name,ua.phone_num,rna.check_status,rna.create_time,rna.remark
from user_account ua inner join real_name_auth rna on
ua.id=rna.user_account_id
where ua.`disable` = 0
where ua.`disable` = 0 and rna.check_status = 1
<if test="keyword != null and keyword != '' ">
and ( ua.id like concat('%',#{keyword},'%')
or
ua.user_name like concat('%',#{keyword},'%')
rna.user_name like concat('%',#{keyword},'%')
or ua.phone_num like
concat('%',#{keyword},'%')
)
</if>
<if test="checkStatus != null ">
and rna.check_status = #{checkStatus}
</if>
order by rna.create_time DESC
limit #{pageNo},#{pageSize}
</select>
......
......@@ -257,6 +257,7 @@
user_account ua
LEFT JOIN company_member cm ON cm.user_account_id = ua.id
LEFT JOIN company_info ci ON ci.id = cm.company_info_id
LEFT JOIN real_name_auth rna ON rna.user_account_id = ua.id
WHERE
ua.disable = 0 and ua.port_type = 100
<if test="companyInfoId != null">
......@@ -271,6 +272,12 @@
<if test="companyAuthStatus == 1">
AND ci.company_name is not null
</if>
<if test="realAuthStatus == 1">
AND rna.check_status = #{realAuthStatus}
</if>
<if test="realAuthStatus == 0">
AND ( rna.check_status is not null or rna.check_status = 0 )
</if>
<if test="startTime != null ">
AND ua.create_time >= #{startTime}
</if>
......@@ -336,6 +343,12 @@
<if test="companyAuthStatus == 1">
AND ci.company_name is not null
</if>
<if test="realAuthStatus == 1">
AND rna.check_status = #{realAuthStatus}
</if>
<if test="realAuthStatus == 0">
AND ( rna.check_status is not null or rna.check_status = 0 )
</if>
<if test="startTime != null ">
AND ua.create_time >= #{startTime}
</if>
......
......@@ -24,6 +24,9 @@
<result property="birthday" column="birthday"/>
<result property="sex" column="sex"/>
<result property="phoneNum" column="phone_num"/>
<result property="reasonId" column="reason_id"/>
<result property="reason" column="reason"/>
<result property="userImg" column="user_img"/>
<collection property="pilotAbility" ofType="com.mmc.iuav.user.model.vo.dronepilot.PilotAbilityVO"
select="selectAbilityList"
column="{pilotCertificationId=id}">
......@@ -152,14 +155,20 @@
pc.update_time,
rna.user_name,
rna.birthday,
rna.sex ,
ua.phone_num
rna.sex,
ua.phone_num,
pc.reason_id,
pr.reason,
ua.user_img
FROM
pilot_certification pc
LEFT JOIN real_name_auth rna ON pc.user_account_id = rna.user_account_id
left join user_account ua on pc.user_account_id=ua.id
LEFT JOIN user_account ua ON pc.user_account_id = ua.id
LEFT JOIN pilot_reason pr ON pc.reason_id = pr.id
WHERE
1 =1
1 = 1
AND ua.`disable` = 0
AND rna.is_deleted =0
<if test=" areaNumber != null and areaNumber != '' ">
and pc.area_number =#{areaNumber}
</if>
......@@ -169,7 +178,7 @@
<if test=" licenseType != null and licenseType != '' ">
and pc.license_type =#{licenseType}
</if>
<if test=" auditStatus != null and auditStatus != '' ">
<if test=" auditStatus != null ">
and pc.audit_status =#{auditStatus}
</if>
<if test="accountNumber != null and accountNumber != '' ">
......@@ -200,13 +209,48 @@
rna.user_name,
rna.birthday,
rna.sex,
ua.phone_num
ua.phone_num,
pc.reason_id,
pr.reason,
ua.user_img
FROM pilot_certification pc
LEFT JOIN real_name_auth rna ON pc.user_account_id = rna.user_account_id
LEFT JOIN user_account ua ON pc.user_account_id = ua.id
LEFT JOIN pilot_reason pr ON pr.id = pc.reason_id
WHERE pc.id = #{id}
</select>
<select id="userDetailPilot" resultMap="pilotList">
SELECT pc.id,
pc.license_type,
pc.license_number,
pc.license_url,
pc.area_number,
pc.years_of_working,
pc.ability_url,
pc.individual_resume,
pc.audit_status,
pc.user_account_id,
pc.time_of_application,
pc.remark,
pc.resident_city,
pc.create_time,
pc.update_time,
rna.user_name,
rna.birthday,
rna.sex,
ua.phone_num,
pc.reason_id,
pr.reason,
ua.user_img
FROM pilot_certification pc
LEFT JOIN real_name_auth rna ON pc.user_account_id = rna.user_account_id
LEFT JOIN user_account ua ON pc.user_account_id = ua.id
LEFT JOIN pilot_reason pr ON pc.reason_id = pr.id
WHERE pc.user_account_id = #{userAccountId}
</select>
<update id="updateRemark" parameterType="com.mmc.iuav.user.model.qo.dronepilot.PilotRemarkQO">
UPDATE pilot_certification
<set>
......@@ -220,7 +264,7 @@
UPDATE pilot_certification
<set>
audit_status = #{auditStatus},
reason=#{reason},
reason_id=#{reasonId},
operator_user_id=#{operatorUserId},
update_time=NOW()
</set>
......@@ -228,10 +272,10 @@
</update>
<select id="selectUserAccountId" resultType="com.mmc.iuav.user.entity.UserAccountDO">
SELECT pc.user_account_id,
SELECT pc.user_account_id as id,
ua.union_id,
ua.open_id,
bua.user_name AS operatorUserName,
bua.user_name AS operatorUserName,
rna.user_name
FROM pilot_certification pc
LEFT JOIN real_name_auth rna ON pc.user_account_id = rna.user_account_id
......@@ -266,4 +310,15 @@
</if>
order by pcl.create_time desc
</select>
<select id="backListReason" resultType="com.mmc.iuav.user.entity.dronepilot.PilotReasonDO">
select id, reason
from pilot_reason
</select>
<select id="selectPilotReason" resultType="com.mmc.iuav.user.entity.dronepilot.PilotReasonDO">
select id, reason
from pilot_reason
where id = #{reasonId}
</select>
</mapper>
......@@ -18,4 +18,4 @@ patches:
images:
- name: REGISTRY/NAMESPACE/IMAGE:TAG
newName: mmc-registry.cn-shenzhen.cr.aliyuncs.com/sharefly-dev/cms
newTag: 03c0ef4ea94c5d2f801b1fc7c22fff0ced6a00e4
newTag: a569cdb7b0284e667786cccbeef1a26beccea925
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论