收银点bug修复

This commit is contained in:
19991905653
2024-02-27 17:39:20 +08:00
parent aa75932add
commit c925311eb6
18 changed files with 458 additions and 156 deletions

View File

@@ -11,7 +11,8 @@ import cn.pluss.platform.merchant.AccountService;
import cn.pluss.platform.merchantChannelStatus.MerchantChannelStatusService;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import org.springframework.web.bind.annotation.*;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
@@ -39,11 +40,7 @@ public class ZfbAttestationController {
@PostMapping
public Result<Object> Attestation(@RequestBody Map<String, String> params) {
QueryWrapper<MerchantChannelStatus> QueryWrapper = new QueryWrapper<MerchantChannelStatus>()
.eq("merchantCode", params.get("merchantCode"))
.eq("status", 3)
.ne("merchantId","");
MerchantChannelStatus merchantCode = merchantChannelStatusService.getOne(QueryWrapper);
MerchantChannelStatus merchantCode = checkChannel(params.get("merchantCode"));
if (merchantCode == null){
throw new MsgException("账号异常");
}
@@ -80,4 +77,26 @@ public class ZfbAttestationController {
}
return ResultGenerator.genSuccessResult(merchantCodeMap);
}
private MerchantChannelStatus checkChannel(String merchantCode){
LambdaQueryWrapper<MerchantChannelStatus> qWrapper2 = Wrappers.lambdaQuery();
qWrapper2.eq(MerchantChannelStatus::getMerchantCode, merchantCode)
.in(MerchantChannelStatus::getStatus,
MerchantChannelStatus.AUDIT_STATUS_SUCCESS,
MerchantChannelStatus.AUDIT_STATUS_DATA_EDIT)
.orderByDesc(MerchantChannelStatus::getValid)
.orderByAsc(MerchantChannelStatus::getId)
.last("limit 1");
MerchantChannelStatus mcs = merchantChannelStatusService.getOne(qWrapper2);
if (mcs != null) {
return mcs;
}
LambdaQueryWrapper<MerchantChannelStatus> qWrapper = new LambdaQueryWrapper<MerchantChannelStatus>()
.eq(MerchantChannelStatus::getMerchantCode, merchantCode)
.orderByDesc(MerchantChannelStatus::getValid)
.orderByAsc(MerchantChannelStatus::getId)
.last("limit 1");
return merchantChannelStatusService.getOne(qWrapper);
}
}

View File

@@ -36,6 +36,7 @@ public class MerchantCashPlaceController {
@Resource
private MerchantChannelMapper merchantChannelMapper;
@PostMapping
public Result<Object> add(@RequestBody MerchantCashPlace merchantCashPlace) {
//判定字符位数

View File

@@ -66,9 +66,9 @@ public class MerchantCashierCounteController {
* @return
*/
@GetMapping("/list")
public Result<Object> list(@RequestParam Integer current, @RequestParam Integer size) {
public Result<Object> list(@RequestParam Integer current, @RequestParam Integer size, @RequestParam String name) {
UserApp userApp = userAppService.queryUserAppByToken();
PageInfo result = merchantCashierCounteService.selectList(current,size,userApp.getUserId());
PageInfo result = merchantCashierCounteService.selectList(current,size,userApp.getUserId(),name);
return ResultGenerator.genSuccessResult(result);
}