Merge branch 'dev' of http://git.xayunmei.com/SH-Arbitrate/Arbitrate-Backend into hjb
This commit is contained in:
+1
@@ -38,6 +38,7 @@ public class CaseApplicationController extends BaseController {
|
||||
@GetMapping("/list")
|
||||
public TableDataInfo list(CaseApplication caseApplication) {
|
||||
startPage();
|
||||
// List<CaseApplication> list = caseApplicationService.selectCaseApplicationListNew(caseApplication);
|
||||
List<CaseApplication> list = caseApplicationService.selectCaseApplicationList(caseApplication);
|
||||
return getDataTable(list);
|
||||
}
|
||||
|
||||
+3
@@ -1,6 +1,7 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||
@@ -21,6 +22,7 @@ public class IdentityAuthenticationController extends BaseController {
|
||||
/**
|
||||
* 获取EIDtoken
|
||||
*/
|
||||
@Anonymous
|
||||
@PostMapping("/selectIdentityAuthenticaEIDtoken")
|
||||
public AjaxResult selectIdentityAuthenticaEIDtoken() {
|
||||
JSONObject tokenResult = identityAuthenticationService.selectIdentityAuthenticaEIDtoken();
|
||||
@@ -30,6 +32,7 @@ public class IdentityAuthenticationController extends BaseController {
|
||||
/**
|
||||
* 小程序人脸核身后查询身份认证结果
|
||||
*/
|
||||
@Anonymous
|
||||
@PostMapping("/selectIdentityAuthenticaRespon")
|
||||
public AjaxResult selectIdentityAuthenticaRespon(@Validated @RequestBody IdentityAuthentication ientityAuthentication) {
|
||||
AjaxResult checkResult = identityAuthenticationService.selectIdentityAuthenticaRespon(ientityAuthentication);
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
package com.ruoyi.web.controller.wisdomarbitrate;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import com.ruoyi.common.annotation.Anonymous;
|
||||
import com.ruoyi.common.core.controller.BaseController;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.exception.ServiceException;
|
||||
import com.ruoyi.common.utils.http.HttpUtils;
|
||||
import com.ruoyi.wisdomarbitrate.domain.CaseApplication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
|
||||
import com.ruoyi.wisdomarbitrate.service.WeChatUserService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
* @description 微信小程序用户注册登录
|
||||
* @date 2023-10-16 11:25
|
||||
*/
|
||||
@RestController
|
||||
@RequestMapping("/weChatUser")
|
||||
public class WeChatUserController extends BaseController {
|
||||
@Autowired
|
||||
private WeChatUserService weChatUserService;
|
||||
|
||||
/**
|
||||
* 小程序端获取手机验证码
|
||||
* @param userVO
|
||||
* @return
|
||||
*/
|
||||
@Anonymous
|
||||
@GetMapping("/sendCode")
|
||||
public AjaxResult sendCode( WeChatUserVO userVO)
|
||||
{
|
||||
if(StrUtil.isEmpty(userVO.getPhone())){
|
||||
return warn("手机号不能为空");
|
||||
}
|
||||
return success(weChatUserService.sendCode(userVO));
|
||||
}
|
||||
/**
|
||||
* 小程序注册
|
||||
*/
|
||||
@Anonymous
|
||||
@PostMapping("/registerUser")
|
||||
public AjaxResult registerUser( @RequestBody IdentityAuthentication ientityAuthentication) {
|
||||
if(ientityAuthentication.getId()==null
|
||||
|| StrUtil.isEmpty(ientityAuthentication.getName())
|
||||
|| StrUtil.isEmpty(ientityAuthentication.getIdentityNo())
|
||||
|| StrUtil.isEmpty(ientityAuthentication.getPhone())
|
||||
|| StrUtil.isEmpty(ientityAuthentication.getUserName())
|
||||
|| StrUtil.isEmpty(ientityAuthentication.getEmail())
|
||||
|| StrUtil.isEmpty(ientityAuthentication.getVerifyCode())
|
||||
){
|
||||
return warn("参数校验失败");
|
||||
}
|
||||
return weChatUserService.registerUser(ientityAuthentication);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -41,4 +41,5 @@ public class CacheConstants
|
||||
* 登录账户密码错误次数 redis key
|
||||
*/
|
||||
public static final String PWD_ERR_CNT_KEY = "pwd_err_cnt:";
|
||||
public static final String WE_CHAT_SMS_VERIFY_CODE_KEY="we_chat_sms_verify_code:";
|
||||
}
|
||||
|
||||
@@ -128,6 +128,7 @@ public class Constants
|
||||
* LDAPS 远程方法调用
|
||||
*/
|
||||
public static final String LOOKUP_LDAPS = "ldaps:";
|
||||
public static final String DEFAULT_PASSWORD = "123456";
|
||||
|
||||
/**
|
||||
* 自动识别json对象白名单配置(仅允许解析的包名,范围越小越安全)
|
||||
|
||||
@@ -134,4 +134,11 @@ public interface SysUserMapper
|
||||
public SysUser checkEmailUnique(String email);
|
||||
|
||||
List<SysUser> selectUserListByIds(@Param("idList") List<Long> idList);
|
||||
|
||||
/**
|
||||
* 根据身份证号查询用户信息
|
||||
* @param identityNo
|
||||
* @return
|
||||
*/
|
||||
SysUser selectUserByIdCard(@Param("idCard")String identityNo);
|
||||
}
|
||||
|
||||
@@ -23,6 +23,10 @@ public class CaseAffiliate extends BaseEntity {
|
||||
* 申请机构名称
|
||||
*/
|
||||
private String applicationOrganName;
|
||||
/**
|
||||
* 代理人用户id
|
||||
*/
|
||||
private String applicantAgentUserId;
|
||||
/** 身份证号 */
|
||||
@Excel(name = "身份证号")
|
||||
private String identityNum;
|
||||
@@ -57,6 +61,14 @@ public class CaseAffiliate extends BaseEntity {
|
||||
/** 快递单号 */
|
||||
private String trackNum;
|
||||
|
||||
public String getApplicantAgentUserId() {
|
||||
return applicantAgentUserId;
|
||||
}
|
||||
|
||||
public void setApplicantAgentUserId(String applicantAgentUserId) {
|
||||
this.applicantAgentUserId = applicantAgentUserId;
|
||||
}
|
||||
|
||||
public String getApplicationOrganId() {
|
||||
return applicationOrganId;
|
||||
}
|
||||
|
||||
+20
-1
@@ -3,9 +3,10 @@ package com.ruoyi.wisdomarbitrate.domain;
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.common.annotation.Excel;
|
||||
import com.ruoyi.common.core.domain.BaseEntity;
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class IdentityAuthentication extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@@ -15,6 +16,20 @@ public class IdentityAuthentication extends BaseEntity {
|
||||
private String name;
|
||||
/** 身份证号 */
|
||||
private String identityNo;
|
||||
/**
|
||||
* 短信验证码
|
||||
*/
|
||||
private String VerifyCode;
|
||||
private String passWord;
|
||||
private String phone;
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
private String email;
|
||||
/**
|
||||
* 身份证地址
|
||||
*/
|
||||
private String idAddress;
|
||||
/** 认证时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date certificationTime;
|
||||
@@ -44,6 +59,10 @@ public class IdentityAuthentication extends BaseEntity {
|
||||
private Long userId;
|
||||
/** 用户账号 */
|
||||
private String userName;
|
||||
/**
|
||||
* 用户昵称
|
||||
*/
|
||||
private String nickName;
|
||||
|
||||
/** EID商户id */
|
||||
private String merchantId;
|
||||
|
||||
@@ -0,0 +1,63 @@
|
||||
package com.ruoyi.wisdomarbitrate.domain.vo;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||
import com.ruoyi.wisdomarbitrate.domain.Arbitrator;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 微信小程序用户注册登录
|
||||
*/
|
||||
@Data
|
||||
public class WeChatUserVO {
|
||||
/**
|
||||
* id
|
||||
*/
|
||||
private Long id;
|
||||
/**
|
||||
* 微信用户唯一标识
|
||||
*/
|
||||
private String openId;
|
||||
/**
|
||||
* 微信授权的code,用户登录凭证
|
||||
*/
|
||||
private String wxCode;
|
||||
|
||||
/**
|
||||
* 姓名
|
||||
*/
|
||||
@NotEmpty(message = "姓名不能为空")
|
||||
private String name;
|
||||
/** 身份证号 */
|
||||
@NotEmpty(message = "身份证号不能为空")
|
||||
private String identityNo;
|
||||
/** 认证时间 */
|
||||
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||
private Date certificationTime;
|
||||
/** 认证状态 */
|
||||
private Integer certificationStatus;
|
||||
private String password;
|
||||
/**
|
||||
* 电话
|
||||
*/
|
||||
@NotEmpty(message = "电话不能为空")
|
||||
private String phone;
|
||||
/**
|
||||
* 验证码
|
||||
*/
|
||||
private String verifyCode;
|
||||
/**
|
||||
* 邮箱
|
||||
*/
|
||||
@NotEmpty(message = "邮箱不能为空")
|
||||
private String email;
|
||||
/**
|
||||
* 创建人
|
||||
*/
|
||||
private String createBy;
|
||||
private String updateBy;
|
||||
}
|
||||
+8
-1
@@ -43,7 +43,7 @@ public interface CaseApplicationMapper {
|
||||
|
||||
/**
|
||||
* 查询仲裁员根据案件id
|
||||
* @param arbitrator
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
String selectArbitratorList(@Param("id") String id);
|
||||
@@ -53,4 +53,11 @@ public interface CaseApplicationMapper {
|
||||
* @param payDTO
|
||||
*/
|
||||
void updatePayType(CaseConfirmPayDTO payDTO);
|
||||
|
||||
/**
|
||||
* 查询部门长案件
|
||||
* @param caseApplication
|
||||
* @return
|
||||
*/
|
||||
List<CaseApplication> selectDeptHeadCaseApplicationList(@Param("caseApplication") CaseApplication caseApplication, @Param("statusList")List<Integer> caseStatusList);
|
||||
}
|
||||
|
||||
+1
-2
@@ -8,6 +8,5 @@ public interface IdentityAuthenticationMapper {
|
||||
IdentityAuthentication selectIdentityAuthentication(IdentityAuthentication identityAuthentication);
|
||||
|
||||
|
||||
|
||||
|
||||
void updateIdentityAuthentication(IdentityAuthentication ientityAuthentication);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.ruoyi.wisdomarbitrate.mapper;
|
||||
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
* @description 微信小程序用户注册登录
|
||||
* @date 2023-10-16 11:45
|
||||
*/
|
||||
@Repository
|
||||
public interface WeChatUserMapper {
|
||||
int insertUser(WeChatUserVO userVO);
|
||||
int updateUser(WeChatUserVO userVO);
|
||||
List<WeChatUserVO> selectIdentityAuthentication(WeChatUserVO userVO);
|
||||
|
||||
WeChatUserVO selectUserByOppenId(@Param("oppenId") String openId);
|
||||
}
|
||||
+1
@@ -11,6 +11,7 @@ import java.util.List;
|
||||
|
||||
public interface ICaseApplicationService {
|
||||
List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication);
|
||||
List<CaseApplication> selectCaseApplicationListNew(CaseApplication caseApplication);
|
||||
|
||||
|
||||
int insertcaseApplication(CaseApplication caseApplication);
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
package com.ruoyi.wisdomarbitrate.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
|
||||
|
||||
/**
|
||||
* 微信小程序用户注册登录
|
||||
*/
|
||||
public interface WeChatUserService {
|
||||
|
||||
|
||||
String sendCode(WeChatUserVO userVO);
|
||||
|
||||
|
||||
AjaxResult registerUser(IdentityAuthentication ientityAuthentication);
|
||||
}
|
||||
+93
-36
@@ -13,6 +13,7 @@ import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.ruoyi.common.annotation.DataScope;
|
||||
import com.ruoyi.common.constant.CaseApplicationConstants;
|
||||
import com.ruoyi.common.constant.Constants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.*;
|
||||
|
||||
@@ -98,41 +99,57 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
* @return
|
||||
*/
|
||||
// @Override
|
||||
// public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
|
||||
// // 获取登录用户
|
||||
// LoginUser loginUser = getLoginUser();
|
||||
// SysUser user = loginUser.getUser();
|
||||
// Long userId = user.getUserId();
|
||||
// Long deptId = user.getDeptId();
|
||||
// List<SysRole> roles = user.getRoles();
|
||||
// // 查询登录人身份证号
|
||||
// SysUser sysUser = sysUserMapper.selectUserById(userId);
|
||||
// caseApplication.setIdCard(sysUser.getIdCard());
|
||||
// caseApplication.setUserId(String.valueOf(userId));
|
||||
// startPage();
|
||||
// for (SysRole role : roles) {
|
||||
// // 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
|
||||
// if(role.getRoleName().equals("超级管理员")
|
||||
// ||role.getRoleName().equals("仲裁委")
|
||||
// ||role.getRoleName().equals("部门长")){
|
||||
// return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
|
||||
// }
|
||||
// if(role.getRoleName().equals("法律顾问")){
|
||||
// // 查询角色有关的用户部门
|
||||
// List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||
// caseApplication.setDeptIds(deptIds);
|
||||
// }
|
||||
// if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
|
||||
// // 查询角色有关的用户部门
|
||||
// caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
|
||||
// }
|
||||
// }
|
||||
//
|
||||
//
|
||||
// // 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
||||
// return caseApplicationMapper.selectCaseApplicationList(caseApplication);
|
||||
//
|
||||
// }
|
||||
public List<CaseApplication> selectCaseApplicationListNew(CaseApplication caseApplication) {
|
||||
// 获取登录用户
|
||||
LoginUser loginUser = getLoginUser();
|
||||
SysUser user = loginUser.getUser();
|
||||
Long userId = user.getUserId();
|
||||
|
||||
// 查询登录人身份证号
|
||||
SysUser sysUser = sysUserMapper.selectUserById(userId);
|
||||
List<SysRole> roles = sysUser.getRoles();
|
||||
// 没有角色不能查看案件列表
|
||||
if(CollectionUtil.isEmpty(roles)){
|
||||
throw new ServiceException("该用户没有角色权限");
|
||||
}
|
||||
startPage();
|
||||
for (SysRole role : roles) {
|
||||
// 超级管理员和仲裁委(部门长)案件,可查看所有案件 √
|
||||
if(role.getRoleName().equals("超级管理员")
|
||||
){
|
||||
return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
|
||||
}
|
||||
if(role.getRoleName().equals("仲裁委")
|
||||
||role.getRoleName().equals("部门长")){
|
||||
List<Integer> caseStatusList=new ArrayList<>();
|
||||
caseStatusList.add(CaseApplicationConstants.CONFIRMDED_PENDING_TRIAL);
|
||||
caseStatusList.add(CaseApplicationConstants.SIGN_ARBITRATION);
|
||||
caseStatusList.add(CaseApplicationConstants.ARBITRATED_SEAL);
|
||||
return caseApplicationMapper.selectDeptHeadCaseApplicationList(caseApplication,caseStatusList);
|
||||
}
|
||||
if(role.getRoleName().equals("仲裁员")){
|
||||
caseApplication.setUserId(String.valueOf(userId));
|
||||
}
|
||||
if(role.getRoleName().equals("法律顾问")){
|
||||
// 查询角色有关的用户部门
|
||||
List<Long> deptIds = sysDeptMapper.selectUserDeptListByRoleId(role.getRoleId());
|
||||
caseApplication.setDeptIds(deptIds);
|
||||
}
|
||||
if(StrUtil.isEmpty(caseApplication.getNameId())&&role.getRoleName().equals("申请人")){
|
||||
// 查询角色有关的用户部门
|
||||
caseApplication.setNameId(String.valueOf(sysUser.getDeptId()));
|
||||
}
|
||||
if(role.getRoleName().equals("被申请人")){
|
||||
//
|
||||
caseApplication.setIdCard(String.valueOf(sysUser.getIdCard()));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
// 根据条件查询申请人,被申请人,仲裁员,法律顾问案件
|
||||
return caseApplicationMapper.selectCaseApplicationList(caseApplication);
|
||||
|
||||
}
|
||||
@Override
|
||||
public List<CaseApplication> selectCaseApplicationList(CaseApplication caseApplication) {
|
||||
return caseApplicationMapper.selectAdminCaseApplicationList(caseApplication);
|
||||
@@ -188,6 +205,8 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
caseAffiliate.setApplicationOrganName(caseAffiliate.getName());
|
||||
|
||||
}
|
||||
// 组装申请代理人信息
|
||||
buildAgentInfo(caseAffiliate);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -275,8 +294,11 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
caseAffiliate.setApplicationOrganId(String.valueOf(dept.getDeptId()));
|
||||
|
||||
}
|
||||
buildAgentInfo(caseAffiliate);
|
||||
|
||||
}
|
||||
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
|
||||
|
||||
caseAffiliateMapper.updataCaseAffiliate(caseAffiliate);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -292,6 +314,38 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
return rows;
|
||||
}
|
||||
|
||||
/**
|
||||
* 组装申请代理人信息
|
||||
* @param caseAffiliate
|
||||
*/
|
||||
private void buildAgentInfo(CaseAffiliate caseAffiliate) {
|
||||
if(StrUtil.isNotEmpty(caseAffiliate.getNameAgent())){
|
||||
// 组装申请机构代理人信息,用户表新增并且和部门关联
|
||||
// 根据代理人身份证去用户表查询,有修改,么有新增
|
||||
SysUser agentUser = sysUserMapper.selectUserByIdCard(caseAffiliate.getIdentityNumAgent());
|
||||
if(agentUser==null){
|
||||
agentUser = new SysUser();
|
||||
agentUser.setIdCard(caseAffiliate.getIdentityNumAgent());
|
||||
agentUser.setNickName(caseAffiliate.getNameAgent());
|
||||
agentUser.setUserName(caseAffiliate.getIdentityNumAgent());
|
||||
agentUser.setPhonenumber(caseAffiliate.getContactTelphoneAgent());
|
||||
agentUser.setPassword(SecurityUtils.encryptPassword(Constants.DEFAULT_PASSWORD));
|
||||
agentUser.setDeptId(Long.valueOf(caseAffiliate.getApplicationOrganId()));
|
||||
int insertUserRow = sysUserMapper.insertUser(agentUser);
|
||||
if(insertUserRow>0) {
|
||||
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
|
||||
// 发送短信 todo
|
||||
}
|
||||
}else {
|
||||
// 同步用户表和案件关联人表的手机号和名称
|
||||
caseAffiliate.setContactTelphoneAgent(agentUser.getPhonenumber());
|
||||
caseAffiliate.setNameAgent(agentUser.getNickName());
|
||||
caseAffiliate.setApplicantAgentUserId(String.valueOf(agentUser.getUserId()));
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional
|
||||
public int submitCaseApplication(CaseApplication caseApplication) {
|
||||
@@ -465,9 +519,12 @@ public class CaseApplicationServiceImpl implements ICaseApplicationService {
|
||||
if(caseAffiliates!=null&&caseAffiliates.size()>0){
|
||||
for (CaseAffiliate caseAffiliate : caseAffiliates){
|
||||
caseAffiliate.setCaseAppliId(caseApplicationItera.getId());
|
||||
buildAgentInfo(caseAffiliate);
|
||||
|
||||
}
|
||||
caseAffiliateMapper.batchCaseAffiliate(caseAffiliates);
|
||||
}
|
||||
|
||||
successNum++;
|
||||
successMsg.append("<br/>" + successNum + "、立案编号 " + caseApplicationItera.getCaseNum() + " 导入成功");
|
||||
}
|
||||
|
||||
+15
-8
@@ -8,8 +8,10 @@ import cn.hutool.crypto.symmetric.SymmetricCrypto;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.IdentityAuthenticationService;
|
||||
@@ -46,6 +48,7 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
||||
|
||||
@Autowired
|
||||
private IdentityAuthenticationMapper identityAuthenticationMapper;
|
||||
private SysUserMapper sysUserMapper;
|
||||
|
||||
private static final Logger log = LoggerFactory.getLogger(IdentityAuthenticationServiceImpl.class);
|
||||
|
||||
@@ -147,7 +150,7 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
||||
@Transactional
|
||||
public AjaxResult selectIdentityAuthenticaRespon(IdentityAuthentication ientityAuthentication) {
|
||||
String eidToken = ientityAuthentication.getEidToken();
|
||||
|
||||
IdentityAuthentication authentication = new IdentityAuthentication();
|
||||
try {
|
||||
Credential cred = new Credential(credentialSecretId, credentialSecretKey);
|
||||
// 实例化一个http选项,可选的,没有特殊需求可以跳过
|
||||
@@ -181,8 +184,8 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
||||
String idcardno = info.getString("idnum");
|
||||
String name = info.getString("name");
|
||||
//2.在用户认证表中插入用户认证记录
|
||||
LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
IdentityAuthentication authentication = new IdentityAuthentication();
|
||||
// LoginUser loginUser = SecurityUtils.getLoginUser();
|
||||
|
||||
/**
|
||||
* 用户名
|
||||
* 用户名id
|
||||
@@ -192,15 +195,17 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
||||
* 认证状态0表示成功
|
||||
* 请求id
|
||||
*/
|
||||
authentication.setUserName(loginUser.getUsername());
|
||||
authentication.setUserId(loginUser.getUserId());
|
||||
// authentication.setUserName(loginUser.getUsername());
|
||||
// authentication.setUserId(loginUser.getUserId());
|
||||
authentication.setName(name);
|
||||
authentication.setIdentityNo(idcardno);
|
||||
authentication.setCertificationTime(new Date());
|
||||
authentication.setCertificationStatus(0);
|
||||
authentication.setCreateBy(loginUser.getUsername());
|
||||
authentication.setCreateBy(name);
|
||||
// authentication.setCreateBy(loginUser.getUsername());
|
||||
try {
|
||||
identityAuthenticationMapper.insertIdentityAuthentication(authentication);
|
||||
authentication.setId(authentication.getId());
|
||||
} catch (Exception e) {
|
||||
System.out.println("认证记录新增失败");
|
||||
}
|
||||
@@ -210,12 +215,14 @@ public class IdentityAuthenticationServiceImpl implements IdentityAuthentication
|
||||
}
|
||||
}
|
||||
}
|
||||
return AjaxResult.success();
|
||||
return AjaxResult.success(authentication);
|
||||
} catch (TencentCloudSDKException e) {
|
||||
System.out.println(e.toString());
|
||||
}
|
||||
return null;
|
||||
return AjaxResult.success();
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
+154
@@ -0,0 +1,154 @@
|
||||
package com.ruoyi.wisdomarbitrate.service.impl;
|
||||
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.http.HttpUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.alibaba.fastjson2.JSONArray;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
import com.ruoyi.common.constant.CacheConstants;
|
||||
import com.ruoyi.common.core.domain.AjaxResult;
|
||||
import com.ruoyi.common.core.domain.entity.SysDictData;
|
||||
import com.ruoyi.common.core.domain.entity.SysUser;
|
||||
import com.ruoyi.common.core.domain.model.LoginUser;
|
||||
import com.ruoyi.common.core.redis.RedisCache;
|
||||
import com.ruoyi.common.utils.SecurityUtils;
|
||||
import com.ruoyi.common.utils.SmsUtils;
|
||||
import com.ruoyi.common.utils.StringUtils;
|
||||
import com.ruoyi.common.utils.http.HttpUtils;
|
||||
import com.ruoyi.common.utils.spring.SpringUtils;
|
||||
import com.ruoyi.system.mapper.SysUserMapper;
|
||||
import com.ruoyi.wisdomarbitrate.domain.IdentityAuthentication;
|
||||
import com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.IdentityAuthenticationMapper;
|
||||
import com.ruoyi.wisdomarbitrate.mapper.WeChatUserMapper;
|
||||
import com.ruoyi.wisdomarbitrate.service.WeChatUserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.List;
|
||||
import java.util.Random;
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
/**
|
||||
* @author wangqiong
|
||||
* @description 微信小程序用户注册登录
|
||||
* @date 2023-10-16 11:45
|
||||
*/
|
||||
@Service
|
||||
@Slf4j
|
||||
public class WeChatUserServiceImpl implements WeChatUserService {
|
||||
String appid="wx91cb8459dca561b4";//自行获取
|
||||
//小程序secret
|
||||
String secret="190aaa3bda96a65d25318fbb0e133fc6";//自己去公众号后台获取
|
||||
// 获取openId
|
||||
String openIdUrl = "https://api.weixin.qq.com/sns/jscode2session";
|
||||
@Autowired
|
||||
private WeChatUserMapper weChatUserMapper;
|
||||
@Autowired
|
||||
private SysUserMapper sysUserMapper;
|
||||
@Autowired
|
||||
private IdentityAuthenticationMapper identityAuthenticationMapper;
|
||||
|
||||
@Override
|
||||
public String sendCode(WeChatUserVO userVO) {
|
||||
|
||||
Random random = new Random();
|
||||
String code = "";
|
||||
for (int i = 0; i < 6; i++) {
|
||||
|
||||
code += random.nextInt(10);
|
||||
}
|
||||
SmsUtils.SendSmsRequest request = new SmsUtils.SendSmsRequest();
|
||||
request.setTemplateId("1955047");
|
||||
// 1954926 普通短信 短信验证码 验证码:,为了保证您的账户安全,请勿想他人泄露验证码信息。如非本人操作,请忽略本短信。
|
||||
request.setPhone(userVO.getPhone());
|
||||
request.setTemplateParamSet(new String[]{ code});
|
||||
Boolean flag = SmsUtils.sendSms(request);
|
||||
if(flag){
|
||||
setCodeCache(userVO.getPhone(),code);
|
||||
return "短信发送成功";
|
||||
}
|
||||
return "短信发送失败";
|
||||
}
|
||||
/**
|
||||
* 设置字典缓存
|
||||
*
|
||||
* @param key 参数键
|
||||
* @param code 字典数据列表
|
||||
*/
|
||||
public static void setCodeCache(String key, String code)
|
||||
{
|
||||
SpringUtils.getBean(RedisCache.class).setCacheObject(getVerifyCodeCacheKey(key), code, 5,TimeUnit.MILLISECONDS);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 获取字典缓存
|
||||
*
|
||||
* @param key 参数键
|
||||
* @return dictDatas 字典数据列表
|
||||
*/
|
||||
public static String getCodeCache(String key)
|
||||
{
|
||||
String codeCache = SpringUtils.getBean(RedisCache.class).getCacheObject(getVerifyCodeCacheKey(key));
|
||||
if (StringUtils.isNotNull(codeCache))
|
||||
{
|
||||
return codeCache;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private static String getVerifyCodeCacheKey(String key) {
|
||||
return CacheConstants.WE_CHAT_SMS_VERIFY_CODE_KEY + key;
|
||||
}
|
||||
@Transactional
|
||||
@Override
|
||||
public AjaxResult registerUser(IdentityAuthentication ientityAuthentication) {
|
||||
// 校验短信验证码
|
||||
if(StrUtil.isEmpty(getCodeCache(ientityAuthentication.getPhone()))){
|
||||
return AjaxResult.success("验证码校验失败");
|
||||
}
|
||||
SysUser sysUserName=sysUserMapper.selectUserByUserName(ientityAuthentication.getUserName());
|
||||
if(sysUserName!=null){
|
||||
return AjaxResult.warn("账号已存在");
|
||||
}
|
||||
// 根据身份证查询系统用户表中是否存在该用户,存在则同步已认证的信息,不存在则新增
|
||||
SysUser sysUser=sysUserMapper.selectUserByIdCard(ientityAuthentication.getIdentityNo());
|
||||
|
||||
if(sysUser!=null){
|
||||
sysUser.setIdCard(ientityAuthentication.getIdentityNo());
|
||||
sysUser.setNickName(ientityAuthentication.getName());
|
||||
sysUser.setUserName(ientityAuthentication.getUserName());
|
||||
sysUser.setPhonenumber(ientityAuthentication.getPhone());
|
||||
sysUser.setEmail(ientityAuthentication.getEmail());
|
||||
sysUser.setPassword(SecurityUtils.encryptPassword(ientityAuthentication.getPassWord()));
|
||||
sysUserMapper.updateUser(sysUser);
|
||||
ientityAuthentication.setUserId(sysUser.getUserId());
|
||||
}else {
|
||||
sysUser=new SysUser();
|
||||
// 用户名设为电话号
|
||||
sysUser.setUserName(ientityAuthentication.getPhone());
|
||||
sysUser.setIdCard(ientityAuthentication.getIdentityNo());
|
||||
sysUser.setNickName(ientityAuthentication.getName());
|
||||
sysUser.setUserName(ientityAuthentication.getUserName());
|
||||
sysUser.setPhonenumber(ientityAuthentication.getPhone());
|
||||
sysUser.setEmail(ientityAuthentication.getEmail());
|
||||
sysUser.setCreateBy(ientityAuthentication.getPhone());
|
||||
sysUser.setPassword(SecurityUtils.encryptPassword(ientityAuthentication.getPassWord()));
|
||||
int row = sysUserMapper.insertUser(sysUser);
|
||||
if(row<1) {
|
||||
return AjaxResult.error("注册失败");
|
||||
}
|
||||
}
|
||||
|
||||
ientityAuthentication.setUserId(sysUser.getUserId());
|
||||
ientityAuthentication.setUserName(sysUser.getUserName());
|
||||
// 已经认证过的用户才能注册,认证表中已经有该数据
|
||||
identityAuthenticationMapper.updateIdentityAuthentication(ientityAuthentication);
|
||||
return AjaxResult.success("注册成功");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -177,7 +177,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
</select>
|
||||
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
<select id="selectUserByIdCard" parameterType="String" resultMap="SysUserResult">
|
||||
select u.* from sys_user u
|
||||
where u.id_card = #{idCard} and u.del_flag = '0' and u.status='0' order by u.create_time limit 1
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertUser" parameterType="SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into sys_user(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
|
||||
@@ -54,11 +54,11 @@
|
||||
<insert id="batchCaseAffiliate">
|
||||
insert into case_affiliate(case_appli_id, identity_type,application_organ_id,application_organ_name,name,identity_num,contact_telphone,
|
||||
contact_address,work_address,work_telphone ,name_agent,identity_num_agent,contact_telphone_agent,
|
||||
contact_address_agent ) values
|
||||
contact_address_agent,applicant_agent_user_id ) values
|
||||
<foreach item="item" index="index" collection="list" separator=",">
|
||||
(#{item.caseAppliId},#{item.identityType},#{item.applicationOrganId},#{item.applicationOrganName},#{item.name},#{item.identityNum},#{item.contactTelphone},
|
||||
#{item.contactAddress},#{item.workAddress},#{item.workTelphone}, #{item.nameAgent},#{item.identityNumAgent},
|
||||
#{item.contactTelphoneAgent},#{item.contactAddressAgent})
|
||||
#{item.contactTelphoneAgent},#{item.contactAddressAgent},#{item.applicantAgentUserId})
|
||||
</foreach>
|
||||
</insert>
|
||||
|
||||
@@ -71,6 +71,7 @@
|
||||
identity_type= #{identityType},
|
||||
application_organ_id= #{applicationOrganId},
|
||||
application_organ_name= #{applicationOrganName},
|
||||
applicant_agent_user_id= #{applicantAgentUserId},
|
||||
name = #{name},
|
||||
identity_num = #{identityNum},
|
||||
contact_telphone = #{contactTelphone},
|
||||
|
||||
@@ -38,28 +38,30 @@
|
||||
</resultMap>
|
||||
|
||||
<select id="selectCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||
select t1.* from(
|
||||
select t1.* from(
|
||||
select t.* from(
|
||||
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
||||
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||
ELSE '无审理方式'
|
||||
END arbitratMethodName,
|
||||
ELSE '无审理方式'
|
||||
END arbitratMethodName,
|
||||
c.case_status ,
|
||||
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
||||
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
||||
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
||||
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
||||
when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
||||
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
||||
ELSE '无案件状态'
|
||||
END caseStatusName,
|
||||
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
||||
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
||||
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
||||
when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
||||
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
||||
ELSE '无案件状态'
|
||||
END caseStatusName,
|
||||
c.hear_date ,c.arbitrat_claims ,
|
||||
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
||||
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag
|
||||
,c.fee_payable ,
|
||||
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
||||
c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as applicantName,
|
||||
c.update_by ,c.update_time , c.arbitrator_name,ca.name,ca.application_organ_id,ca.application_organ_name as
|
||||
applicantName,
|
||||
c.arbitrator_id,ca.identity_num , ca.identity_type,c.filearbitra_url
|
||||
from case_application c
|
||||
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id and ca.identity_type=1
|
||||
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id
|
||||
<where>
|
||||
<if test="caseStatus != null">
|
||||
AND c.case_status = #{caseStatus}
|
||||
@@ -77,29 +79,34 @@ select t1.* from(
|
||||
) t
|
||||
<where>
|
||||
|
||||
<!--被申请人-->
|
||||
<if test="idCard != null and idCard != ''">
|
||||
or (t.identity_num=#{idCard} AND t.identity_type=2)
|
||||
</if>
|
||||
<!--仲裁员-->
|
||||
<if test="userId != null and userId != ''">
|
||||
or instr (t.arbitrator_id,#{userId})>0
|
||||
</if>
|
||||
<!--法律顾问-->
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
or t.name
|
||||
in
|
||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
<!--被申请人-->
|
||||
<if test="idCard != null and idCard != ''">
|
||||
or (t.identity_num=#{idCard} AND t.identity_type=2 and t.case_status=4)
|
||||
</if>
|
||||
<!--仲裁员-->
|
||||
<if test="userId != null and userId != ''">
|
||||
or ( t.identity_type=1 and
|
||||
t.case_status in (7,8,9,12,13,14)
|
||||
and
|
||||
instr (t.arbitrator_id,#{userId})>0)
|
||||
</if>
|
||||
<!--法律顾问-->
|
||||
<if test="deptIds != null and deptIds.size() > 0">
|
||||
or (t.identity_type=1 and t.case_status in (1,5,11,15,16)
|
||||
and t.application_organ_id in
|
||||
<foreach item="item" collection="deptIds" open="(" separator="," close=")">
|
||||
#{item}
|
||||
</foreach> )
|
||||
</if>
|
||||
|
||||
</where>
|
||||
</where>
|
||||
) t1
|
||||
<where>
|
||||
<!--申请人-->
|
||||
<if test="nameId != null and nameId != ''">
|
||||
and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1 )
|
||||
and ( t1.application_organ_id = #{nameId} AND t1.identity_type=1
|
||||
and t1.case_status in (0,2)
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
order by t1.create_time desc,t1.case_num desc
|
||||
@@ -143,6 +150,50 @@ select t1.* from(
|
||||
</where>
|
||||
order by c.create_time desc,c.case_num desc
|
||||
</select>
|
||||
<select id="selectDeptHeadCaseApplicationList" parameterType="CaseApplication" resultMap="CaseApplicationResult">
|
||||
select c.id ,c.case_num ,c.case_subject_amount ,c.register_date ,c.arbitrat_method ,
|
||||
CASE c.arbitrat_method when 1 then '开庭审理' when 2 then '书面审理'
|
||||
ELSE '无审理方式'
|
||||
END arbitratMethodName,
|
||||
c.case_status ,
|
||||
CASE c.case_status when 0 then '立案申请' when 1 then '待立案审查' when 2 then '待缴费'
|
||||
when 3 then '待缴费确认' when 4 then '待案件质证' when 5 then '待组庭审核'
|
||||
when 6 then '待组庭确定' when 7 then '待审核仲裁方式' when 8 then '待开庭审理'
|
||||
when 9 then '待书面审理' when 10 then '待生成仲裁文书' when 11 then '待核验仲裁文书'
|
||||
when 12 then '待审核仲裁文书' when 13 then '待仲裁文书签名' when 14 then '待仲裁文书用印'
|
||||
when 15 then '待仲裁文书送达' when 16 then '待案件归档' when 17 then '已归档'
|
||||
ELSE '无案件状态'
|
||||
END caseStatusName,
|
||||
c.hear_date ,c.arbitrat_claims ,
|
||||
c.loan_start_date ,c.loan_end_date ,c.claim_princi_owed ,c.claim_interest_owed ,c.claim_liquid_damag ,c.fee_payable ,
|
||||
c.begin_video_date ,c.online_video_person ,c.contract_number ,c.create_by ,c.create_time ,
|
||||
c.update_by ,c.update_time , c.arbitrator_name,ca.application_organ_id applicationOrganId ,ca.application_organ_name as applicantName,c.filearbitra_url
|
||||
from case_application c
|
||||
LEFT JOIN case_affiliate ca ON ca.case_appli_id = c.id AND ca.identity_type=1
|
||||
<where>
|
||||
c.case_status in
|
||||
<foreach item="caseStatus" collection="statusList" open="(" separator="," close=")">
|
||||
#{caseStatus}
|
||||
</foreach>
|
||||
<if test="caseApplication.caseStatus != null">
|
||||
AND c.case_status = #{caseApplication.caseStatus}
|
||||
</if>
|
||||
<if test="caseApplication.caseNum != null and caseApplication.caseNum != ''">
|
||||
AND c.case_num = #{caseApplication.caseNum}
|
||||
</if>
|
||||
<if test="caseApplication.nameId != null and caseApplication.nameId != ''">
|
||||
AND ca.application_organ_id=#{caseApplication.nameId} AND ca.identity_type=1
|
||||
</if>
|
||||
<if test="caseApplication.caseStatusList != null and caseApplication.caseStatusList.size() > 0">
|
||||
and c.case_status in
|
||||
<foreach item="caseStatus" collection="caseApplication.caseStatusList" open="(" separator="," close=")">
|
||||
#{caseStatus}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
order by c.create_time desc,c.case_num desc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectCaseApplicationCount" parameterType="CaseApplication" resultType="int">
|
||||
select count(1) from case_application c
|
||||
@@ -310,7 +361,7 @@ select t1.* from(
|
||||
END paymentStatusName,c.pay_type,
|
||||
CASE c.pay_type when 0 then '线上支付' when 0 then '线下支付' else '' end payTypeName
|
||||
from case_application c left join case_payment_record p on c.id = p.case_id
|
||||
where c.case_status = 3 and p.payment_status = 1
|
||||
where c.case_status = 3
|
||||
AND c.id = #{id}
|
||||
|
||||
</select>
|
||||
|
||||
+14
@@ -11,12 +11,14 @@
|
||||
<result property="certificationStatus" column="certification_status" />
|
||||
<result property="userId" column="user_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
<result property="idAddress" column="id_address" />
|
||||
|
||||
</resultMap>
|
||||
|
||||
<insert id="insertIdentityAuthentication" parameterType="IdentityAuthentication" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into identi_authenti(
|
||||
<if test="userId != null">user_id,</if>
|
||||
<if test="idAddress != null and idAddress != ''">id_address,</if>
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="identityNo != null and identityNo != ''">identity_no,</if>
|
||||
certification_time,
|
||||
@@ -26,6 +28,7 @@
|
||||
create_time
|
||||
)values(
|
||||
<if test="userId != null ">#{userId},</if>
|
||||
<if test="idAddress != null and idAddress != ''">#{idAddress},</if>
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="identityNo != null and identityNo != ''">#{identityNo},</if>
|
||||
sysdate(),
|
||||
@@ -35,6 +38,17 @@
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
<update id="updateIdentityAuthentication">
|
||||
update identi_authenti
|
||||
<set>
|
||||
<if test="userId != null ">user_id = #{userId},</if>
|
||||
<if test="userName != null and userName != ''">user_name = #{userName},</if>
|
||||
<if test="identityNo != null and identityNo != ''">identity_no = #{identityNo},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="selectIdentityAuthentication" parameterType="IdentityAuthentication" resultMap="IdentityAuthenticationResult">
|
||||
SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certification_status ,i.user_id ,i.user_name
|
||||
|
||||
@@ -0,0 +1,61 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.ruoyi.wisdomarbitrate.mapper.WeChatUserMapper">
|
||||
<resultMap type="com.ruoyi.wisdomarbitrate.domain.vo.WeChatUserVO" id="BaseResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="name" column="name" />
|
||||
<result property="identityNo" column="identity_no" />
|
||||
<result property="certificationTime" column="certification_time" />
|
||||
<result property="certificationStatus" column="certification_status" />
|
||||
<result property="openId" column="open_id" />
|
||||
<result property="phone" column="phone" />
|
||||
<result property="email" column="email" />
|
||||
|
||||
</resultMap>
|
||||
<insert id="insertUser">
|
||||
insert into identi_authenti(
|
||||
<if test="name != null and name != ''">name,</if>
|
||||
<if test="identityNo != null and identityNo != ''">identity_no,</if>
|
||||
certification_time,
|
||||
<if test="certificationStatus != null ">certification_status,</if>
|
||||
<if test="openId != null ">open_id,</if>
|
||||
<if test="createBy != null and createBy != ''">create_by,</if>
|
||||
<if test="phone != null and phone != ''">phone,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
create_time
|
||||
|
||||
)values(
|
||||
<if test="name != null and name != ''">#{name},</if>
|
||||
<if test="identityNo != null and identityNo != ''">#{identityNo},</if>
|
||||
sysdate(),
|
||||
<if test="certificationStatus != null ">#{certificationStatus},</if>
|
||||
<if test="openId != null ">#{openId},</if>
|
||||
<if test="createBy != null and createBy != ''">#{createBy},</if>
|
||||
<if test="phone != null and phone != ''">#{phone},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
sysdate()
|
||||
)
|
||||
</insert>
|
||||
<update id="updateUser">
|
||||
update identi_authenti
|
||||
<set>
|
||||
<if test="phone != null and phone != ''">phone = #{phone},</if>
|
||||
<if test="email != null and email != ''">email = #{email},</if>
|
||||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<select id="selectIdentityAuthentication" resultMap="BaseResult">
|
||||
SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certification_status ,i.user_id ,i.user_name,open_id,phone,email
|
||||
from identi_authenti i
|
||||
</select>
|
||||
<select id="selectUserByOppenId" resultMap="BaseResult">
|
||||
SELECT i.id ,i.name ,i.identity_no ,i.certification_time ,i.certification_status ,i.user_id ,i.user_name,open_id,phone,email
|
||||
from identi_authenti i where open_id=#{oppenId}
|
||||
</select>
|
||||
|
||||
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user