feat:阶段完成
This commit is contained in:
@@ -193,6 +193,7 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public ApiResponse<Boolean> changePaymentStatus(FranchiseFeeCallBackRequest request) {
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||
if (Objects.isNull(shopInfoDO)){
|
||||
@@ -206,6 +207,9 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
||||
franchiseFeeDO.setXgjRemainderPayableAmount(request.getRemainingFee());
|
||||
franchiseFeeDO.setXgjFeesPaid(request.getPayableFee());
|
||||
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
||||
if (XGJCollectionStatusEnum.COMPLETED.getCode().equals(request.getPaymentStatus())){
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(),ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73);
|
||||
}
|
||||
return ApiResponse.success(Boolean.TRUE);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -279,6 +279,7 @@ public class LinePayServiceImpl implements LinePayService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public ApiResponse<Boolean> ReceiptCallBack(ReceiptCallBackRequest request) {
|
||||
LinePayDO linePayDO = linePayDAO.selectByPaymentReceiptCode(request.getReceiptId());
|
||||
if (Objects.isNull(linePayDO)){
|
||||
|
||||
@@ -10,11 +10,15 @@ import com.cool.store.enums.DownSystemTypeEnum;
|
||||
import com.cool.store.enums.MessageEnum;
|
||||
import com.cool.store.enums.SMSMsgEnum;
|
||||
import com.cool.store.job.XxlJobHandler;
|
||||
import com.cool.store.mapper.FranchiseFeeMapper;
|
||||
import com.cool.store.mapper.LineInfoMapper;
|
||||
import com.cool.store.mapper.ShopInfoMapper;
|
||||
import com.cool.store.mq.util.HttpRestTemplateService;
|
||||
import com.cool.store.request.GetPasswordDTO;
|
||||
import com.cool.store.request.bigdata.ProfitDataRequest;
|
||||
import com.cool.store.request.huoma.ShopBasicInfoRequest;
|
||||
import com.cool.store.request.oppty.*;
|
||||
import com.cool.store.request.xgj.PushFranchiseFeeRequest;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.bigdata.ActDataResponse;
|
||||
import com.cool.store.response.bigdata.ProfitDataResponse;
|
||||
@@ -64,6 +68,15 @@ public class PCTestController {
|
||||
private SyncDataService syncDataService;
|
||||
@Resource
|
||||
private HttpRestTemplateService httpRestTemplateService;
|
||||
@Resource
|
||||
FranchiseFeeMapper franchiseFeeMapper;
|
||||
|
||||
@Resource
|
||||
ShopInfoMapper shopInfoMapper;
|
||||
@Resource
|
||||
LinePayService linePayService;
|
||||
@Resource
|
||||
LinePayDAO linePayDAO;
|
||||
|
||||
@GetMapping("/sendMessage")
|
||||
public ResponseResult<Boolean> sendMessage(@RequestParam("lineId")Long lineId,
|
||||
@@ -309,8 +322,7 @@ public class PCTestController {
|
||||
return ResponseResult.success(thirdFoodService.getFoodToken(dto));
|
||||
}
|
||||
|
||||
@Resource
|
||||
LinePayService linePayService;
|
||||
|
||||
@GetMapping("/getToday")
|
||||
@ApiOperation("getToday")
|
||||
public ResponseResult<Boolean> getToday() {
|
||||
@@ -320,5 +332,24 @@ public class PCTestController {
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
@GetMapping("/pushFranchiseFee")
|
||||
@ApiOperation("推送账单")
|
||||
public ResponseResult<Boolean> pushFranchiseFee(@RequestParam(value = "shopId", required = true) Long shopId) {
|
||||
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(shopId);
|
||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(shopId);
|
||||
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
|
||||
PushFranchiseFeeRequest feeRequest = new PushFranchiseFeeRequest(shopInfoDO.getId(), lineInfoDO.getUsername(), franchiseFeeDO);
|
||||
pushService.pushFranchiseFeeToXGJ(feeRequest);
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
@GetMapping("/pushPay")
|
||||
@ApiOperation("推送收款单")
|
||||
public ResponseResult<Boolean> pushPay(@RequestParam(value = "shopId", required = true) Long shopId,
|
||||
@RequestParam(value = "payId", required = true) Long payId) {
|
||||
LinePayDO pay = linePayDAO.getById(payId);
|
||||
linePayService.pushPayInfo(shopId,pay);
|
||||
return ResponseResult.success(Boolean.TRUE);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user