修改诺干问题

This commit is contained in:
gaomusan 2025-03-06 14:57:46 +08:00
parent e490a0a206
commit d935b6c700
14 changed files with 162 additions and 160 deletions

View File

@ -1,151 +1,151 @@
//package com.cj.jiaqingjiayi.controller; package com.cj.jiaqingjiayi.controller;
//
//import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
//import com.cj.jiaqingjiayi.common.BaseResponse; import com.cj.jiaqingjiayi.common.BaseResponse;
//import com.cj.jiaqingjiayi.common.ErrorCode; import com.cj.jiaqingjiayi.common.ErrorCode;
//import com.cj.jiaqingjiayi.common.ResultUtils; import com.cj.jiaqingjiayi.common.ResultUtils;
//import com.cj.jiaqingjiayi.exception.BusinessException; import com.cj.jiaqingjiayi.exception.BusinessException;
//import com.cj.jiaqingjiayi.exception.ThrowUtils; import com.cj.jiaqingjiayi.exception.ThrowUtils;
//import com.cj.jiaqingjiayi.model.domain.Business; import com.cj.jiaqingjiayi.model.domain.Business;
//import com.cj.jiaqingjiayi.model.domain.Manicurist; import com.cj.jiaqingjiayi.model.domain.Manicurist;
//import com.cj.jiaqingjiayi.model.domain.Manicuristsign; import com.cj.jiaqingjiayi.model.domain.Manicuristsign;
//import com.cj.jiaqingjiayi.model.request.manicuristSign.ManicuristSignAddRequest; import com.cj.jiaqingjiayi.model.request.manicuristSign.ManicuristSignAddRequest;
//import com.cj.jiaqingjiayi.model.vo.ManicuristsignVO; import com.cj.jiaqingjiayi.model.vo.ManicuristsignVO;
//import com.cj.jiaqingjiayi.service.BusinessService; import com.cj.jiaqingjiayi.service.BusinessService;
//import com.cj.jiaqingjiayi.service.ManicuristService; import com.cj.jiaqingjiayi.service.ManicuristService;
//import com.cj.jiaqingjiayi.service.ManicuristsignService; import com.cj.jiaqingjiayi.service.ManicuristsignService;
//import com.cj.jiaqingjiayi.service.UserService; import com.cj.jiaqingjiayi.service.UserService;
//import com.cj.jiaqingjiayi.utils.BeanCopyUtils; import com.cj.jiaqingjiayi.utils.BeanCopyUtils;
//import io.swagger.annotations.Api; import io.swagger.annotations.Api;
//import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
//import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
//import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
//import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
//
//import javax.annotation.Resource; import javax.annotation.Resource;
//import java.util.List; import java.util.List;
//
//@Api(tags = "美甲师签约接口") @Api(tags = "美甲师签约接口")
//@RestController @RestController
//@RequestMapping("/manicuristSign") @RequestMapping("/manicuristSign")
//public class ManicuristSignController { public class ManicuristSignController {
//
// @Resource @Resource
// private ManicuristsignService manicuristsignService; private ManicuristsignService manicuristsignService;
//
// @Resource @Resource
// private ManicuristService manicuristService; private ManicuristService manicuristService;
//
// @Resource @Resource
// private BusinessService businessService; private BusinessService businessService;
//
// /** /**
// * 添加签约 * 添加签约
// */ */
// @ApiOperation(value = "添加美甲师签约") @ApiOperation(value = "添加美甲师签约")
// @PostMapping("/add") @PostMapping("/add")
// @Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
// public BaseResponse<Long> addManicuristSign(@RequestBody ManicuristSignAddRequest addRequest){ public BaseResponse<Long> addManicuristSign(@RequestBody ManicuristSignAddRequest addRequest){
//
// ThrowUtils.throwIf(addRequest == null, ErrorCode.PARAMS_ERROR); ThrowUtils.throwIf(addRequest == null, ErrorCode.PARAMS_ERROR);
//
// Manicuristsign manicuristsign = new Manicuristsign(); Manicuristsign manicuristsign = new Manicuristsign();
//
// BeanUtils.copyProperties(addRequest, manicuristsign); BeanUtils.copyProperties(addRequest, manicuristsign);
//
// boolean save = manicuristsignService.save(manicuristsign); boolean save = manicuristsignService.save(manicuristsign);
//
// if (!save) { if (!save) {
// throw new BusinessException(ErrorCode.SYSTEM_ERROR, "添加失败"); throw new BusinessException(ErrorCode.SYSTEM_ERROR, "添加失败");
// } }
// return ResultUtils.success(manicuristsign.getId(), "添加成功"); return ResultUtils.success(manicuristsign.getId(), "添加成功");
// } }
//
//
// /** /**
// * 通过签约 * 通过签约
// */ */
// @ApiOperation(value = "同意美甲师签约") @ApiOperation(value = "同意美甲师签约")
// @GetMapping("/success") @GetMapping("/success")
// @Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
// public BaseResponse<Boolean> succManicuristSign(@RequestParam Long signId){ public BaseResponse<Boolean> succManicuristSign(@RequestParam Long signId){
//
// ThrowUtils.throwIf(signId < 0 , ErrorCode.PARAMS_ERROR); ThrowUtils.throwIf(signId < 0 , ErrorCode.PARAMS_ERROR);
// //拿到签约数据 //拿到签约数据
// Manicuristsign manicuristsign = manicuristsignService.getById(signId); Manicuristsign manicuristsign = manicuristsignService.getById(signId);
// //拿到签约的美甲师数据 //拿到签约的美甲师数据
// Manicurist manicurist = manicuristService.getById(manicuristsign.getManicuristId()); Manicurist manicurist = manicuristService.getById(manicuristsign.getManicuristId());
// ThrowUtils.throwIf(manicurist == null, ErrorCode.SYSTEM_ERROR); ThrowUtils.throwIf(manicurist == null, ErrorCode.SYSTEM_ERROR);
// Manicurist manicuristNew = new Manicurist(); Manicurist manicuristNew = new Manicurist();
//
// QueryWrapper<Business> queryWrapper = new QueryWrapper<>(); QueryWrapper<Business> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("businessName", manicuristsign.getBusinessName()); queryWrapper.eq("businessName", manicuristsign.getBusinessName());
// Business business = businessService.getOne(queryWrapper); Business business = businessService.getOne(queryWrapper);
// manicurist.setBusinessId(business.getId()); manicurist.setBusinessId(business.getId());
// //更新美甲师所属的美甲店铺 //更新美甲师所属的美甲店铺
// BeanUtils.copyProperties(manicurist, manicuristNew); BeanUtils.copyProperties(manicurist, manicuristNew);
// manicuristsign.setAuditStatus(1); manicuristsign.setAuditStatus(1);
//
// boolean flag = manicuristService.updateById(manicuristNew); boolean flag = manicuristService.updateById(manicuristNew);
// ThrowUtils.throwIf(!flag , ErrorCode.OPERATION_ERROR); ThrowUtils.throwIf(!flag , ErrorCode.OPERATION_ERROR);
//
// boolean updateById = manicuristsignService.updateById(manicuristsign); boolean updateById = manicuristsignService.updateById(manicuristsign);
// ThrowUtils.throwIf(!updateById, ErrorCode.SYSTEM_ERROR); ThrowUtils.throwIf(!updateById, ErrorCode.SYSTEM_ERROR);
//
// return ResultUtils.success(true, "审核通过"); return ResultUtils.success(true, "审核通过");
// } }
//
// /** /**
// * 不同意美甲师签约 * 不同意美甲师签约
// */ */
// @ApiOperation(value = "不同意美甲师签约") @ApiOperation(value = "不同意美甲师签约")
// @GetMapping("/refuse") @GetMapping("/refuse")
// @Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
// public BaseResponse<Boolean> refuseManicuristSign(@RequestParam Long signId){ public BaseResponse<Boolean> refuseManicuristSign(@RequestParam Long signId){
//
// ThrowUtils.throwIf(signId < 0 , ErrorCode.PARAMS_ERROR); ThrowUtils.throwIf(signId < 0 , ErrorCode.PARAMS_ERROR);
// //拿到签约数据 //拿到签约数据
// Manicuristsign manicuristsign = manicuristsignService.getById(signId); Manicuristsign manicuristsign = manicuristsignService.getById(signId);
//
// manicuristsign.setAuditStatus(2); manicuristsign.setAuditStatus(2);
//
// boolean updateById = manicuristsignService.updateById(manicuristsign); boolean updateById = manicuristsignService.updateById(manicuristsign);
// ThrowUtils.throwIf(!updateById, ErrorCode.SYSTEM_ERROR); ThrowUtils.throwIf(!updateById, ErrorCode.SYSTEM_ERROR);
//
// return ResultUtils.success(true, "审核不通过"); return ResultUtils.success(true, "审核不通过");
// } }
//
// /** /**
// * 根据id删除签约 * 根据id删除签约
// */ */
// @ApiOperation(value = "根据id删除签约") @ApiOperation(value = "根据id删除签约")
// @GetMapping("/delete") @GetMapping("/delete")
// @Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
// public BaseResponse<Boolean> deleteManicuristSign(@RequestParam Long signId){ public BaseResponse<Boolean> deleteManicuristSign(@RequestParam Long signId){
//
// ThrowUtils.throwIf(signId < 0 , ErrorCode.PARAMS_ERROR); ThrowUtils.throwIf(signId < 0 , ErrorCode.PARAMS_ERROR);
//
// boolean b = manicuristsignService.removeById(signId); boolean b = manicuristsignService.removeById(signId);
// ThrowUtils.throwIf(!b, ErrorCode.SYSTEM_ERROR); ThrowUtils.throwIf(!b, ErrorCode.SYSTEM_ERROR);
//
// return ResultUtils.success(true, "删除成功"); return ResultUtils.success(true, "删除成功");
// } }
//
// /** /**
// * 查询当前店铺签约列表 * 查询当前店铺签约列表
// */ */
// @ApiOperation(value = "查询签约列表") @ApiOperation(value = "查询签约列表")
// @GetMapping("/select") @GetMapping("/select")
// @Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
// public BaseResponse<List<ManicuristsignVO>> selectManicuristSign(@RequestParam String businessName){ public BaseResponse<List<ManicuristsignVO>> selectManicuristSign(@RequestParam String businessName){
//
// ThrowUtils.throwIf(businessName == null , ErrorCode.PARAMS_ERROR); ThrowUtils.throwIf(businessName == null , ErrorCode.PARAMS_ERROR);
//
// QueryWrapper<Manicuristsign> queryWrapper = new QueryWrapper<>(); QueryWrapper<Manicuristsign> queryWrapper = new QueryWrapper<>();
// queryWrapper.eq("businessName", businessName); queryWrapper.eq("businessName", businessName);
//
// List<Manicuristsign> manicuristsignList = manicuristsignService.list(queryWrapper); List<Manicuristsign> manicuristsignList = manicuristsignService.list(queryWrapper);
// List<ManicuristsignVO> manicuristsignVOList = manicuristsignService.getManicuristsignVO(manicuristsignList); List<ManicuristsignVO> manicuristsignVOList = manicuristsignService.getManicuristsignVO(manicuristsignList);
// return ResultUtils.success(manicuristsignVOList); return ResultUtils.success(manicuristsignVOList);
// } }
//} }

View File

@ -138,12 +138,12 @@ public class OrdersController {
} }
/** /**
* 分页获取订单列表管理员 * 分页获取订单列表
*/ */
@PostMapping("/list/page") @PostMapping("/list/page")
@ApiOperation(value = "分页获取订单列表(管理员)") @ApiOperation(value = "分页获取订单列表")
public BaseResponse<Page<Orders>> listOrdersByPage(@RequestBody OrderQueryRequest orderQueryRequest, HttpServletRequest request) { public BaseResponse<Page<Orders>> listOrdersByPage(@RequestBody OrderQueryRequest orderQueryRequest, HttpServletRequest request) {
userService.isAdmin(request); // userService.isAdmin(request);
long current = orderQueryRequest.getCurrent(); long current = orderQueryRequest.getCurrent();
long size = orderQueryRequest.getPageSize(); long size = orderQueryRequest.getPageSize();
Page<Orders> ordersPage = ordersService.page(new Page<>(current, size), Page<Orders> ordersPage = ordersService.page(new Page<>(current, size),

View File

@ -116,14 +116,14 @@ public class UserController {
} }
/** /**
* 分页获取用户列表仅管理员 * 分页获取用户列表
* @return 用户列表 * @return 用户列表
*/ */
@ApiOperation(value = "分页查询用户") @ApiOperation(value = "分页查询用户")
@PostMapping("/list/page") @PostMapping("/list/page")
public BaseResponse<Page<User>> listUserByPage(@RequestBody UserSearchRequest userSearchRequest, HttpServletRequest request) { public BaseResponse<Page<User>> listUserByPage(@RequestBody UserSearchRequest userSearchRequest, HttpServletRequest request) {
//判断是否为管理员 //判断是否为管理员
userService.isAdmin(request); // userService.isAdmin(request);
long current = userSearchRequest.getCurrent(); long current = userSearchRequest.getCurrent();
long size = userSearchRequest.getPageSize(); long size = userSearchRequest.getPageSize();
Page<User> userPage = userService.page(new Page<>(current, size), Page<User> userPage = userService.page(new Page<>(current, size),

View File

@ -62,7 +62,7 @@ public class AlipayServiceImpl implements AliPayService {
String subject = orderDetailsList.stream() String subject = orderDetailsList.stream()
.map(OrderItems::getAttributeNames) .map(OrderItems::getAttributeNames)
.collect(Collectors.joining(", ")); .collect(Collectors.joining(", "));
//给支付宝的订单号设置成取餐码 //给支付宝的订单号设置
order.setOrderNumber(outTradeNo); order.setOrderNumber(outTradeNo);
boolean update = ordersService.updateById(order); boolean update = ordersService.updateById(order);
ThrowUtils.throwIf(!update, ErrorCode.OPERATION_ERROR, "修改订单状态失败"); ThrowUtils.throwIf(!update, ErrorCode.OPERATION_ERROR, "修改订单状态失败");
@ -71,8 +71,8 @@ public class AlipayServiceImpl implements AliPayService {
model.setTotalAmount(String.valueOf(amount)); model.setTotalAmount(String.valueOf(amount));
model.setSubject(subject); model.setSubject(subject);
model.setProductCode("JSAPI_PAY"); model.setProductCode("JSAPI_PAY");
model.setSellerId("2088721034640726"); model.setSellerId("2088721037774480");
model.setBuyerId("2088722034659383"); model.setBuyerId("2088722037764824");
model.setOpAppId("2021004144652242"); model.setOpAppId("2021004144652242");
///回调地址 ///回调地址

View File

@ -9,6 +9,7 @@
<result property="orderNumber" column="orderNumber" jdbcType="VARCHAR"/> <result property="orderNumber" column="orderNumber" jdbcType="VARCHAR"/>
<result property="userId" column="userId" jdbcType="BIGINT"/> <result property="userId" column="userId" jdbcType="BIGINT"/>
<result property="businessId" column="businessId" jdbcType="BIGINT"/> <result property="businessId" column="businessId" jdbcType="BIGINT"/>
<result property="manicuristId" column="manicuristId" jdbcType="BIGINT"/>
<result property="userName" column="userName" jdbcType="VARCHAR"/> <result property="userName" column="userName" jdbcType="VARCHAR"/>
<result property="phone" column="phone" jdbcType="VARCHAR"/> <result property="phone" column="phone" jdbcType="VARCHAR"/>
<result property="payMethod" column="payMethod" jdbcType="TINYINT"/> <result property="payMethod" column="payMethod" jdbcType="TINYINT"/>
@ -27,6 +28,7 @@
businessId,userName,phone, businessId,userName,phone,
appointmentId,totalPrice,paymentStatus, appointmentId,totalPrice,paymentStatus,
claimStatus,notes,createTime, claimStatus,notes,createTime,
updateTime,isDelete,payMethod updateTime,isDelete,payMethod,
manicuristId
</sql> </sql>
</mapper> </mapper>