收银点
This commit is contained in:
@@ -66,7 +66,7 @@ public class MerchantCashierCounteController {
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/list")
|
||||
public Result<Object> list(@RequestParam Integer current, @RequestParam Integer size, @RequestParam String name) {
|
||||
public Result<Object> list(@RequestParam Integer current, @RequestParam Integer size, String name) {
|
||||
UserApp userApp = userAppService.queryUserAppByToken();
|
||||
PageInfo result = merchantCashierCounteService.selectList(current,size,userApp.getUserId(),name);
|
||||
return ResultGenerator.genSuccessResult(result);
|
||||
|
||||
@@ -136,6 +136,8 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
||||
private MerchantChannelStatusMapper merchantChannelStatusMapper;
|
||||
@Setter(onMethod_ = {@Autowired})
|
||||
private UserInfoMapper userInfoMapper;
|
||||
@Setter(onMethod_ = {@Autowired})
|
||||
private MerchantChannelMapper merchantChannelMapper;
|
||||
@Override
|
||||
public void merchantAuditV3(String userId, boolean isFailCheck, Integer channel) {
|
||||
try {
|
||||
@@ -335,7 +337,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
||||
}
|
||||
}
|
||||
|
||||
private void addCash(MerchantChannelStatus mcs) {
|
||||
private void addCash(MerchantChannelStatus mcs,Integer channl) {
|
||||
QueryWrapper<MerchantChannelStatus> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("status", "3");
|
||||
queryWrapper.eq("merchantCode", mcs.getMerchantCode());
|
||||
@@ -351,11 +353,14 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
||||
merchantCashPlace.setAddress(merchantBaseInfo.getAddress());
|
||||
merchantCashPlace.setUserId(Long.valueOf(merchantBaseInfo.getUserId()));
|
||||
merchantCashPlace.setName("收银点一");
|
||||
merchantCashPlace.setPayPassageId(mcs.getChannel());
|
||||
merchantCashPlace.setPayPassageName(mcs.getChannelName());
|
||||
merchantCashPlace.setPayPassageId(channl);
|
||||
MerchantChannel merchantChannel = merchantChannelMapper.selectById(channl);
|
||||
if (Objects.nonNull(merchantChannel)){
|
||||
merchantCashPlace.setPayPassageName(merchantChannel.getChannelName());
|
||||
}
|
||||
merchantCashPlace.setCreateTime(new Date());
|
||||
merchantCashPlace.setName(merchantBaseInfo.getAlias());
|
||||
merchantCashPlace.setRootAccountId(Long.valueOf(merchantBaseInfo.getUserId()));
|
||||
merchantCashPlace.setRootAccountId(merchantCashPlace.getUserId());
|
||||
merchantCashPlace.setCode(getCode());
|
||||
merchantCashPlaceMapper.insert(merchantCashPlace);
|
||||
UserInfo userInfo = userInfoMapper.selectById(merchantBaseInfo.getUserId());
|
||||
@@ -839,7 +844,7 @@ public class YSAuditServiceV3 implements cn.pluss.platform.channel.ys.YSAuditSer
|
||||
bizContentMap.put("appletId", "wxfc7bd92a462eb191");
|
||||
ysServiceV3.req(ReqMethod.appIdAddOrUpdate, bizContentMap,channel);
|
||||
try {
|
||||
addCash(mcs);
|
||||
addCash(mcs,4);
|
||||
}catch (Exception e){
|
||||
log.info("创建店铺信息异常,异常信息:{}", e.getMessage());
|
||||
}
|
||||
|
||||
@@ -105,6 +105,8 @@ public class LklMerAuditHandler {
|
||||
@Setter(onMethod_ = {@Autowired})
|
||||
private MerchantBaseInfoMapper merchantBaseInfoMapper;
|
||||
@Setter(onMethod_ = {@Autowired})
|
||||
private MerchantChannelMapper merchantChannelMapper;
|
||||
@Setter(onMethod_ = {@Autowired})
|
||||
private MerchantCashPlaceMapper merchantCashPlaceMapper;
|
||||
@Setter(onMethod_ = {@Autowired})
|
||||
private UserCashPlaceMapper userCashPlaceMapper;
|
||||
@@ -135,7 +137,7 @@ public class LklMerAuditHandler {
|
||||
self.createStore(mcs);
|
||||
|
||||
try {
|
||||
addCash(mcs);
|
||||
addCash(mcs,5);
|
||||
}catch (Exception e){
|
||||
log.info("创建店铺信息异常,异常信息:{}", e.getMessage());
|
||||
}
|
||||
@@ -157,7 +159,7 @@ public class LklMerAuditHandler {
|
||||
|
||||
}
|
||||
|
||||
private void addCash(MerchantChannelStatus mcs) {
|
||||
private void addCash(MerchantChannelStatus mcs, int channl) {
|
||||
QueryWrapper<MerchantChannelStatus> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("status", "3");
|
||||
queryWrapper.eq("merchantCode", mcs.getMerchantCode());
|
||||
@@ -173,8 +175,11 @@ public class LklMerAuditHandler {
|
||||
merchantCashPlace.setAddress(merchantBaseInfo.getAddress());
|
||||
merchantCashPlace.setUserId(Long.valueOf(merchantBaseInfo.getUserId()));
|
||||
merchantCashPlace.setName("收银点一");
|
||||
merchantCashPlace.setPayPassageId(mcs.getChannel());
|
||||
merchantCashPlace.setPayPassageName(mcs.getChannelName());
|
||||
merchantCashPlace.setPayPassageId(channl);
|
||||
MerchantChannel merchantChannel = merchantChannelMapper.selectById(channl);
|
||||
if (Objects.nonNull(merchantChannel)){
|
||||
merchantCashPlace.setPayPassageName(merchantChannel.getChannelName());
|
||||
}
|
||||
merchantCashPlace.setCreateTime(new Date());
|
||||
merchantCashPlace.setName(merchantBaseInfo.getAlias());
|
||||
merchantCashPlace.setRootAccountId(Long.valueOf(merchantBaseInfo.getUserId()));
|
||||
|
||||
@@ -71,6 +71,8 @@ public class SxfMerAuditHandler {
|
||||
private UserCashPlaceMapper userCashPlaceMapper;
|
||||
@Setter(onMethod_ = {@Autowired})
|
||||
private MerchantChannelStatusMapper merchantChannelStatusMapper;
|
||||
@Setter(onMethod_ = {@Autowired})
|
||||
private MerchantChannelMapper merchantChannelMapper;
|
||||
@Setter(onMethod_ = {@Autowired, @Lazy})
|
||||
private MerchantCashPlaceService cashPlaceService;
|
||||
|
||||
@@ -109,32 +111,32 @@ public class SxfMerAuditHandler {
|
||||
log.info("===================>(餐饮商超)进件回调,创建店铺开始,商户编号mno为:{}<=====================", auditResult.getString("mno"));
|
||||
self.createStore(mcs);
|
||||
try {
|
||||
addCash(mcs);
|
||||
addCash(mcs,1);
|
||||
}catch (Exception e){
|
||||
log.info("创建店铺信息异常,异常信息:{}", e.getMessage());
|
||||
log.info("创建店铺信息异常,异常信息创建默认收银点失败,异常信息:{}", e.getMessage());
|
||||
}
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace();
|
||||
log.info("创建店铺信息异常,异常信息:{}", e.getMessage());
|
||||
}
|
||||
|
||||
try {
|
||||
MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getMerchantBaseInfoByMerchantCode(mcs.getMerchantCode());
|
||||
if (StringUtils.isNotBlank(merchantBaseInfo.getUserId())) {
|
||||
cashPlaceService.createDefaultCashPlace(Long.parseLong(merchantBaseInfo.getUserId()));
|
||||
}
|
||||
} catch (Exception e) {
|
||||
LogExceptionUtils.printStack(log, e, "创建默认收银点失败,异常信息:{}");
|
||||
}
|
||||
// try {
|
||||
// MerchantBaseInfo merchantBaseInfo = merchantBaseInfoService.getMerchantBaseInfoByMerchantCode(mcs.getMerchantCode());
|
||||
// if (StringUtils.isNotBlank(merchantBaseInfo.getUserId())) {
|
||||
// cashPlaceService.createDefaultCashPlace(Long.parseLong(merchantBaseInfo.getUserId()));
|
||||
// }
|
||||
// } catch (Exception e) {
|
||||
// LogExceptionUtils.printStack(log, e, "创建默认收银点失败,异常信息:{}");
|
||||
// }
|
||||
}
|
||||
|
||||
private void addCash(MerchantChannelStatus mcs){
|
||||
private void addCash(MerchantChannelStatus mcs, int channl){
|
||||
QueryWrapper<MerchantChannelStatus> queryWrapper = new QueryWrapper<>();
|
||||
queryWrapper.eq("status","3");
|
||||
queryWrapper.eq("merchantCode",mcs.getMerchantCode());
|
||||
// queryWrapper.eq("channel")
|
||||
long num = merchantChannelStatusMapper.selectCount(queryWrapper);
|
||||
if (num < 1){
|
||||
if (num < 2){
|
||||
QueryWrapper<MerchantBaseInfo> baseInfoQueryWrapper = new QueryWrapper<>();
|
||||
baseInfoQueryWrapper.eq("merchantCode",mcs.getMerchantCode());
|
||||
List<MerchantBaseInfo> list = merchantBaseInfoMapper.selectList(baseInfoQueryWrapper);
|
||||
@@ -144,6 +146,11 @@ public class SxfMerAuditHandler {
|
||||
merchantCashPlace.setAddress(merchantBaseInfo.getAddress());
|
||||
merchantCashPlace.setUserId(Long.valueOf(merchantBaseInfo.getUserId()));
|
||||
merchantCashPlace.setName("收银点一");
|
||||
merchantCashPlace.setPayPassageId(channl);
|
||||
MerchantChannel merchantChannel = merchantChannelMapper.selectById(channl);
|
||||
if (Objects.nonNull(merchantChannel)){
|
||||
merchantCashPlace.setPayPassageName(merchantChannel.getChannelName());
|
||||
}
|
||||
merchantCashPlace.setPayPassageId(mcs.getChannel());
|
||||
merchantCashPlace.setPayPassageName(mcs.getChannelName());
|
||||
merchantCashPlace.setCreateTime(new Date());
|
||||
|
||||
Reference in New Issue
Block a user