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