增加查询美甲师信息的接口,修改了修改美甲师信息时id传不过去的bug
This commit is contained in:
parent
4213a256e2
commit
745e3b790a
|
@ -6,8 +6,6 @@ import java.io.Serializable;
|
|||
|
||||
/**
|
||||
*通用返回类
|
||||
*
|
||||
* @author wssb
|
||||
*/
|
||||
@Data
|
||||
public class BaseResponse<T> implements Serializable {
|
||||
|
|
|
@ -148,10 +148,11 @@ public class BusinessController {
|
|||
@PostMapping("/list/page")
|
||||
//@AuthCheck(mustRole = 1)
|
||||
public BaseResponse<Page<Business>> listBusinessByPage (@RequestBody BusinessQueryRequest businessQueryRequest) {
|
||||
Page<Business> businessPage = businessService.page(new Page<>(businessQueryRequest.getCurrent(), businessQueryRequest.getPageSize()),
|
||||
long current = businessQueryRequest.getCurrent();
|
||||
long size = businessQueryRequest.getPageSize();
|
||||
Page<Business> businessPage = businessService.page(new Page<>(current, size),
|
||||
businessService.getQueryWrapper(businessQueryRequest));
|
||||
return ResultUtils.success(businessPage);
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -159,18 +160,21 @@ public class BusinessController {
|
|||
*/
|
||||
@PostMapping("/list/page/vo")
|
||||
public BaseResponse<Page<BusinessVO>> listBusinessVOByPage(@RequestBody BusinessQueryRequest businessQueryRequest) {
|
||||
long current = businessQueryRequest.getCurrent();
|
||||
long size = businessQueryRequest.getPageSize();
|
||||
long current = businessQueryRequest.getCurrent();
|
||||
long size = businessQueryRequest.getPageSize();
|
||||
|
||||
ThrowUtils.throwIf(size > 20, ErrorCode.PARAMS_ERROR);
|
||||
QueryWrapper<Business> queryWrapper = businessService.getQueryWrapper(businessQueryRequest);
|
||||
// 只显示正常营业商家
|
||||
queryWrapper.eq("state", 1);
|
||||
Page<Business> businessPage = businessService.page(new Page<>(current, size), queryWrapper);
|
||||
Page<BusinessVO> businessVOPage = new Page<>(current, size, businessPage.getTotal());
|
||||
List<BusinessVO> businessVOList = businessService.getBusinessVO(businessPage.getRecords());
|
||||
businessVOPage.setRecords(businessVOList);
|
||||
return ResultUtils.success(businessVOPage);
|
||||
ThrowUtils.throwIf(size > 20, ErrorCode.PARAMS_ERROR);
|
||||
|
||||
QueryWrapper<Business> queryWrapper = businessService.getQueryWrapper(businessQueryRequest);
|
||||
queryWrapper.eq("state", 1); // 只显示正常营业商家
|
||||
|
||||
Page<Business> businessPage = businessService.page(new Page<>(current, size), queryWrapper);
|
||||
Page<BusinessVO> businessVOPage = new Page<>(current, size, businessPage.getTotal());
|
||||
|
||||
List<BusinessVO> businessVOList = businessService.getBusinessVO(businessPage.getRecords());
|
||||
businessVOPage.setRecords(businessVOList);
|
||||
|
||||
return ResultUtils.success(businessVOPage);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,21 +1,21 @@
|
|||
package com.cj.jiaqingjiayi.controller;
|
||||
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.cj.jiaqingjiayi.common.BaseResponse;
|
||||
import com.cj.jiaqingjiayi.common.ErrorCode;
|
||||
import com.cj.jiaqingjiayi.common.ResultUtils;
|
||||
import com.cj.jiaqingjiayi.exception.BusinessException;
|
||||
import com.cj.jiaqingjiayi.exception.ThrowUtils;
|
||||
import com.cj.jiaqingjiayi.model.domain.*;
|
||||
import com.cj.jiaqingjiayi.model.request.manicurist.AdminManicuristAddRequest;
|
||||
import com.cj.jiaqingjiayi.model.request.manicurist.ManicuristAddRequest;
|
||||
import com.cj.jiaqingjiayi.model.request.manicurist.ManicuristUpdateRequest;
|
||||
import com.cj.jiaqingjiayi.model.request.manicurist.MyManicuristUpdateRequest;
|
||||
import com.cj.jiaqingjiayi.model.request.manicurist.*;
|
||||
import com.cj.jiaqingjiayi.model.vo.ManicuristVO;
|
||||
import com.cj.jiaqingjiayi.service.ManicuristService;
|
||||
import com.cj.jiaqingjiayi.service.UserService;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.DigestUtils;
|
||||
import org.springframework.util.StringUtils;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
@ -125,11 +125,11 @@ public class ManicuristController {
|
|||
manicuristService.validManBus(manicuristUpdateRequest.getBusinessId());
|
||||
}
|
||||
|
||||
BeanUtils.copyProperties(manicuristUpdateRequest, manicurist);
|
||||
|
||||
//校验一下
|
||||
manicuristService.validManicurist(manicurist, false);
|
||||
|
||||
BeanUtils.copyProperties(manicuristUpdateRequest, manicurist);
|
||||
|
||||
boolean result = manicuristService.updateById(manicurist);
|
||||
ThrowUtils.throwIf(!result, ErrorCode.OPERATION_ERROR);
|
||||
return ResultUtils.success(true, "修改成功");
|
||||
|
@ -143,14 +143,18 @@ public class ManicuristController {
|
|||
ThrowUtils.throwIf(myUpdateRequest == null, ErrorCode.NULL_ERROR);
|
||||
|
||||
User logingUser = userService.getLoginUser(request);
|
||||
Long userId = logingUser.getId();
|
||||
QueryWrapper<Manicurist> manicuristQueryWrapper = new QueryWrapper<Manicurist>().eq("userId", userId);
|
||||
|
||||
Manicurist manicuristLog = manicuristService.getById(logingUser);
|
||||
Manicurist manicuristLog = manicuristService.getOne(manicuristQueryWrapper);
|
||||
ThrowUtils.throwIf(manicuristLog == null , ErrorCode.NULL_ERROR);
|
||||
Long manId = manicuristLog.getId();
|
||||
|
||||
Manicurist manicurist = new Manicurist();
|
||||
manicurist.setId(manId);
|
||||
BeanUtils.copyProperties(myUpdateRequest, manicurist);
|
||||
manicuristService.validManicurist(manicurist, false);
|
||||
manicurist.setId(manId);
|
||||
|
||||
|
||||
boolean result = manicuristService.updateById(manicurist);
|
||||
ThrowUtils.throwIf(!result, ErrorCode.OPERATION_ERROR, "修改失败");
|
||||
|
@ -181,4 +185,22 @@ public class ManicuristController {
|
|||
List<Manicurist> manicuristList = manicuristService.list();
|
||||
return ResultUtils.success(manicuristList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 搜索美甲师
|
||||
*/
|
||||
@PostMapping("/userQuery")
|
||||
public BaseResponse<List<ManicuristVO>> UserQueryManicurist(@RequestBody ManicuristQueryRequest manicuristQueryRequest){
|
||||
ThrowUtils.throwIf(manicuristQueryRequest == null, ErrorCode.NULL_ERROR);
|
||||
|
||||
QueryWrapper<Manicurist> queryWrapper = manicuristService.getQueryWrapper(manicuristQueryRequest);
|
||||
|
||||
List<Manicurist> manicuristList = manicuristService.list(queryWrapper);
|
||||
|
||||
List<ManicuristVO> manicuristVO = manicuristService.getManicuristVO(manicuristList);
|
||||
|
||||
return ResultUtils.success(manicuristVO);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -110,59 +110,7 @@ public class UserController {
|
|||
//判断是否为管理员
|
||||
userService.isAdmin(request);
|
||||
|
||||
String username = searchRequest.getUsername();
|
||||
String userAccount = searchRequest.getUserAccount();
|
||||
Integer gender = searchRequest.getGender();
|
||||
String phone = searchRequest.getPhone();
|
||||
String email = searchRequest.getEmail();
|
||||
Integer userStatus = searchRequest.getUserStatus();
|
||||
Integer userRole = searchRequest.getUserRole();
|
||||
Date updateTime = searchRequest.getUpdateTime();
|
||||
Date createTime = searchRequest.getCreateTime();
|
||||
QueryWrapper<User> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
//校验
|
||||
// username
|
||||
if (StringUtils.isNotBlank(username)) {
|
||||
queryWrapper.like("username", username);
|
||||
}
|
||||
// userAccount
|
||||
if (StringUtils.isNotBlank(userAccount)) {
|
||||
queryWrapper.like("userAccount", userAccount);
|
||||
}
|
||||
// gender
|
||||
if (gender != null) {
|
||||
queryWrapper.eq("gender", gender);
|
||||
}
|
||||
// phone
|
||||
if (StringUtils.isNotBlank(phone)) {
|
||||
queryWrapper.like("phone", phone);
|
||||
}
|
||||
// email
|
||||
if (StringUtils.isNotBlank(email)) {
|
||||
queryWrapper.like("email", email);
|
||||
}
|
||||
// userStatus
|
||||
if (userStatus != null) {
|
||||
queryWrapper.eq("userStates", userStatus);
|
||||
}
|
||||
|
||||
//userRole
|
||||
if (userRole != null) {
|
||||
queryWrapper.eq("userRole", userRole);
|
||||
}
|
||||
|
||||
|
||||
if (updateTime != null) {
|
||||
queryWrapper.like("updateTime", updateTime);
|
||||
}
|
||||
if (createTime != null) {
|
||||
queryWrapper.like("createTime", createTime);
|
||||
}
|
||||
|
||||
if(StringUtils.isNotBlank(username)){
|
||||
queryWrapper.like("username", username);
|
||||
}
|
||||
QueryWrapper<User> queryWrapper = userService.getQueryWrapper(searchRequest);
|
||||
List<User> userList = userService.list(queryWrapper);
|
||||
List<User> users = userList.stream().map(userService::getSafetyUser).collect(Collectors.toList());
|
||||
|
||||
|
|
|
@ -1,16 +1,14 @@
|
|||
package com.cj.jiaqingjiayi.model.domain;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import com.baomidou.mybatisplus.annotation.*;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* 商家
|
||||
* @TableName business
|
||||
*/
|
||||
@TableName(value ="business")
|
||||
@Data
|
||||
|
@ -94,8 +92,10 @@ public class Business implements Serializable {
|
|||
/**
|
||||
* 是否删除
|
||||
*/
|
||||
@TableLogic
|
||||
private Integer isDelete;
|
||||
|
||||
@TableField(exist = false)
|
||||
@Serial
|
||||
private static final long serialVersionUID = 1L;
|
||||
}
|
|
@ -4,6 +4,7 @@ import com.baomidou.mybatisplus.annotation.IdType;
|
|||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.cj.jiaqingjiayi.model.request.PageRequest;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
|
||||
import java.io.Serial;
|
||||
import java.io.Serializable;
|
||||
|
@ -11,6 +12,7 @@ import java.math.BigDecimal;
|
|||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = true)
|
||||
public class ManicuristQueryRequest extends PageRequest implements Serializable {
|
||||
|
||||
@Serial
|
||||
|
|
|
@ -1,28 +1,14 @@
|
|||
package com.cj.jiaqingjiayi.model.vo;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
|
||||
public class ManicuristVO {
|
||||
/**
|
||||
* 美甲师唯一标识(主键,自增)
|
||||
*/
|
||||
private Long id;
|
||||
|
||||
/**
|
||||
* 用户ID(关联用户表)
|
||||
*/
|
||||
private Long userId;
|
||||
|
||||
/**
|
||||
* 商家ID(关联商家表)
|
||||
*/
|
||||
private Long businessId;
|
||||
|
||||
@Data
|
||||
public class ManicuristVO implements Serializable {
|
||||
/**
|
||||
* 美甲师姓名
|
||||
*/
|
||||
|
|
|
@ -40,7 +40,9 @@ public interface BusinessService extends IService<Business> {
|
|||
*/
|
||||
QueryWrapper<Business> getQueryWrapper(BusinessQueryRequest businessQueryRequest);
|
||||
|
||||
public BusinessVO getBusinessVO(Business business);
|
||||
|
||||
BusinessVO getBusinessVO(Business business);
|
||||
|
||||
/**
|
||||
* 获取脱敏的商家信息
|
||||
*/
|
||||
|
|
|
@ -3,29 +3,25 @@ package com.cj.jiaqingjiayi.service;
|
|||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import com.cj.jiaqingjiayi.model.domain.*;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.cj.jiaqingjiayi.model.request.business.BusinessQueryRequest;
|
||||
import com.cj.jiaqingjiayi.model.request.manicurist.ManicuristQueryRequest;
|
||||
import com.cj.jiaqingjiayi.model.vo.ManicuristVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @author 高木
|
||||
* @description 针对表【manicurist(美甲师表)】的数据库操作Service
|
||||
* @createDate 2024-09-23 19:23:08
|
||||
*/
|
||||
* description 针对表【manicurist(美甲师表)】的数据库操作Service
|
||||
* createDate 2024-09-23 19:23:08
|
||||
*/
|
||||
public interface ManicuristService extends IService<Manicurist> {
|
||||
|
||||
/**
|
||||
* 添加美甲师和认证信息(管理员)
|
||||
* @param user
|
||||
* @param manicurist
|
||||
* @param manicuristAuth
|
||||
*/
|
||||
void adminAddManicurist(User user, Manicurist manicurist, ManicuristAuth manicuristAuth);
|
||||
|
||||
/**
|
||||
* 添加美甲师和认证信息
|
||||
* @param loginUser
|
||||
* @param manicurist
|
||||
* @param manicuristAuth
|
||||
*/
|
||||
void addManicurist(User loginUser, Manicurist manicurist, ManicuristAuth manicuristAuth);
|
||||
|
||||
|
@ -43,6 +39,16 @@ public interface ManicuristService extends IService<Manicurist> {
|
|||
|
||||
void deleteMan(long id);
|
||||
|
||||
/**
|
||||
* 获取脱敏后的美甲师
|
||||
*/
|
||||
ManicuristVO getManicuristVO(Manicurist manicurist);
|
||||
|
||||
/**
|
||||
* 获取美甲师脱敏列表
|
||||
*/
|
||||
List<ManicuristVO> getManicuristVO(List<Manicurist> manicuristList);
|
||||
|
||||
/**
|
||||
* 获取查询条件
|
||||
*/
|
||||
|
|
|
@ -163,7 +163,9 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business>
|
|||
String businessProfile = businessQueryRequest.getBusinessProfile();
|
||||
String sortField = businessQueryRequest.getSortField();
|
||||
String sortOrder = businessQueryRequest.getSortOrder();
|
||||
|
||||
QueryWrapper<Business> queryWrapper = new QueryWrapper<>();
|
||||
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(userId), "userId", userId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(categoryId), "categoryId", categoryId);
|
||||
|
@ -174,6 +176,7 @@ public class BusinessServiceImpl extends ServiceImpl<BusinessMapper, Business>
|
|||
queryWrapper.like(StringUtils.isNotBlank(businessProfile), "businessProfile", businessProfile);
|
||||
queryWrapper.orderBy(SqlUtils.validSortField(sortField), sortOrder.equals(CommonConstant.SORT_ORDER_ASC),
|
||||
sortField);
|
||||
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
|
|
|
@ -7,29 +7,31 @@ import com.cj.jiaqingjiayi.contant.CommonConstant;
|
|||
import com.cj.jiaqingjiayi.exception.BusinessException;
|
||||
import com.cj.jiaqingjiayi.exception.ThrowUtils;
|
||||
import com.cj.jiaqingjiayi.model.domain.*;
|
||||
import com.cj.jiaqingjiayi.model.request.business.BusinessQueryRequest;
|
||||
import com.cj.jiaqingjiayi.model.request.manicurist.ManicuristQueryRequest;
|
||||
import com.cj.jiaqingjiayi.model.vo.ManicuristVO;
|
||||
import com.cj.jiaqingjiayi.service.*;
|
||||
import com.cj.jiaqingjiayi.mapper.ManicuristMapper;
|
||||
import com.cj.jiaqingjiayi.utils.RegexUtils;
|
||||
import com.cj.jiaqingjiayi.utils.SqlUtils;
|
||||
import lombok.Data;
|
||||
import org.apache.commons.lang3.ObjectUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
import org.springframework.util.CollectionUtils;
|
||||
import org.springframework.util.DigestUtils;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
import static com.cj.jiaqingjiayi.contant.UserConstant.USER_SALT;
|
||||
|
||||
/**
|
||||
* @author 高木
|
||||
* @description 针对表【manicurist(美甲师表)】的数据库操作Service实现
|
||||
* @createDate 2024-09-23 19:23:08
|
||||
*/
|
||||
@Service
|
||||
public class ManicuristServiceImpl extends ServiceImpl<ManicuristMapper, Manicurist>
|
||||
|
@ -129,11 +131,11 @@ public class ManicuristServiceImpl extends ServiceImpl<ManicuristMapper, Manicur
|
|||
Long id = manicurist.getId();
|
||||
String manicuristName = manicurist.getName();
|
||||
String manicuristPhone = manicurist.getPhone();
|
||||
String gender = Integer.toString(manicurist.getGender());
|
||||
Integer gender = manicurist.getGender();
|
||||
|
||||
//只在添加时严格校验 保证商家信息是全的
|
||||
if (add) {
|
||||
if (StringUtils.isAnyBlank(manicuristName, manicuristPhone, gender)) {
|
||||
if (StringUtils.isAnyBlank(manicuristName, manicuristPhone) || gender == null) {
|
||||
throw new BusinessException(ErrorCode.PARAMS_ERROR, "信息不全");
|
||||
}
|
||||
}
|
||||
|
@ -195,12 +197,31 @@ public class ManicuristServiceImpl extends ServiceImpl<ManicuristMapper, Manicur
|
|||
ThrowUtils.throwIf(!result, ErrorCode.PARAMS_ERROR, "操作失败");
|
||||
}
|
||||
|
||||
@Override
|
||||
public ManicuristVO getManicuristVO(Manicurist manicurist) {
|
||||
if(manicurist == null ){
|
||||
return null;
|
||||
}
|
||||
ManicuristVO manicuristVO = new ManicuristVO();
|
||||
BeanUtils.copyProperties(manicurist, manicuristVO);
|
||||
return manicuristVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<ManicuristVO> getManicuristVO(List<Manicurist> manicuristList) {
|
||||
if(CollectionUtils.isEmpty(manicuristList)){
|
||||
return new ArrayList<>();
|
||||
}
|
||||
return manicuristList.stream().map(this::getManicuristVO).collect(Collectors.toList());
|
||||
}
|
||||
|
||||
@Override
|
||||
public QueryWrapper<Manicurist> getQueryWrapper(ManicuristQueryRequest manicuristQueryRequest) {
|
||||
if (manicuristQueryRequest == null) {
|
||||
throw new BusinessException(ErrorCode.PARAMS_ERROR, "请求参数为空");
|
||||
}
|
||||
|
||||
|
||||
Long id = manicuristQueryRequest.getId();
|
||||
Long userId = manicuristQueryRequest.getUserId();
|
||||
Long businessId = manicuristQueryRequest.getBusinessId();
|
||||
|
@ -215,17 +236,50 @@ public class ManicuristServiceImpl extends ServiceImpl<ManicuristMapper, Manicur
|
|||
|
||||
|
||||
QueryWrapper<Manicurist> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(id), "id", id);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(userId), "userId", userId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(businessId), "businessId", businessId);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(name), "name", name);
|
||||
queryWrapper.like(ObjectUtils.isNotEmpty(gender), "gender", gender);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(Phone), "Phone", Phone);
|
||||
queryWrapper.eq(ObjectUtils.isNotEmpty(email), "email", email);
|
||||
queryWrapper.like(ObjectUtils.isNotEmpty(employment_date), "employment_date", employment_date);
|
||||
queryWrapper.like(ObjectUtils.isNotEmpty(specialties), "specialties", specialties);
|
||||
queryWrapper.like(ObjectUtils.isNotEmpty(rating), "rating", rating);
|
||||
queryWrapper.like(ObjectUtils.isNotEmpty(salary), "salary", salary);
|
||||
if (ObjectUtils.isNotEmpty(id)) {
|
||||
queryWrapper.eq("id", id);
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(userId)) {
|
||||
queryWrapper.eq("userId", userId);
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(businessId)) {
|
||||
queryWrapper.eq("businessId", businessId);
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(name)) {
|
||||
queryWrapper.eq("name", name);
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(gender)) {
|
||||
queryWrapper.eq( "gender", gender);
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(Phone)) {
|
||||
queryWrapper.eq( "Phone", Phone);
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(email)) {
|
||||
queryWrapper.eq( "email", email);
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(employment_date)) {
|
||||
queryWrapper.like( "employment_date", employment_date);
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(specialties)) {
|
||||
queryWrapper.like( "specialties", specialties);
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(rating)) {
|
||||
queryWrapper.like( "rating", rating);
|
||||
}
|
||||
|
||||
if (ObjectUtils.isNotEmpty(salary)) {
|
||||
queryWrapper.like( "salary", salary);
|
||||
}
|
||||
|
||||
String sortField = manicuristQueryRequest.getSortField();
|
||||
String sortOrder = manicuristQueryRequest.getSortOrder();
|
||||
queryWrapper.orderBy(SqlUtils.validSortField(sortField), sortOrder.equals(CommonConstant.SORT_ORDER_ASC),
|
||||
|
|
|
@ -283,7 +283,7 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User>
|
|||
queryWrapper.like("userAccount", userAccount);
|
||||
}
|
||||
// gender
|
||||
if (StringUtils.isNotBlank(username)) {
|
||||
if (gender != null) {
|
||||
queryWrapper.eq("gender", gender);
|
||||
}
|
||||
// phone
|
||||
|
@ -307,6 +307,8 @@ public class UserServiceImpl extends ServiceImpl<UserMapper, User>
|
|||
if (createTime != null) {
|
||||
queryWrapper.like("createTime", createTime);
|
||||
}
|
||||
|
||||
|
||||
return queryWrapper;
|
||||
}
|
||||
|
||||
|
|
|
@ -24,6 +24,7 @@ server:
|
|||
mybatis-plus:
|
||||
configuration:
|
||||
map-underscore-to-camel-case: false
|
||||
|
||||
global-config:
|
||||
db-config:
|
||||
logic-delete-field: isDelete
|
||||
|
@ -42,6 +43,8 @@ aliyun:
|
|||
keysecret: xxxx
|
||||
bucketname: xxxx
|
||||
|
||||
|
||||
|
||||
alipay:
|
||||
#支付宝开放平台
|
||||
appId: 2021004151684053
|
||||
|
|
Loading…
Reference in New Issue
Block a user