意向金 加盟费 合同签约增加修改
This commit is contained in:
@@ -33,6 +33,7 @@ public enum ErrorCodeEnum {
|
|||||||
*/
|
*/
|
||||||
TOKEN_ERROR(2000001,"请求异常,与当前登录企业不匹配",null),
|
TOKEN_ERROR(2000001,"请求异常,与当前登录企业不匹配",null),
|
||||||
FAIL(400000, "FAIL", null),
|
FAIL(400000, "FAIL", null),
|
||||||
|
WX_ACCESS_TOKEN_INVALID(400001, "WX_Invalid token", null),
|
||||||
ACCESS_TOKEN_INVALID(400005, "Invalid token", null),
|
ACCESS_TOKEN_INVALID(400005, "Invalid token", null),
|
||||||
PARAMS_VALIDATE_ERROR(400003, "参数校验失败!", null),
|
PARAMS_VALIDATE_ERROR(400003, "参数校验失败!", null),
|
||||||
LOGIN_ERROR(400004, "登录失败", null),
|
LOGIN_ERROR(400004, "登录失败", null),
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
package com.cool.store.dto;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.math.BigDecimal;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author: WangShuo
|
||||||
|
* @Date: 2024/10/31/下午4:16
|
||||||
|
* @Version 1.0
|
||||||
|
* @注释:
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class AmountDTO {
|
||||||
|
@ApiModelProperty("金额")
|
||||||
|
private BigDecimal amount;
|
||||||
|
}
|
||||||
@@ -13,6 +13,7 @@ public interface FranchiseFeeService {
|
|||||||
*/
|
*/
|
||||||
Boolean submitLicense(FranchiseFeeRequest request);
|
Boolean submitLicense(FranchiseFeeRequest request);
|
||||||
|
|
||||||
|
Boolean update(FranchiseFeeRequest request);
|
||||||
/**
|
/**
|
||||||
* 查询加盟费信息
|
* 查询加盟费信息
|
||||||
* @param shopId
|
* @param shopId
|
||||||
|
|||||||
@@ -2,6 +2,7 @@ package com.cool.store.service;
|
|||||||
|
|
||||||
import com.cool.store.context.CurrentUserHolder;
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
import com.cool.store.context.LoginUserInfo;
|
import com.cool.store.context.LoginUserInfo;
|
||||||
|
import com.cool.store.dto.AmountDTO;
|
||||||
import com.cool.store.request.LinePaySubmitRequest;
|
import com.cool.store.request.LinePaySubmitRequest;
|
||||||
import com.cool.store.vo.LinePayVO;
|
import com.cool.store.vo.LinePayVO;
|
||||||
import com.cool.store.vo.PartnerUserInfoVO;
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
@@ -15,6 +16,7 @@ public interface LinePayService {
|
|||||||
|
|
||||||
LinePayVO getLinePayInfo(Long lineId,Integer businessType,Long shopId);
|
LinePayVO getLinePayInfo(Long lineId,Integer businessType,Long shopId);
|
||||||
|
|
||||||
|
Integer updateLinePayInfo(Long lineId, Integer businessType, AmountDTO amount, String userId);
|
||||||
/**
|
/**
|
||||||
* 跳过缴纳意向金
|
* 跳过缴纳意向金
|
||||||
* @param lineId
|
* @param lineId
|
||||||
|
|||||||
@@ -71,6 +71,18 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Boolean update(FranchiseFeeRequest request) {
|
||||||
|
FranchiseFeeDO franchiseFeeDO = request.toFranchiseFeeDO();
|
||||||
|
FranchiseFeeDO franchiseFeeDO1 = franchiseFeeMapper.selectByShopId(request.getShopId());
|
||||||
|
if (Objects.nonNull(franchiseFeeDO1)) {
|
||||||
|
franchiseFeeDO.setId(franchiseFeeDO1.getId());
|
||||||
|
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public FranchiseFeeResponse getDetail(Long shopId) {
|
public FranchiseFeeResponse getDetail(Long shopId) {
|
||||||
FranchiseFeeDO result = franchiseFeeMapper.selectByShopId(shopId);
|
FranchiseFeeDO result = franchiseFeeMapper.selectByShopId(shopId);
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ import com.cool.store.dao.HyPartnerUserInfoDAO;
|
|||||||
import com.cool.store.dao.LineInfoDAO;
|
import com.cool.store.dao.LineInfoDAO;
|
||||||
import com.cool.store.dao.LinePayDAO;
|
import com.cool.store.dao.LinePayDAO;
|
||||||
import com.cool.store.dao.ShopStageInfoDAO;
|
import com.cool.store.dao.ShopStageInfoDAO;
|
||||||
|
import com.cool.store.dto.AmountDTO;
|
||||||
import com.cool.store.entity.*;
|
import com.cool.store.entity.*;
|
||||||
import com.cool.store.enums.ErrorCodeEnum;
|
import com.cool.store.enums.ErrorCodeEnum;
|
||||||
import com.cool.store.enums.MessageEnum;
|
import com.cool.store.enums.MessageEnum;
|
||||||
@@ -76,7 +77,17 @@ public class LinePayServiceImpl implements LinePayService {
|
|||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@Override
|
||||||
|
public Integer updateLinePayInfo(Long lineId, Integer businessType, AmountDTO amount, String userId) {
|
||||||
|
LinePayDO linePayDO = linePayDAO.getByLineIdAndPayTypeAndShopId(lineId, businessType, null);
|
||||||
|
if (linePayDO != null) {
|
||||||
|
linePayDO.setAmount(amount.getAmount());
|
||||||
|
linePayDO.setUpdateTime(new Date());
|
||||||
|
linePayDO.setUpdateUserId(userId);
|
||||||
|
return linePayDAO.updateLinePay(linePayDO);
|
||||||
|
}
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
@Override
|
@Override
|
||||||
public Boolean skipPay(Long lineId, LoginUserInfo user) {
|
public Boolean skipPay(Long lineId, LoginUserInfo user) {
|
||||||
log.info("skipPay lineId:{},操作人:{}",lineId,user.getName());
|
log.info("skipPay lineId:{},操作人:{}",lineId,user.getName());
|
||||||
|
|||||||
@@ -163,25 +163,26 @@ public class SignFranchiseServiceImpl implements SignFranchiseService, AuditResu
|
|||||||
SignFranchiseDO signFranchiseDO = request.toSignFranchiseDO();
|
SignFranchiseDO signFranchiseDO = request.toSignFranchiseDO();
|
||||||
if (Objects.isNull(request.getId())) {
|
if (Objects.isNull(request.getId())) {
|
||||||
signFranchiseMapper.insertSelective(signFranchiseDO);
|
signFranchiseMapper.insertSelective(signFranchiseDO);
|
||||||
|
//店铺信息
|
||||||
|
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
||||||
|
shopInfoDO.setRegionId(request.getRegionId());
|
||||||
|
shopInfoDO.setShopName(request.getShopName());
|
||||||
|
shopInfoDO.setDetailAddress(request.getDetailAddress());
|
||||||
|
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
||||||
|
//更新状态为加盟商
|
||||||
|
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
||||||
|
//暂时去掉
|
||||||
|
lineInfoDO.setJoinStatus(CommonConstants.TWO);
|
||||||
|
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
||||||
|
//todo 提交之后先直接到已签约 正常是待审核
|
||||||
|
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84);
|
||||||
|
//如果加盟合同完成 开始设计阶段与验收阶段
|
||||||
|
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
||||||
|
commonService.sendSms(lineInfoDO.getMobile(),SMSMsgEnum.SIGN_CONTRACT);
|
||||||
} else {
|
} else {
|
||||||
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
|
signFranchiseMapper.updateByPrimaryKeySelective(signFranchiseDO);
|
||||||
}
|
}
|
||||||
//店铺信息
|
|
||||||
ShopInfoDO shopInfoDO = shopInfoMapper.selectByPrimaryKey(request.getShopId());
|
|
||||||
shopInfoDO.setRegionId(request.getRegionId());
|
|
||||||
shopInfoDO.setShopName(request.getShopName());
|
|
||||||
shopInfoDO.setDetailAddress(request.getDetailAddress());
|
|
||||||
shopInfoMapper.updateByPrimaryKeySelective(shopInfoDO);
|
|
||||||
//更新状态为加盟商
|
|
||||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(shopInfoDO.getLineId());
|
|
||||||
//暂时去掉
|
|
||||||
lineInfoDO.setJoinStatus(CommonConstants.TWO);
|
|
||||||
lineInfoMapper.insertOrUpdate(lineInfoDO);
|
|
||||||
//todo 提交之后先直接到已签约 正常是待审核
|
|
||||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_84);
|
|
||||||
//如果加盟合同完成 开始设计阶段与验收阶段
|
|
||||||
preparationService.contractAndBuildStoreCompletion(request.getShopId());
|
|
||||||
commonService.sendSms(lineInfoDO.getMobile(),SMSMsgEnum.SIGN_CONTRACT);
|
|
||||||
return new ResponseResult(200000,"提交成功");
|
return new ResponseResult(200000,"提交成功");
|
||||||
} else {
|
} else {
|
||||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||||
|
|||||||
@@ -29,6 +29,12 @@ public class PCFranchiseFeeController {
|
|||||||
public ResponseResult submitLicense(@RequestBody FranchiseFeeRequest request) {
|
public ResponseResult submitLicense(@RequestBody FranchiseFeeRequest request) {
|
||||||
return ResponseResult.success(franchiseFeeService.submitLicense(request));
|
return ResponseResult.success(franchiseFeeService.submitLicense(request));
|
||||||
}
|
}
|
||||||
|
@ApiOperation("基本信息修改")
|
||||||
|
@PostMapping("/update")
|
||||||
|
public ResponseResult update(@RequestBody FranchiseFeeRequest request) {
|
||||||
|
return ResponseResult.success(franchiseFeeService.update(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
@ApiOperation("基本信息查询")
|
@ApiOperation("基本信息查询")
|
||||||
@GetMapping("/getDetail")
|
@GetMapping("/getDetail")
|
||||||
|
|||||||
@@ -0,0 +1,42 @@
|
|||||||
|
package com.cool.store.controller.webb;
|
||||||
|
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
|
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.ResponseResult;
|
||||||
|
import com.cool.store.service.LinePayService;
|
||||||
|
import com.cool.store.vo.LinePayVO;
|
||||||
|
import com.cool.store.vo.PartnerUserInfoVO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiImplicitParam;
|
||||||
|
import io.swagger.annotations.ApiImplicitParams;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @Author wxp
|
||||||
|
* @Date 2024/3/25 13:43
|
||||||
|
* @Version 1.0
|
||||||
|
*/
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/pc/linePay")
|
||||||
|
@Api(tags = "pc缴纳意向金")
|
||||||
|
@Slf4j
|
||||||
|
public class PCLinePayController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private LinePayService linePayService;
|
||||||
|
|
||||||
|
@ApiOperation("修改意向金缴费金额")
|
||||||
|
@PostMapping("/updateLinePayInfo")
|
||||||
|
public ResponseResult<Integer> updateLinePayInfo(@RequestParam("lineId")Long lineId,@RequestBody AmountDTO amount) {
|
||||||
|
return ResponseResult.success(linePayService.updateLinePayInfo(lineId, PayBusinessTypeEnum.INTENT_MONEY.getCode(),amount, CurrentUserHolder.getUserId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.cool.store.controller.webc;
|
package com.cool.store.controller.webc;
|
||||||
|
|
||||||
|
import com.cool.store.context.CurrentUserHolder;
|
||||||
import com.cool.store.context.PartnerUserHolder;
|
import com.cool.store.context.PartnerUserHolder;
|
||||||
|
import com.cool.store.dto.AmountDTO;
|
||||||
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
import com.cool.store.enums.point.PayBusinessTypeEnum;
|
||||||
import com.cool.store.request.LinePaySubmitRequest;
|
import com.cool.store.request.LinePaySubmitRequest;
|
||||||
import com.cool.store.response.ResponseResult;
|
import com.cool.store.response.ResponseResult;
|
||||||
@@ -46,4 +48,11 @@ public class LinePayController {
|
|||||||
return ResponseResult.success(linePayService.submitPayInfo(request, partnerUser));
|
return ResponseResult.success(linePayService.submitPayInfo(request, partnerUser));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("修改意向金缴费金额")
|
||||||
|
@PostMapping("/updateLinePayInfo")
|
||||||
|
public ResponseResult<Integer> updateLinePayInfo(@RequestParam("lineId")Long lineId,@RequestBody AmountDTO amount) {
|
||||||
|
return ResponseResult.success(linePayService.updateLinePayInfo(lineId, PayBusinessTypeEnum.INTENT_MONEY.getCode(),amount, CurrentUserHolder.getUserId()));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user