Merge branch 'master' into cc_20250609_takeoutBuild

# Conflicts:
#	coolstore-partner-service/src/main/java/com/cool/store/service/impl/BuildInformationServiceImpl.java
This commit is contained in:
shuo.wang
2025-06-10 15:44:00 +08:00
57 changed files with 1602 additions and 160 deletions

View File

@@ -3,16 +3,19 @@ package com.cool.store.controller.webb;
import cn.hutool.poi.excel.ExcelReader;
import cn.hutool.poi.excel.ExcelUtil;
import com.cool.store.context.CurrentUserHolder;
import com.cool.store.dto.BatchStatusRefreshDTO;
import com.cool.store.entity.ImportTaskDO;
import com.cool.store.enums.FileTypeEnum;
import com.cool.store.enums.ImportTaskStatusEnum;
import com.cool.store.mapper.ImportTaskMapper;
import com.cool.store.response.ResponseResult;
import com.cool.store.response.bigdata.ApiResponse;
import com.cool.store.service.DataHandlerServer;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
@@ -152,4 +155,26 @@ public class DataHandlerController {
dataHandlerServer.dataHandlerV2025029(dataMapList, file.getOriginalFilename(), CurrentUserHolder.getUser(), importTaskDO);
return ResponseResult.success(true);
}
/**
* @Auther: wangshuo
* @Date: 2025/5/23
* @description:不是对外回调接口针对于已经在oa走完数据的我们手动调用接口批量修改数据只做云流水别的别用
*/
@ApiOperation("批量修改门店云流水开通状态")
@PostMapping("/batchStatusRefreshYls")
public ApiResponse<Boolean> batchStatusRefreshYls(@RequestBody @Validated BatchStatusRefreshDTO batchStatusRefreshDTO) {
return ApiResponse.success(dataHandlerServer.batchStatusRefreshYls(batchStatusRefreshDTO));
}
@ApiOperation("处理加盟费阶段")
@GetMapping("/franchiseFeeStageDateHandler")
public ResponseResult<Boolean> franchiseFeeStageDateHandler(){
return ResponseResult.success(dataHandlerServer.franchiseFeeStageDateHandler());
}
@ApiOperation("处理加盟费缴费信息历史数据")
@GetMapping("/franchiseFeeDateHandler")
public ResponseResult<Boolean> franchiseFeeDateHandler(@RequestParam("pageSize") Integer pageSize, @RequestParam("pageNum") Integer pageNum){
return ResponseResult.success(dataHandlerServer.franchiseFeeDateHandler(pageSize,pageNum));
}
}

View File

@@ -76,7 +76,8 @@ public class DeskController {
@ApiOperation("待处理-支付加盟费保证金")
@GetMapping("/payFranchiseFeesPendingList")
public ResponseResult<PageInfo<PreparationCommonPendingVO>> payFranchiseFeesPendingList(@RequestParam(value = "pageNumber", required = true, defaultValue = "1") Integer pageNumber,
@RequestParam(value = "pageSize", required = true, defaultValue = "10") Integer pageSize , @RequestParam(value = "keyword") String keyword) {
@RequestParam(value = "pageSize", required = true, defaultValue = "10") Integer pageSize ,
@RequestParam(value = "keyword") String keyword) {
LoginUserInfo userInfo = CurrentUserHolder.getUser();
return ResponseResult.success(deskService.payFranchiseFeesPendingList(pageNumber, pageSize, userInfo,keyword));
}

View File

@@ -3,6 +3,8 @@ package com.cool.store.controller.webb;
import com.alibaba.fastjson.JSONObject;
import com.cool.store.dto.*;
import com.cool.store.request.OpenApiStoreRequest;
import com.cool.store.request.xgj.FranchiseFeeCallBackRequest;
import com.cool.store.request.xgj.ReceiptCallBackRequest;
import com.cool.store.response.ResponseResult;
import com.cool.store.response.bigdata.ApiResponse;
import com.cool.store.service.OpenApiService;
@@ -51,12 +53,23 @@ public class OpenApiController {
return ApiResponse.success(pushService.getYlsToken(new GetAccessTokenDTO(ylsCode,ylsCode)));
}
@ApiOperation("获取门店信息")
@PostMapping("/getStoreList")
public ApiResponse<PageInfo<StoreDTO>> getStoreList(@RequestBody @Validated OpenApiStoreRequest dto) {
return ApiResponse.success(storeService.getStoreExtendFieldInfo(dto.getPageSize(),dto.getPageNum()));
}
@ApiOperation("新管家回调 刷新收款单状态")
@PostMapping("/changeReceiptStatus")
public ApiResponse<Boolean> changeReceiptStatus(@RequestBody @Validated ReceiptCallBackRequest request){
log.info("changeReceiptStatus request{}", JSONObject.toJSONString(request));
return openApiService.changeReceiptStatus(request);
}
@ApiOperation("新管家回调 账单收款状态及缴款金额")
@PostMapping("/changePaymentStatus")
public ApiResponse<Boolean> changePaymentStatus(@RequestBody @Validated FranchiseFeeCallBackRequest request){
log.info("changePaymentStatus request{}", JSONObject.toJSONString(request));
return openApiService.changePaymentStatus(request);
}
}

View File

@@ -5,6 +5,7 @@ import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dto.AmountDTO;
import com.cool.store.enums.point.PayBusinessTypeEnum;
import com.cool.store.request.LinePaySubmitRequest;
import com.cool.store.response.FranchiseFeePayInfoResponse;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.LinePayService;
import com.cool.store.vo.LinePayVO;
@@ -17,6 +18,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author wxp
@@ -44,12 +46,27 @@ public class PCLinePayController {
return ResponseResult.success(linePayService.getAmount(lineId));
}
@ApiOperation("缴纳意向金/加盟费")
@PostMapping("/submitPayInfo")
public ResponseResult<Long> submitPayInfo(@RequestBody LinePaySubmitRequest request){
PartnerUserInfoVO partnerUser = PartnerUserHolder.getUser();
return ResponseResult.success(linePayService.submitPayInfo(request, partnerUser));
@ApiOperation("加盟费提交缴费信息")
@PostMapping("/submitFranchiseFeePayInfo")
public ResponseResult<Long> submitFranchiseFeePayInfo(@RequestBody LinePaySubmitRequest request){
return ResponseResult.success(linePayService.submitFranchiseFeePayInfo(request, CurrentUserHolder.getUserId()));
}
@ApiOperation("查询加盟费缴费信息")
@GetMapping("/getFranchiseFeePayInfoList")
public ResponseResult<List<FranchiseFeePayInfoResponse>> getFranchiseFeePayInfoList(@RequestParam("shopId") Long shopId) {
return ResponseResult.success(linePayService.getFranchiseFeePayInfoList(shopId));
}
@ApiOperation("删除加盟费缴费信息")
@GetMapping("/deleteFranchiseFeePayInfo")
public ResponseResult<Boolean> deleteFranchiseFeePayInfo(@RequestParam("id") Long id) {
return ResponseResult.success(linePayService.deleteFranchiseFeePayInfo(id, CurrentUserHolder.getUserId()));
}
@ApiOperation("查询缴费信息")
@GetMapping("/getById")
public ResponseResult<FranchiseFeePayInfoResponse> getById(@RequestParam("id") Long id) {
return ResponseResult.success(linePayService.getById(id));
}
}

View File

@@ -159,21 +159,16 @@ public class PCShopController {
}
/**
* @Auther: wangshuo
* @Date: 2025/5/23
* @description:不是对外回调接口针对于已经在oa走完数据的我们手动调用接口批量修改数据只做云流水别的别用
*/
@ApiOperation("批量修改门店云流水开通状态")
@PostMapping("/batchStatusRefreshYls")
public ApiResponse<Boolean> batchStatusRefreshYls(@RequestBody @Validated BatchStatusRefreshDTO batchStatusRefreshDTO) {
return ApiResponse.success(openApiService.batchStatusRefreshYls(batchStatusRefreshDTO));
}
@ApiOperation("获取店铺所属品牌")
@GetMapping("/getFranchiseBrandName")
public ResponseResult<String> getFranchiseBrandName(@RequestParam(name = "shopId")Long shopId) {
return ResponseResult.success(shopService.getFranchiseBrandName(shopId));
}
@ApiOperation("获取店铺某阶段状态")
@GetMapping("/getShopStageStatus")
public ResponseResult<ShopStageInfoVO> getShopStageStatus(@RequestParam("shopId")Long shopId, @RequestParam("subStage")Integer subStage) {
return ResponseResult.success(shopService.getShopStageStatus(shopId, subStage));
}
}

View File

@@ -1,5 +1,6 @@
package com.cool.store.controller.webb;
import com.cool.store.constants.RedisConstant;
import com.cool.store.dao.*;
import com.cool.store.dto.FoodTokenDTO;
import com.cool.store.dto.GetAccessTokenDTO;
@@ -8,12 +9,17 @@ import com.cool.store.entity.*;
import com.cool.store.enums.DownSystemTypeEnum;
import com.cool.store.enums.MessageEnum;
import com.cool.store.enums.SMSMsgEnum;
import com.cool.store.enums.point.ShopSubStageStatusEnum;
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;
@@ -25,14 +31,19 @@ import com.cool.store.response.oppty.OpportunityInfoPageResponse;
import com.cool.store.service.*;
import com.cool.store.service.impl.CommonService;
import com.cool.store.service.impl.UserAuthMappingServiceImpl;
import com.cool.store.utils.CoolDateUtils;
import com.cool.store.utils.RedisConstantUtil;
import com.cool.store.utils.RedisUtilPool;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.*;
import java.util.stream.Collectors;
@Slf4j
@RestController
@@ -59,6 +70,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,
@@ -262,6 +282,12 @@ public class PCTestController {
return ResponseResult.success(pushService.getXgjOrganization(partnerId));
}
@GetMapping("/getXgjAccessToken")
@ApiOperation("获取新管家token")
public ResponseResult<Object> getXgjAccessToken() {
return ResponseResult.success(pushService.getXgjAccessToken());
}
@Resource
ShopAccountService accountService;
@@ -304,4 +330,78 @@ public class PCTestController {
return ResponseResult.success(thirdFoodService.getFoodToken(dto));
}
@GetMapping("/getToday")
@ApiOperation("getToday")
public ResponseResult<Boolean> getToday() {
for (int i = 0; i < 10; i++) {
System.out.println(linePayService.getPaymentReceiptCode());
}
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);
}
@Resource
ShopStageInfoDAO shopStageInfoDAO;
@GetMapping("/franchiseFeeDataHandler")
@ApiOperation("加盟费数据处理")
public ResponseResult<Boolean> franchiseFeeDataHandler(){
//查询所有的待加盟商缴费 推送账单
List<ShopStageInfoDO> shopList = shopStageInfoDAO.getShopIdListByStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_71.getShopSubStageStatus());
log.info("----------开始推送账单数据---------");
shopList.forEach(x->{
try {
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(x.getShopId());
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(x.getShopId());
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
PushFranchiseFeeRequest feeRequest = new PushFranchiseFeeRequest(shopInfoDO.getId(), lineInfoDO.getUsername(), franchiseFeeDO);
pushService.pushFranchiseFeeToXGJ(feeRequest);
} catch (Exception e) {
log.error("推送数据失败 shopId {},异常信息:{}",x,e.getMessage());
}
});
log.info("----------推送账单数据结束---------");
//对账中
log.info("----------开始推送账单与收款单数据---------");
List<ShopStageInfoDO> shopList2 = shopStageInfoDAO.getShopIdListByStageStatus(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_72.getShopSubStageStatus());
shopList2.forEach(x->{
//先推送账单
try {
FranchiseFeeDO franchiseFeeDO = franchiseFeeMapper.selectByShopId(x.getShopId());
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(x.getShopId());
LineInfoDO lineInfoDO = lineInfoDAO.getLineInfo(shopInfoDO.getLineId());
PushFranchiseFeeRequest feeRequest = new PushFranchiseFeeRequest(shopInfoDO.getId(), lineInfoDO.getUsername(), franchiseFeeDO);
pushService.pushFranchiseFeeToXGJ(feeRequest);
List<LinePayDO> franchiseFeePayInfoByShopId = linePayDAO.getFranchiseFeePayInfoByShopId(x.getShopId());
franchiseFeePayInfoByShopId.forEach(y->{
linePayService.pushPayInfo(x.getShopId(),y);
});
} catch (Exception e) {
log.error("推送数据失败 shopId {},异常信息:{}",x,e.getMessage());
}
});
log.info("----------账单与收款单数据推送完成---------");
return ResponseResult.success(Boolean.TRUE);
}
}

View File

@@ -5,6 +5,7 @@ import com.cool.store.context.PartnerUserHolder;
import com.cool.store.dto.AmountDTO;
import com.cool.store.enums.point.PayBusinessTypeEnum;
import com.cool.store.request.LinePaySubmitRequest;
import com.cool.store.response.FranchiseFeePayInfoResponse;
import com.cool.store.response.ResponseResult;
import com.cool.store.service.LinePayService;
import com.cool.store.vo.LinePayVO;
@@ -17,6 +18,7 @@ import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.List;
/**
* @Author wxp
@@ -54,4 +56,27 @@ public class LinePayController {
return ResponseResult.success(linePayService.getAmount(lineId));
}
@ApiOperation("加盟费提交缴费信息")
@PostMapping("/submitFranchiseFeePayInfo")
public ResponseResult<Long> submitFranchiseFeePayInfo(@RequestBody LinePaySubmitRequest request){
return ResponseResult.success(linePayService.submitFranchiseFeePayInfo(request, PartnerUserHolder.getUser().getPartnerId()));
}
@ApiOperation("查询加盟费缴费信息")
@GetMapping("/getFranchiseFeePayInfoList")
public ResponseResult<List<FranchiseFeePayInfoResponse>> getFranchiseFeePayInfoList(@RequestParam("shopId") Long shopId) {
return ResponseResult.success(linePayService.getFranchiseFeePayInfoList(shopId));
}
@ApiOperation("删除加盟费缴费信息")
@GetMapping("/deleteFranchiseFeePayInfo")
public ResponseResult<Boolean> deleteFranchiseFeePayInfo(@RequestParam("id") Long id) {
return ResponseResult.success(linePayService.deleteFranchiseFeePayInfo(id, PartnerUserHolder.getUser().getPartnerId()));
}
@ApiOperation("查询缴费信息")
@GetMapping("/getById")
public ResponseResult<FranchiseFeePayInfoResponse> getById(@RequestParam("id") Long id) {
return ResponseResult.success(linePayService.getById(id));
}
}

View File

@@ -138,4 +138,10 @@ public class MiniShopController {
return ResponseResult.success(shopService.getFranchiseBrandName(shopId));
}
@ApiOperation("获取店铺某阶段状态")
@GetMapping("/getShopStageStatus")
public ResponseResult<ShopStageInfoVO> getShopStageStatus(@RequestParam("shopId")Long shopId, @RequestParam("subStage")Integer subStage) {
return ResponseResult.success(shopService.getShopStageStatus(shopId, subStage));
}
}

View File

@@ -94,9 +94,10 @@ api.auth.username=GkqgAhUJ7p9swJo
api.auth.secret=NzVrnS3OWiupdDY
#xingguanjia
xgj.api.auth.url=https://masterdata.zhengxinfood.com/dmp/one-id
xgj.api.auth.url=https://masterdata.zhengxinfood.com
xgj.api.auth.username=6446346061e043e392dd53c9c8d1af0b
xgj.api.auth.secret=3ba6e4c5632547b8b2b3acefe08667bb
xgj.api.token.url=http://121.199.29.202:9000
#yunliushui
yls.api.auth.url=http://yuanguiwuliu.com

View File

@@ -105,9 +105,10 @@ api.auth.username=VA59C0ubfcpcVpl
api.auth.secret=H9YKHF6R7N16Fvy
#新管家账号
xgj.api.auth.url=http://117.139.13.24:11180/dmp/one-id
xgj.api.auth.url=http://117.139.13.24:11180
xgj.api.auth.username=6446346061e043e392dd53c9c8d1af0b
xgj.api.auth.secret=3ba6e4c5632547b8b2b3acefe08667bb
xgj.api.token.url=http://117.139.13.24:29000
#云流水账号
#yls.api.auth.url=http://scm330-test.366ec.net