Merge remote-tracking branch 'origin/cc_20250529_franchise_fee' into cc_20250529_franchise_fee

This commit is contained in:
shuo.wang
2025-06-04 16:58:43 +08:00
3 changed files with 38 additions and 2 deletions

View File

@@ -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);
}
}