提交 d2bff307 作者: zhenjie

springboot版本升级、后台用户接口修改

上级 7a902189
...@@ -9,6 +9,7 @@ import org.springframework.data.domain.Page; ...@@ -9,6 +9,7 @@ import org.springframework.data.domain.Page;
import javax.validation.constraints.Min; import javax.validation.constraints.Min;
import javax.validation.constraints.NotNull; import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.util.List;
/** /**
* @author: zj * @author: zj
...@@ -46,6 +47,9 @@ public class UserAccountQO implements Serializable { ...@@ -46,6 +47,9 @@ public class UserAccountQO implements Serializable {
@ApiModelProperty(value = "用户来源:0自然流,1海报,2抖音,3公众号,4社群,5招投标,默认0", hidden = true) @ApiModelProperty(value = "用户来源:0自然流,1海报,2抖音,3公众号,4社群,5招投标,默认0", hidden = true)
private Integer source; private Integer source;
@ApiModelProperty(value = "用户id集合")
private List<Integer> userIds;
@ApiModelProperty(value = "页码", required = true, example = "1") @ApiModelProperty(value = "页码", required = true, example = "1")
@NotNull(message = "页码不能为空", groups = Page.class) @NotNull(message = "页码不能为空", groups = Page.class)
@Min(value = 1, groups = Page.class) @Min(value = 1, groups = Page.class)
......
...@@ -80,4 +80,7 @@ public class BUserAccountVO implements Serializable { ...@@ -80,4 +80,7 @@ public class BUserAccountVO implements Serializable {
@ApiModelProperty(value = "县区编码", required = false) @ApiModelProperty(value = "县区编码", required = false)
private Integer districtCode; private Integer districtCode;
@ApiModelProperty(value = "地址,用“/”分隔", required = false)
private String address;
} }
package com.mmc.iuav.user.model.vo;
import io.swagger.annotations.ApiModelProperty;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import javax.validation.constraints.Email;
import java.io.Serializable;
import java.util.Date;
/**
* @author: zj
* @Date: 2023/6/21 17:32
*/
@Data
@AllArgsConstructor
@NoArgsConstructor
@Builder
public class BackUserAccountVO implements Serializable {
private static final long serialVersionUID = -9128622882856324055L;
@ApiModelProperty(value = "用户id")
private Integer id;
@ApiModelProperty(value = "用户uid")
private Integer uid;
@ApiModelProperty(value = "用户账号")
private String accountNo;
@ApiModelProperty(value = "手机号")
private String phoneNum;
@ApiModelProperty(value = "用户名称")
private String userName;
@ApiModelProperty(value = "用户昵称")
private String nickName;
@ApiModelProperty(value = "用户头像")
private String userImg;
@ApiModelProperty(value = "用户性别:0未知、1男、2女")
private Integer userSex;
@ApiModelProperty(value = "用户邮箱")
@Email
private String email;
@ApiModelProperty(value = "用户可用状态:0禁用、1可用")
private Integer accountStatus;
@ApiModelProperty(value = "备注")
private String remark;
@ApiModelProperty(value = "注册时间")
private Date createTime;
@ApiModelProperty(value = "企业认证状态, 0未通过,1通过")
private Integer companyAuthStatus;
@ApiModelProperty(value = "合作标签id")
private Integer cooperationTagId;
@ApiModelProperty(value = "企业名称")
private String companyName;
@ApiModelProperty(value = "合作标签名称")
private String tagName;
@ApiModelProperty(value = "地址")
private String address;
}
...@@ -28,7 +28,6 @@ public class UserApplyTagVO implements Serializable { ...@@ -28,7 +28,6 @@ public class UserApplyTagVO implements Serializable {
@NotNull(message = "加盟标签id不能为空", groups = { Insert.class }) @NotNull(message = "加盟标签id不能为空", groups = { Insert.class })
private Integer cooperationTagId; private Integer cooperationTagId;
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id")
//@NotNull(message = "加盟标签id不能为空", groups = { Insert.class })
private Integer userAccountId; private Integer userAccountId;
@ApiModelProperty(value = "申请人名称") @ApiModelProperty(value = "申请人名称")
@NotBlank(message = "申请人名称不能为空", groups = { Insert.class }) @NotBlank(message = "申请人名称不能为空", groups = { Insert.class })
...@@ -36,8 +35,6 @@ public class UserApplyTagVO implements Serializable { ...@@ -36,8 +35,6 @@ public class UserApplyTagVO implements Serializable {
@ApiModelProperty(value = "申请人手机号") @ApiModelProperty(value = "申请人手机号")
@NotBlank(message = "申请人手机号不能为空", groups = { Insert.class }) @NotBlank(message = "申请人手机号不能为空", groups = { Insert.class })
private String applyPhone; private String applyPhone;
@ApiModelProperty(value = "申请审核状态,0待审核,1通过,2未通过")
private Integer applyStatus;
@ApiModelProperty(value = "备注") @ApiModelProperty(value = "备注")
private String remark; private String remark;
} }
...@@ -35,17 +35,6 @@ ...@@ -35,17 +35,6 @@
<artifactId>spring-boot-starter-actuator</artifactId> <artifactId>spring-boot-starter-actuator</artifactId>
</dependency> </dependency>
<!-- 引入 Feign, 可以以声明的方式调用微服务 -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-openfeign</artifactId>
</dependency>
<!-- 使用okhttp-feign-连接池技术 -->
<dependency>
<groupId>io.github.openfeign</groupId>
<artifactId>feign-okhttp</artifactId>
</dependency>
<!-- mybatis驱动&Druid数据源-start --> <!-- mybatis驱动&Druid数据源-start -->
<dependency> <dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
...@@ -63,12 +52,6 @@ ...@@ -63,12 +52,6 @@
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId> <artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope> <scope>test</scope>
</dependency> </dependency>
......
...@@ -10,7 +10,9 @@ import com.mmc.iuav.user.model.dto.LoginSuccessDTO; ...@@ -10,7 +10,9 @@ import com.mmc.iuav.user.model.dto.LoginSuccessDTO;
import com.mmc.iuav.user.model.dto.UserAccountSimpleDTO; import com.mmc.iuav.user.model.dto.UserAccountSimpleDTO;
import com.mmc.iuav.user.model.qo.BUserAccountQO; import com.mmc.iuav.user.model.qo.BUserAccountQO;
import com.mmc.iuav.user.model.vo.BUserAccountVO; import com.mmc.iuav.user.model.vo.BUserAccountVO;
import com.mmc.iuav.user.model.vo.BackUserAccountVO;
import com.mmc.iuav.user.model.vo.UserAccountVO; import com.mmc.iuav.user.model.vo.UserAccountVO;
import com.mmc.iuav.user.service.BackUserAccountService;
import com.mmc.iuav.user.service.UserAccountService; import com.mmc.iuav.user.service.UserAccountService;
import io.swagger.annotations.*; import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -34,49 +36,48 @@ import java.util.List; ...@@ -34,49 +36,48 @@ import java.util.List;
public class BackUserAccountController extends BaseController{ public class BackUserAccountController extends BaseController{
@Autowired @Autowired
private UserAccountService userAccountService; private BackUserAccountService backUserAccountService;
@ApiOperation(value = "账号-新增") @ApiOperation(value = "账号-新增")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("insertBAccount") @PostMapping("insertBAccount")
public ResultBody insertBAccount(@Validated(value = {Create.class}) @RequestBody BUserAccountVO bUserAccountVO) { public ResultBody insertBAccount(@Validated(value = {Create.class}) @RequestBody BUserAccountVO bUserAccountVO) {
return userAccountService.insertBAccount(bUserAccountVO); return backUserAccountService.insertBAccount(bUserAccountVO);
} }
@ApiOperation(value = "账号-修改") @ApiOperation(value = "账号-修改")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("updateBAccount") @PostMapping("updateBAccount")
public ResultBody updateBAccount(@Validated(value = {Update.class}) @RequestBody BUserAccountVO bUserAccountVO) { public ResultBody updateBAccount(@Validated(value = {Update.class}) @RequestBody BUserAccountVO bUserAccountVO) {
return userAccountService.updateBAccount(bUserAccountVO); return backUserAccountService.updateBAccount(bUserAccountVO);
} }
@ApiOperation(value = "账号-删除") @ApiOperation(value = "账号-删除")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@GetMapping("removeBAccount") @GetMapping("removeBAccount")
public ResultBody removeBAccount(@RequestParam Integer userAccountId, HttpServletRequest request) { public ResultBody removeBAccount(@RequestParam Integer userAccountId, HttpServletRequest request) {
return userAccountService.removeBAccount(userAccountId); return backUserAccountService.removeBAccount(userAccountId);
} }
@ApiOperation(value = "账号-列表") @ApiOperation(value = "账号-列表")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("listBAccountPage") @PostMapping("listBAccountPage")
public ResultBody<UserAccountSimpleDTO> listBAccountPage(@ApiParam(value = "账号查询QO", required = true) @RequestBody BUserAccountQO bUserAccountQO) { public ResultBody<BackUserAccountVO> listBAccountPage(@ApiParam(value = "账号查询QO", required = true) @RequestBody BUserAccountQO bUserAccountQO) {
return userAccountService.listBAccountPage(bUserAccountQO); return backUserAccountService.listBAccountPage(bUserAccountQO);
} }
@ApiOperation(value = "账号-用户列表-内部调用", hidden = true) @ApiOperation(value = "账号-后台用户列表-内部调用", hidden = true)
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = List.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = List.class)})
@PostMapping("feignListBAccountPage") @PostMapping("feignListBAccountPage")
public List<UserAccountSimpleDTO> feignListBAccountPage(@ApiParam(value = "账号查询QO", required = true) @RequestBody BUserAccountQO bUserAccountQO) { public List<BackUserAccountVO> feignListBAccountPage(@ApiParam(value = "账号查询QO", required = true) @RequestBody BUserAccountQO bUserAccountQO) {
return userAccountService.feignListBAccountPage(bUserAccountQO); return backUserAccountService.feignListBAccountPage(bUserAccountQO);
} }
@ApiOperation(value = "账号管理-修改密码") @ApiOperation(value = "账号管理-修改密码")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
@PostMapping("updatePassword") @PostMapping("updatePassword")
public ResultBody updatePassword(@Validated(value = {UpdatePassword.class}) @RequestBody BUserAccountVO account) public ResultBody updatePassword(@Validated(value = {UpdatePassword.class}) @RequestBody BUserAccountVO account){
throws NoSuchAlgorithmException { return backUserAccountService.updatePassword(account);
return userAccountService.updatePassword(account);
} }
@ApiOperation(value = "feign-验证用户密码") @ApiOperation(value = "feign-验证用户密码")
...@@ -85,7 +86,7 @@ public class BackUserAccountController extends BaseController{ ...@@ -85,7 +86,7 @@ public class BackUserAccountController extends BaseController{
@GetMapping("feignAuthUserPwd") @GetMapping("feignAuthUserPwd")
public ResultBody feignAuthUserPwd(@RequestParam(required = true) Integer id, public ResultBody feignAuthUserPwd(@RequestParam(required = true) Integer id,
@RequestParam(required = true) String authPwd) { @RequestParam(required = true) String authPwd) {
return userAccountService.feignAuthUserPwd(id, authPwd); return backUserAccountService.feignAuthUserPwd(id, authPwd);
} }
} }
...@@ -4,6 +4,7 @@ import com.mmc.iuav.group.Page; ...@@ -4,6 +4,7 @@ import com.mmc.iuav.group.Page;
import com.mmc.iuav.group.Update; import com.mmc.iuav.group.Update;
import com.mmc.iuav.response.ResultBody; import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.user.model.dto.UserAccountSimpleDTO; import com.mmc.iuav.user.model.dto.UserAccountSimpleDTO;
import com.mmc.iuav.user.model.qo.BUserAccountQO;
import com.mmc.iuav.user.model.qo.UserAccountQO; import com.mmc.iuav.user.model.qo.UserAccountQO;
import com.mmc.iuav.user.model.vo.UserAccountVO; import com.mmc.iuav.user.model.vo.UserAccountVO;
import com.mmc.iuav.user.service.UserAccountService; import com.mmc.iuav.user.service.UserAccountService;
...@@ -19,7 +20,7 @@ import java.util.List; ...@@ -19,7 +20,7 @@ import java.util.List;
* @author: zj * @author: zj
* @Date: 2023/5/15 15:32 * @Date: 2023/5/15 15:32
*/ */
@Api(tags = "账号相关接口") @Api(tags = "小程序用户账号相关接口")
@RequestMapping("/user-account/") @RequestMapping("/user-account/")
@RestController @RestController
public class UserAccountController extends BaseController{ public class UserAccountController extends BaseController{
...@@ -77,6 +78,13 @@ public class UserAccountController extends BaseController{ ...@@ -77,6 +78,13 @@ public class UserAccountController extends BaseController{
return userAccountService.feignListUserAccountByIds(ids); return userAccountService.feignListUserAccountByIds(ids);
} }
@ApiOperation(value = "根据条件查询用户信息", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = UserAccountSimpleDTO.class) })
@PostMapping("feignListAppUserAccount")
public List<UserAccountSimpleDTO> feignListAppUserAccount(@ApiParam(value = "账号查询QO", required = true) @RequestBody UserAccountQO userAccountQO) {
return userAccountService.feignListUserAccount(userAccountQO);
}
@ApiOperation(value = "根据用户ids上级推荐人信息", hidden = true) @ApiOperation(value = "根据用户ids上级推荐人信息", hidden = true)
@ApiResponses({ @ApiResponse(code = 200, message = "OK", response = UserAccountSimpleDTO.class) }) @ApiResponses({ @ApiResponse(code = 200, message = "OK", response = UserAccountSimpleDTO.class) })
@PostMapping("feignListRcdUserInfo") @PostMapping("feignListRcdUserInfo")
...@@ -98,4 +106,6 @@ public class UserAccountController extends BaseController{ ...@@ -98,4 +106,6 @@ public class UserAccountController extends BaseController{
return userAccountService.feignGetUserRcdInfo(userAccountId); return userAccountService.feignGetUserRcdInfo(userAccountId);
} }
} }
package com.mmc.iuav.user.dao;
import com.mmc.iuav.user.entity.BackUserAccountDO;
import com.mmc.iuav.user.model.qo.BUserAccountQO;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
/**
* @author: zj
* @Date: 2023/6/21 15:33
*/
@Mapper
public interface BackUserAccountDao {
/**
* 添加后台用户
* @param backUserAccountDO
*/
void insertBackUserAccount(BackUserAccountDO backUserAccountDO);
/**
* 修改后台用户
* @param backUserAccountDO
*/
void updateBackUserAccount(BackUserAccountDO backUserAccountDO);
/**
* 查看用户详情
* @param backUserAccountId
* @return
*/
BackUserAccountDO getBackUserAccountDO(Integer backUserAccountId);
/**
* 查询符合条件的用户个数
* @param bUserAccountQO
* @return
*/
int countListBackUserAccount(BUserAccountQO bUserAccountQO);
/**
* 查询符合条件的用户信息
* @param bUserAccountQO
* @return
*/
List<BackUserAccountDO> listBackUserAccount(BUserAccountQO bUserAccountQO);
/**
* 删除用户信息
* @param id
*/
void removeBackUserAccountDO(Integer id);
/**
* 远程调用查询用户信息
* @param bUserAccountQO
* @return
*/
List<BackUserAccountDO> feignListBackUserAccount(BUserAccountQO bUserAccountQO);
/**
* 验证用户密码
* @param id
* @return
*/
BackUserAccountDO getAuthUserPwd(Integer id);
/**
* 登录账号密码查询用户信息
* @param accountNo
* @param passWord
* @return
*/
BackUserAccountDO getUserLoginInfo(String accountNo, String passWord);
/**
* 修改用户密码
* @param id
* @param passWord
*/
void updatePassword(Integer id, String passWord);
/**
* 根据账号名称查询数量
* @param excludeId
* @param accountNo
* @return
*/
int countUserAccountNo(Integer excludeId, String accountNo);
}
...@@ -60,10 +60,10 @@ public interface UserServiceDao { ...@@ -60,10 +60,10 @@ public interface UserServiceDao {
/** /**
* 批量获取用户信息 * 批量获取用户信息
* @param bUserAccountQO * @param userAccountQO
* @return * @return
*/ */
List<UserAccountDO> feignListBAccountPage(BUserAccountQO bUserAccountQO); List<UserAccountDO> feignListUserAccount(UserAccountQO userAccountQO);
/** /**
* 删除用户 * 删除用户
......
package com.mmc.iuav.user.entity;
import com.mmc.iuav.user.model.vo.BUserAccountVO;
import com.mmc.iuav.user.model.vo.BackUserAccountVO;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
import java.util.Date;
/**
* @author: zj
* @Date: 2023/6/21 15:35
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public class BackUserAccountDO implements Serializable {
private static final long serialVersionUID = 258826882034224799L;
private Integer id;
private String accountNo;
private String password;
private String phoneNum;
private String userName;
private Integer userSex;
private String email;
private Integer accountStatus;
private Integer provinceCode;
private Integer cityCode;
private Integer districtCode;
private Integer deleted;
private Date createTime;
private Date updateTime;
private String remark;
private String address;
public BackUserAccountDO(BUserAccountVO bUserAccountVO) {
this.id = bUserAccountVO.getId();
this.accountNo = bUserAccountVO.getAccountNo();
this.phoneNum = bUserAccountVO.getPhoneNum();
this.userName = bUserAccountVO.getUserName();
this.email = bUserAccountVO.getEmail();
this.provinceCode = bUserAccountVO.getProvinceCode();
this.cityCode = bUserAccountVO.getCityCode();
this.districtCode = bUserAccountVO.getDistrictCode();
this.remark = bUserAccountVO.getRemark();
this.address = bUserAccountVO.getAddress();
}
public BackUserAccountVO buildBackUserAccountVO(){
return BackUserAccountVO.builder().id(this.id).uid(this.id).accountNo(this.accountNo).phoneNum(this.phoneNum).userName(this.userName).userSex(this.userSex).email(this.email)
.accountStatus(this.accountStatus).remark(this.remark).address(this.address).createTime(this.createTime).build();
}
}
...@@ -22,7 +22,6 @@ public class UserAccountDO implements Serializable { ...@@ -22,7 +22,6 @@ public class UserAccountDO implements Serializable {
private static final long serialVersionUID = 5007589179946146721L; private static final long serialVersionUID = 5007589179946146721L;
private Integer id; private Integer id;
private String accountNo; private String accountNo;
private Integer accountType;
private String password; private String password;
private String uid; private String uid;
private String phoneNum; private String phoneNum;
...@@ -76,14 +75,14 @@ public class UserAccountDO implements Serializable { ...@@ -76,14 +75,14 @@ public class UserAccountDO implements Serializable {
} }
public UserAccountVO buildUserAccountVO() { public UserAccountVO buildUserAccountVO() {
return UserAccountVO.builder().id(this.id).uid(this.uid).accountNo(this.accountNo).accountType(this.accountType).phoneNum(this.phoneNum).userName(this.userName).nickName(this.nickName) return UserAccountVO.builder().id(this.id).uid(this.uid).accountNo(this.accountNo).phoneNum(this.phoneNum).userName(this.userName).nickName(this.nickName)
.userImg(this.userImg).userSex(this.userSex).email(this.email).source(this.source).accountStatus(this.accountStatus).remark(this.remark).portType(this.portType) .userImg(this.userImg).userSex(this.userSex).email(this.email).source(this.source).accountStatus(this.accountStatus).remark(this.remark).portType(this.portType)
.createTime(this.createTime).companyAuthStatus(this.companyAuthStatus == null || this.companyAuthStatus != 1 ? 0 : 1).cooperationTagId(this.cooperationTagId).companyName(this.companyName) .createTime(this.createTime).companyAuthStatus(this.companyAuthStatus == null || this.companyAuthStatus != 1 ? 0 : 1).cooperationTagId(this.cooperationTagId).companyName(this.companyName)
.tagName(this.tagName).build(); .tagName(this.tagName).build();
} }
public UserAccountSimpleDTO buildUserAccountSimpleDTO() { public UserAccountSimpleDTO buildUserAccountSimpleDTO() {
return UserAccountSimpleDTO.builder().id(this.id).uid(this.uid).accountNo(this.accountNo).accountType(this.accountType).phoneNum(this.phoneNum).userName(this.userName).nickName(this.nickName) return UserAccountSimpleDTO.builder().id(this.id).uid(this.uid).accountNo(this.accountNo).phoneNum(this.phoneNum).userName(this.userName).nickName(this.nickName)
.userImg(this.userImg).userSex(this.userSex).email(this.email).source(this.source).accountStatus(this.accountStatus).portType(this.portType) .userImg(this.userImg).userSex(this.userSex).email(this.email).source(this.source).accountStatus(this.accountStatus).portType(this.portType)
.companyAuthStatus(this.companyAuthStatus == null || this.companyAuthStatus != 1 ? 0 : 1).cooperationTagId(this.cooperationTagId).companyName(this.companyName) .companyAuthStatus(this.companyAuthStatus == null || this.companyAuthStatus != 1 ? 0 : 1).cooperationTagId(this.cooperationTagId).companyName(this.companyName)
.build(); .build();
......
...@@ -21,12 +21,11 @@ public class UserApplyTagDO implements Serializable { ...@@ -21,12 +21,11 @@ public class UserApplyTagDO implements Serializable {
private Integer userAccountId; private Integer userAccountId;
private String applyName; private String applyName;
private String applyPhone; private String applyPhone;
private Integer applyStatus;
private String remark; private String remark;
public UserApplyTagVO buildUserApplyTagVO(){ public UserApplyTagVO buildUserApplyTagVO(){
return UserApplyTagVO.builder().id(id).cooperationTagId(cooperationTagId).userAccountId(this.userAccountId) return UserApplyTagVO.builder().id(id).cooperationTagId(cooperationTagId).userAccountId(this.userAccountId)
.applyName(this.applyName).applyPhone(this.applyPhone).applyStatus(this.applyStatus).remark(this.remark).build(); .applyName(this.applyName).applyPhone(this.applyPhone).remark(this.remark).build();
} }
public UserApplyTagDO(UserApplyTagVO userApplyTagVO){ public UserApplyTagDO(UserApplyTagVO userApplyTagVO){
......
package com.mmc.iuav.user.service;
import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.user.model.dto.UserAccountSimpleDTO;
import com.mmc.iuav.user.model.qo.BUserAccountQO;
import com.mmc.iuav.user.model.vo.BUserAccountVO;
import com.mmc.iuav.user.model.vo.BackUserAccountVO;
import com.mmc.iuav.user.model.vo.UserAccountVO;
import java.util.List;
/**
* @author: zj
* @Date: 2023/6/21 15:48
*/
public interface BackUserAccountService {
/**
* 添加后台用户
* @param bUserAccountVO
* @return
*/
ResultBody insertBAccount(BUserAccountVO bUserAccountVO);
/**
* 添加后台用户信息
* @param bUserAccountVO
* @return
*/
ResultBody updateBAccount(BUserAccountVO bUserAccountVO);
/**
* 删除后台用户
* @param userAccountId
* @return
*/
ResultBody removeBAccount(Integer userAccountId);
/**
* 后台用户列表
* @param bUserAccountQO
* @return
*/
ResultBody<BackUserAccountVO> listBAccountPage(BUserAccountQO bUserAccountQO);
/**
* 内部远程调用查询用户信息
* @param bUserAccountQO
* @return
*/
List<BackUserAccountVO> feignListBAccountPage(BUserAccountQO bUserAccountQO);
/**
* 修改用户密码
* @param account
* @return
*/
ResultBody updatePassword(BUserAccountVO account);
/**
* 内部确认用户密码
* @param id
* @param authPwd
* @return
*/
ResultBody feignAuthUserPwd(Integer id, String authPwd);
}
...@@ -90,10 +90,10 @@ public interface UserAccountService { ...@@ -90,10 +90,10 @@ public interface UserAccountService {
/** /**
* 内部获取用户列表 * 内部获取用户列表
* @param bUserAccountQO * @param userAccountQO
* @return * @return
*/ */
List<UserAccountSimpleDTO> feignListBAccountPage(BUserAccountQO bUserAccountQO); List<UserAccountSimpleDTO> feignListUserAccount(UserAccountQO userAccountQO);
/** /**
* 修改用户信息 * 修改用户信息
......
...@@ -107,7 +107,6 @@ public class AuthServiceImpl implements AuthService { ...@@ -107,7 +107,6 @@ public class AuthServiceImpl implements AuthService {
userAccountDO.setOpenId(openId); userAccountDO.setOpenId(openId);
uid = CodeUtil.generateUserUID(); uid = CodeUtil.generateUserUID();
userAccountDO.setUid(uid); userAccountDO.setUid(uid);
userAccountDO.setAccountType(0);
userAccountDO.setPortType(100); userAccountDO.setPortType(100);
userAccountDO.setSource(wxLoginVO.getSource()); userAccountDO.setSource(wxLoginVO.getSource());
userAccountService.insertUserAccount(userAccountDO); userAccountService.insertUserAccount(userAccountDO);
......
package com.mmc.iuav.user.service.impl;
import com.mmc.iuav.general.CodeUtil;
import com.mmc.iuav.page.PageResult;
import com.mmc.iuav.response.ResultBody;
import com.mmc.iuav.response.ResultEnum;
import com.mmc.iuav.user.auth.PwdUtil;
import com.mmc.iuav.user.dao.BackUserAccountDao;
import com.mmc.iuav.user.entity.BackUserAccountDO;
import com.mmc.iuav.user.model.qo.BUserAccountQO;
import com.mmc.iuav.user.model.vo.BUserAccountVO;
import com.mmc.iuav.user.model.vo.BackUserAccountVO;
import com.mmc.iuav.user.service.BackUserAccountService;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.security.NoSuchAlgorithmException;
import java.util.List;
import java.util.stream.Collectors;
/**
* @author: zj
* @Date: 2023/6/21 15:48
*/
@Service
public class BackUserAccountServiceImpl implements BackUserAccountService {
@Autowired
private BackUserAccountDao backUserAccountDao;
@Override
public ResultBody insertBAccount(BUserAccountVO bUserAccountVO) {
if (!bUserAccountVO.getPassWord().equals(bUserAccountVO.getAlertPwd())) {
// 两次密码不一致
return ResultBody.error(ResultEnum.PWD_ALERT_ERROR);
}
// 获取新增的账户名是否已经存在
int count = backUserAccountDao.countUserAccountNo(null, bUserAccountVO.getAccountNo());
if (count > 0) {
return ResultBody.error(ResultEnum.ADD_USER_ACCOUNT_NAME_EXISTS);
}
BackUserAccountDO backUserAccountDO = new BackUserAccountDO(bUserAccountVO);
try {
backUserAccountDO.setPassword(PwdUtil.securityPwd(bUserAccountVO.getPassWord()));
} catch (NoSuchAlgorithmException e) {
return ResultBody.error(ResultEnum.PWD_CREATE_ERROR);
}
backUserAccountDao.insertBackUserAccount(backUserAccountDO);
return ResultBody.success();
}
@Override
public ResultBody updateBAccount(BUserAccountVO bUserAccountVO) {
// 判断账号是否重复
if (!StringUtils.isEmpty(bUserAccountVO.getAccountNo())) {
// 如果传入的名字不为空,就查找数据库,看名字是否重复
int count = backUserAccountDao.countUserAccountNo(bUserAccountVO.getId(), bUserAccountVO.getAccountNo());
if (count > 0) {
return ResultBody.error(ResultEnum.UPDATE_USER_ACCOUNT_REPEAT);
}
}
BackUserAccountDO userAccountDO = new BackUserAccountDO(bUserAccountVO);
backUserAccountDao.updateBackUserAccount(userAccountDO);
return ResultBody.success();
}
@Override
public ResultBody removeBAccount(Integer userAccountId) {
backUserAccountDao.removeBackUserAccountDO(userAccountId);
return ResultBody.success();
}
@Override
public ResultBody<BackUserAccountVO> listBAccountPage(BUserAccountQO param) {
int count = backUserAccountDao.countListBackUserAccount(param);
if (count == 0) {
return ResultBody.success(PageResult.buildPage(param.getPageNo(), param.getPageSize(), count));
}
Integer pageNo = param.getPageNo();
param.buildCurrentPage();
List<BackUserAccountDO> users = backUserAccountDao.listBackUserAccount(param);
List<BackUserAccountVO> collect = users.stream().map(BackUserAccountDO::buildBackUserAccountVO).collect(Collectors.toList());
return ResultBody.success(PageResult.buildPage(pageNo, param.getPageSize(), count, collect));
}
@Override
public List<BackUserAccountVO> feignListBAccountPage(BUserAccountQO bUserAccountQO) {
List<BackUserAccountDO> list = backUserAccountDao.feignListBackUserAccount(bUserAccountQO);
if (list == null) {
return null;
}
List<BackUserAccountVO> accountSimpleDTOS = list.stream().map(BackUserAccountDO::buildBackUserAccountVO).collect(Collectors.toList());
return accountSimpleDTOS;
}
@Override
public ResultBody updatePassword(BUserAccountVO account) {
if (!account.getPassWord().equals(account.getAlertPwd())) {
return ResultBody.error(ResultEnum.PASSWORD_INCONSISTENT);
}
try {
account.setPassWord(PwdUtil.securityPwd(account.getPassWord()));
backUserAccountDao.updatePassword(account.getId(), account.getPassWord());
} catch (NoSuchAlgorithmException e) {
return ResultBody.error(ResultEnum.PWD_CONPARED_ERROR);
}
return ResultBody.success();
}
@Override
public ResultBody feignAuthUserPwd(Integer id, String authPwd) {
BackUserAccountDO account = backUserAccountDao.getAuthUserPwd(id);
if (account == null) {
return ResultBody.error(ResultEnum.LOGIN_ACCOUNT_NOT_EXIT_ERROR);
}
String pwd = "";
try {
pwd = PwdUtil.securityPwd(authPwd);
} catch (NoSuchAlgorithmException e) {
return ResultBody.error(ResultEnum.PWD_CREATE_ERROR);
}
if (!pwd.equals(account.getPassword())) {
return ResultBody.error(ResultEnum.PWD_CONPARED_ERROR);
}
return ResultBody.success();
}
}
...@@ -47,16 +47,8 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -47,16 +47,8 @@ public class CooperationServiceImpl implements CooperationService {
//判断是否已加盟 //判断是否已加盟
UserApplyTagDO existUserApplyTagDO = cooperationDao.getUserApplyTag(userApplyTagVO.getUserAccountId()); UserApplyTagDO existUserApplyTagDO = cooperationDao.getUserApplyTag(userApplyTagVO.getUserAccountId());
if (existUserApplyTagDO != null) { if (existUserApplyTagDO != null) {
if (existUserApplyTagDO.getApplyStatus().equals(0)){ cooperationDao.updateUserApplyTag(userApplyTagDO);
return ResultBody.error("已存在合作申请,待审核"); return ResultBody.success();
}else if (existUserApplyTagDO.getApplyStatus().equals(1)){
return ResultBody.success("已申请通过");
}else {
userApplyTagDO.setId(existUserApplyTagDO.getId());
userApplyTagDO.setApplyStatus(0);
cooperationDao.updateUserApplyTag(userApplyTagDO);
return ResultBody.success();
}
} }
cooperationDao.addApply(userApplyTagDO); cooperationDao.addApply(userApplyTagDO);
return ResultBody.success(); return ResultBody.success();
......
...@@ -136,7 +136,6 @@ public class UserAccountServiceImpl implements UserAccountService { ...@@ -136,7 +136,6 @@ public class UserAccountServiceImpl implements UserAccountService {
} }
userAccountDO.setUid(CodeUtil.generateUserUID()); userAccountDO.setUid(CodeUtil.generateUserUID());
userAccountDO.setAccountType(0);
userAccountDO.setPortType(0); userAccountDO.setPortType(0);
userAccountDO.setOpenId(userAccountDO.getUid()); userAccountDO.setOpenId(userAccountDO.getUid());
userAccountDO.setUnionId(userAccountDO.getUid()); userAccountDO.setUnionId(userAccountDO.getUid());
...@@ -171,8 +170,8 @@ public class UserAccountServiceImpl implements UserAccountService { ...@@ -171,8 +170,8 @@ public class UserAccountServiceImpl implements UserAccountService {
} }
@Override @Override
public List<UserAccountSimpleDTO> feignListBAccountPage(BUserAccountQO bUserAccountQO) { public List<UserAccountSimpleDTO> feignListUserAccount(UserAccountQO userAccountQO) {
List<UserAccountDO> list = userServiceDao.feignListBAccountPage(bUserAccountQO); List<UserAccountDO> list = userServiceDao.feignListUserAccount(userAccountQO);
if (list == null) { if (list == null) {
return null; return null;
} }
......
<?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.mmc.iuav.user.dao.BackUserAccountDao">
<resultMap id="backUserAccountResultMap" type="com.mmc.iuav.user.entity.BackUserAccountDO">
<id property="id" column="id"/>
<result property="accountNo" column="account_no"/>
<result property="phoneNum" column="phone_num"/>
<result property="userName" column="user_name"/>
<result property="userSex" column="user_sex"/>
<result property="email" column="email"/>
<result property="accountStatus" column="account_status"/>
<result property="provinceCode" column="province_code"/>
<result property="cityCode" column="city_code"/>
<result property="districtCode" column="district_code"/>
<result property="address" column="address"/>
<result property="remark" column="remark"/>
<result property="deleted" column="is_deleted"/>
<result property="createTime" column="createTime"/>
<result property="updateTime" column="update_time"/>
</resultMap>
<insert id="insertBackUserAccount" parameterType="com.mmc.iuav.user.entity.BackUserAccountDO" keyProperty="id" useGeneratedKeys="true">
insert into back_user_account( account_no, pass_word, phone_num, user_name, user_sex, email, province_code, city_code, district_code, address, remark, create_time)
values(#{accountNo}, #{password}, #{phoneNum}, #{userName}, #{userSex}, #{email}, #{provinceCode}, #{cityCode}, #{districtCode}, #{address}, #{remark}, NOW())
</insert>
<update id="updateBackUserAccount">
update back_user_account
<set>
<if test="accountNo != null">
account_no = #{accountNo},
</if>
<if test="phoneNum != null">
phone_num = #{phoneNum},
</if>
<if test="userName != null">
user_name = #{userName},
</if>
<if test="userSex != null">
user_sex = #{userSex},
</if>
<if test="email != null">
email = #{email},
</if>
<if test="accountStatus != null">
account_status = #{accountStatus},
</if>
<if test="provinceCode != null">
province_code = #{provinceCode},
</if>
<if test="cityCode != null">
city_code = #{cityCode},
</if>
<if test="districtCode != null">
district_code = #{districtCode},
</if>
<if test="remark != null">
remark = #{remark},
</if>
<if test="address != null">
address = #{address}
</if>
</set>
<where>
id = #{id}
</where>
</update>
<update id="removeBackUserAccountDO">
update back_user_account set is_deleted = 1 where is_deleted = 0 and id = #{id}
</update>
<update id="updatePassword">
update back_user_account set pass_word = #{passWord} where id = #{id}
</update>
<select id="getBackUserAccountDO" resultType="com.mmc.iuav.user.entity.BackUserAccountDO">
select id, account_no, phone_num, user_name, user_sex, email, account_status, remark, province_code, city_code, district_code, address, is_deleted, create_time, update_time
from back_user_account
where id = #{id}
</select>
<select id="countListBackUserAccount" resultType="java.lang.Integer" parameterType="com.mmc.iuav.user.model.qo.BUserAccountQO">
select count(*) from back_user_account
where is_deleted = 0
<if test=" keyword != null and keyword != '' ">
and ( account_no like CONCAT("%",#{keyword},"%") or
user_name like CONCAT("%",#{keyword},"%") )
</if>
<if test="provinceCode != null">
and province_code = #{provinceCode}
</if>
<if test="cityCode != null">
and city_code = #{cityCode}
</if>
<if test="districtCode != null">
and district_code = #{districtCode}
</if>
<if test="accountStatus != null">
and account_status = #{accountStatus}
</if>
</select>
<select id="listBackUserAccount" resultMap="backUserAccountResultMap" parameterType="com.mmc.iuav.user.model.qo.BUserAccountQO">
select id, account_no, phone_num, user_name, user_sex, email, account_status, province_code, city_code, district_code, address, remark, create_time, update_time
from back_user_account
where is_deleted = 0
<if test=" keyword != null and keyword != '' ">
and ( account_no like CONCAT("%",#{keyword},"%") or
user_name like CONCAT("%",#{keyword},"%") )
</if>
<if test="provinceCode != null">
and province_code = #{provinceCode}
</if>
<if test="cityCode != null">
and city_code = #{cityCode}
</if>
<if test="districtCode != null">
and district_code = #{districtCode}
</if>
<if test="accountStatus != null">
and account_status = #{accountStatus}
</if>
</select>
<select id="feignListBackUserAccount" resultMap="backUserAccountResultMap" parameterType="com.mmc.iuav.user.model.qo.BUserAccountQO">
select ua.id, ua.account_no, ua.phone_num, ua.user_name, ua.user_sex, ua.email, ua.account_status, ua.remark, ua.is_deleted as deleted, ua.create_time, ua.update_time
from back_user_account ua
where ua.is_deleted = 0
<if test=" userIds != null ">
<foreach collection="userIds" item="id" open="and ua.id in (" close=")" separator=",">
#{id}
</foreach>
</if>
<if test="keyword != null">
and (
user_name like CONCAT("%",#{keyword},"%") or
phone_num like CONCAT("%",#{keyword},"%") or
id like CONCAT("%",#{keyword},"%"))
</if>
<if test="provinceCode != null">
and ua.province_code = #{provinceCode}
</if>
<if test="cityCode != null">
and ua.city_code = #{cityCode}
</if>
<if test="districtCode != null">
and ua.district_code = #{districtCode}
</if>
</select>
<select id="getAuthUserPwd" resultType="com.mmc.iuav.user.entity.BackUserAccountDO">
select id,
account_no,
pass_word
from back_user_account
where is_deleted = 0
and id =
#{id}
</select>
<select id="getUserLoginInfo" resultType="com.mmc.iuav.user.entity.BackUserAccountDO">
select bua.id,
bua.account_no,
bua.phone_num,
bua.pass_word,
bua.account_status,
bua.user_name
from back_user_account bua
where bua.is_deleted = 0
and BINARY bua.account_no = #{accountNo}
</select>
<select id="countUserAccountNo" resultType="java.lang.Integer">
select count(*) from back_user_account
where account_no = #{accountNo} and is_deleted = 0
<if test="excludeId != null">
and id != #{excludeId}
</if>
</select>
</mapper>
\ No newline at end of file
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
<mapper namespace="com.mmc.iuav.user.dao.UserServiceDao"> <mapper namespace="com.mmc.iuav.user.dao.UserServiceDao">
<resultMap id="userAccountResultMap" type="com.mmc.iuav.user.entity.UserAccountDO"> <resultMap id="userAccountResultMap" type="com.mmc.iuav.user.entity.UserAccountDO">
<id property="id" column="id"/> <id property="id" column="id"/>
<result property="accountType" column="account_type"/>
<result property="uid" column="uid"/> <result property="uid" column="uid"/>
<result property="phoneNum" column="phone_num"/> <result property="phoneNum" column="phone_num"/>
<result property="userName" column="user_name"/> <result property="userName" column="user_name"/>
...@@ -27,8 +26,8 @@ ...@@ -27,8 +26,8 @@
<insert id="insertUserAccount" parameterType="com.mmc.iuav.user.entity.UserAccountDO" <insert id="insertUserAccount" parameterType="com.mmc.iuav.user.entity.UserAccountDO"
useGeneratedKeys="true" keyProperty="id"> useGeneratedKeys="true" keyProperty="id">
insert into user_account(account_type, uid, account_no, pass_word, phone_num, user_name, nick_name, user_img, open_id, union_id, user_sex, email, source,province_code, city_code, district_code, remark, port_type, create_time) insert into user_account( uid, account_no, pass_word, phone_num, user_name, nick_name, user_img, open_id, union_id, user_sex, email, source,province_code, city_code, district_code, remark, port_type, create_time)
values(#{accountType}, #{uid}, #{accountNo}, #{password}, #{phoneNum}, #{userName}, #{nickName}, #{userImg}, #{openId}, #{unionId}, #{userSex}, #{email}, #{source}, #{provinceCode}, #{cityCode}, #{districtCode}, #{remark}, #{portType}, NOW()) values(#{uid}, #{accountNo}, #{password}, #{phoneNum}, #{userName}, #{nickName}, #{userImg}, #{openId}, #{unionId}, #{userSex}, #{email}, #{source}, #{provinceCode}, #{cityCode}, #{districtCode}, #{remark}, #{portType}, NOW())
</insert> </insert>
<update id="update" parameterType="com.mmc.iuav.user.entity.UserAccountDO"> <update id="update" parameterType="com.mmc.iuav.user.entity.UserAccountDO">
...@@ -90,14 +89,14 @@ ...@@ -90,14 +89,14 @@
</update> </update>
<select id="getUserAccountInfoByUnionId" resultType="com.mmc.iuav.user.entity.UserAccountDO"> <select id="getUserAccountInfoByUnionId" resultType="com.mmc.iuav.user.entity.UserAccountDO">
select id, account_type, uid, phone_num, user_name, nick_name, user_img, open_id, union_id, user_sex, email, source, account_status, remark, select id, uid, phone_num, user_name, nick_name, user_img, open_id, union_id, user_sex, email, source, account_status, remark,
port_type, is_deleted, create_time, update_time port_type, is_deleted, create_time, update_time
from user_account from user_account
where union_id = #{unionId} and is_deleted = 0 where union_id = #{unionId} and is_deleted = 0
</select> </select>
<select id="getUserAccountById" resultType="com.mmc.iuav.user.entity.UserAccountDO"> <select id="getUserAccountById" resultType="com.mmc.iuav.user.entity.UserAccountDO">
select id, account_type, account_no, uid, phone_num, user_name, nick_name, user_img, open_id, union_id, user_sex, email, source, account_status, remark, select id, account_no, uid, phone_num, user_name, nick_name, user_img, open_id, union_id, user_sex, email, source, account_status, remark,
port_type, is_deleted, create_time, update_time port_type, is_deleted, create_time, update_time
from user_account from user_account
where id = #{id} where id = #{id}
...@@ -132,8 +131,8 @@ ...@@ -132,8 +131,8 @@
and BINARY ua.account_no = #{accountNo} and BINARY ua.account_no = #{accountNo}
</select> </select>
<select id="feignListBAccountPage" resultType="com.mmc.iuav.user.entity.UserAccountDO" parameterType="com.mmc.iuav.user.model.qo.BUserAccountQO"> <select id="feignListUserAccount" resultType="com.mmc.iuav.user.entity.UserAccountDO" parameterType="com.mmc.iuav.user.model.qo.UserAccountQO">
select ua.id, ua.account_type, ua.account_no, ua.uid, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id, ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark, select ua.id, ua.account_no, ua.uid, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id, ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark,
ua.port_type, ua.is_deleted as deleted, ua.create_time, ua.update_time, ut.cooperation_tag_id, ca.auth_status as companyAuthStatus ua.port_type, ua.is_deleted as deleted, ua.create_time, ua.update_time, ut.cooperation_tag_id, ca.auth_status as companyAuthStatus
from user_account ua left join user_tag ut on ua.id = ut.user_account_id left join company_auth ca on ua.id = ca.user_account_id from user_account ua left join user_tag ut on ua.id = ut.user_account_id left join company_auth ca on ua.id = ca.user_account_id
where ua.is_deleted = 0 where ua.is_deleted = 0
...@@ -146,7 +145,7 @@ ...@@ -146,7 +145,7 @@
and ( and (
user_name like CONCAT("%",#{keyword},"%") or user_name like CONCAT("%",#{keyword},"%") or
nick_name like CONCAT("%",#{keyword},"%") or nick_name like CONCAT("%",#{keyword},"%") or
phone_num like CONCAT("%",#{keyword},"%")or phone_num like CONCAT("%",#{keyword},"%") or
uid like CONCAT("%",#{keyword},"%")) uid like CONCAT("%",#{keyword},"%"))
</if> </if>
<if test="provinceCode != null"> <if test="provinceCode != null">
...@@ -190,7 +189,7 @@ ...@@ -190,7 +189,7 @@
</select> </select>
<select id="listBAccountPage" resultType="com.mmc.iuav.user.entity.UserAccountDO" parameterType="com.mmc.iuav.user.model.qo.BUserAccountQO"> <select id="listBAccountPage" resultType="com.mmc.iuav.user.entity.UserAccountDO" parameterType="com.mmc.iuav.user.model.qo.BUserAccountQO">
select id, account_type, account_no, uid, phone_num, user_name, nick_name, user_img, open_id, union_id, user_sex, email, source, account_status, remark, select id, account_no, uid, phone_num, user_name, nick_name, user_img, open_id, union_id, user_sex, email, source, account_status, remark,
port_type, is_deleted as deleted, create_time, update_time port_type, is_deleted as deleted, create_time, update_time
from user_account from user_account
where is_deleted = 0 and port_type = 0 where is_deleted = 0 and port_type = 0
...@@ -223,7 +222,7 @@ ...@@ -223,7 +222,7 @@
</select> </select>
<select id="listUserAccountByIds" resultType="com.mmc.iuav.user.entity.UserAccountDO"> <select id="listUserAccountByIds" resultType="com.mmc.iuav.user.entity.UserAccountDO">
select ua.id, ua.account_type, ua.account_no, ua.uid, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id, ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark, select ua.id, ua.account_no, ua.uid, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id, ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark,
ua.port_type, ua.is_deleted as deleted, ua.create_time, ua.update_time, ut.cooperation_tag_id, ca.auth_status as companyAuthStatus, ca.company_name ua.port_type, ua.is_deleted as deleted, ua.create_time, ua.update_time, ut.cooperation_tag_id, ca.auth_status as companyAuthStatus, ca.company_name
from user_account ua left join user_tag ut on ua.id = ut.user_account_id left join company_auth ca on ua.id = ca.user_account_id from user_account ua left join user_tag ut on ua.id = ut.user_account_id left join company_auth ca on ua.id = ca.user_account_id
where ua.is_deleted = 0 where ua.is_deleted = 0
...@@ -235,7 +234,7 @@ ...@@ -235,7 +234,7 @@
</select> </select>
<select id="feignListRcdUserInfo" resultType="com.mmc.iuav.user.entity.UserAccountDO"> <select id="feignListRcdUserInfo" resultType="com.mmc.iuav.user.entity.UserAccountDO">
select ua.id, ua.account_type, ua.account_no, ua.uid, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id, ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark, select ua.id, ua.account_no, ua.uid, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id, ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark,
ua.port_type, ua.is_deleted as deleted, ua.create_time, ua.update_time, ut.cooperation_tag_id, ca.auth_status as companyAuthStatus, ca.company_name ua.port_type, ua.is_deleted as deleted, ua.create_time, ua.update_time, ut.cooperation_tag_id, ca.auth_status as companyAuthStatus, ca.company_name
from user_rcd ur inner join user_account ua on ua.id = ur.rcd_user_id left join user_tag ut on ua.id = ut.user_account_id left join company_auth ca on ua.id = ca.user_account_id from user_rcd ur inner join user_account ua on ua.id = ur.rcd_user_id left join user_tag ut on ua.id = ut.user_account_id left join company_auth ca on ua.id = ca.user_account_id
where ua.is_deleted = 0 where ua.is_deleted = 0
...@@ -247,7 +246,7 @@ ...@@ -247,7 +246,7 @@
</select> </select>
<select id="getUserRcdByAccountId" resultType="com.mmc.iuav.user.entity.UserAccountDO"> <select id="getUserRcdByAccountId" resultType="com.mmc.iuav.user.entity.UserAccountDO">
select ua.id, ua.account_type, ua.account_no, ua.uid, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id, ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark, select ua.id, ua.account_no, ua.uid, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id, ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark,
ua.port_type, ua.is_deleted as deleted, ua.create_time, ua.update_time, ut.cooperation_tag_id, ca.auth_status as companyAuthStatus, ca.company_name ua.port_type, ua.is_deleted as deleted, ua.create_time, ua.update_time, ut.cooperation_tag_id, ca.auth_status as companyAuthStatus, ca.company_name
from user_rcd ur inner join user_account ua on ua.id = ur.rcd_user_id left join user_tag ut on ua.id = ut.user_account_id left join company_auth ca on ua.id = ca.user_account_id from user_rcd ur inner join user_account ua on ua.id = ur.rcd_user_id left join user_tag ut on ua.id = ut.user_account_id left join company_auth ca on ua.id = ca.user_account_id
where ua.is_deleted = 0 and ur.user_account_id = #{userAccountId} where ua.is_deleted = 0 and ur.user_account_id = #{userAccountId}
...@@ -290,7 +289,7 @@ ...@@ -290,7 +289,7 @@
</select> </select>
<select id="listAppUser" resultType="com.mmc.iuav.user.entity.UserAccountDO" parameterType="com.mmc.iuav.user.model.qo.UserAccountQO"> <select id="listAppUser" resultType="com.mmc.iuav.user.entity.UserAccountDO" parameterType="com.mmc.iuav.user.model.qo.UserAccountQO">
select ua.id, ua.account_type, ua.account_no, ua.uid, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id, ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark, select ua.id, ua.account_no, ua.uid, ua.phone_num, ua.user_name, ua.nick_name, ua.user_img, ua.open_id, ua.union_id, ua.user_sex, ua.email, ua.source, ua.account_status, ua.remark,
ua.port_type, ua.is_deleted as deleted, ua.create_time, ua.update_time, ut.cooperation_tag_id, IFNULL(ca.auth_status, 0) as companyAuthStatus, ca.company_name ua.port_type, ua.is_deleted as deleted, ua.create_time, ua.update_time, ut.cooperation_tag_id, IFNULL(ca.auth_status, 0) as companyAuthStatus, ca.company_name
from user_account ua left join user_tag ut on ua.id = ut.user_account_id left join company_auth ca on ua.id = ca.user_account_id from user_account ua left join user_tag ut on ua.id = ut.user_account_id left join company_auth ca on ua.id = ca.user_account_id
where where
......
...@@ -16,15 +16,12 @@ ...@@ -16,15 +16,12 @@
<parent> <parent>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId> <artifactId>spring-boot-starter-parent</artifactId>
<version>2.2.6.RELEASE</version> <version>2.3.12.RELEASE</version>
<relativePath /> <relativePath />
</parent> </parent>
<properties> <properties>
<spring-cloud.version>Hoxton.SR6</spring-cloud.version>
<springfox.version>2.9.2</springfox.version> <springfox.version>2.9.2</springfox.version>
<spring-cloud-alibaba-seata.version>2.2.1.RELEASE</spring-cloud-alibaba-seata.version>
<seata.version>1.1.0</seata.version>
</properties> </properties>
<dependencies> <dependencies>
...@@ -116,26 +113,6 @@ ...@@ -116,26 +113,6 @@
<dependencies> <dependencies>
<dependency> <dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-dependencies</artifactId>
<version>${spring-cloud.version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>
<dependency>
<groupId>com.alibaba.cloud</groupId>
<artifactId>spring-cloud-starter-alibaba-seata</artifactId>
<version>${spring-cloud-alibaba-seata.version}</version>
</dependency>
<dependency>
<groupId>io.seata</groupId>
<artifactId>seata-spring-boot-starter</artifactId>
<version>${seata.version}</version>
</dependency>
<dependency>
<groupId>com.alibaba</groupId> <groupId>com.alibaba</groupId>
<artifactId>druid-spring-boot-starter</artifactId> <artifactId>druid-spring-boot-starter</artifactId>
<version>1.1.10</version> <version>1.1.10</version>
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论