Merge remote-tracking branch 'origin/cc_partner_init' into cc_partner_init
This commit is contained in:
@@ -31,6 +31,7 @@ public enum RocketMqGroupEnum {
|
||||
* 事件消息监听
|
||||
*/
|
||||
FEI_SHU_EVENT_LISTENER("fei_shu_event_listener", new ArrayList<>(Arrays.asList(RocketMqTagEnum.USER_EVENT, RocketMqTagEnum.AUTH_SCOPE_CHANGE, RocketMqTagEnum.DEPT_EVENT))),
|
||||
SYNC_TRAINING_PERSON("sync_training_person", new ArrayList<>(Arrays.asList(RocketMqTagEnum.SYNC_TRAINING_PERSON))),
|
||||
|
||||
;
|
||||
|
||||
|
||||
@@ -15,6 +15,7 @@ public enum RocketMqTagEnum {
|
||||
USER_EVENT("user_event","钉钉通讯录变更事件"),
|
||||
DEPT_EVENT("dept_event","部门事件"),
|
||||
STORE_DING_QUEUE("store_ding_queue", "微应用钉钉消息发送"),
|
||||
SYNC_TRAINING_PERSON("sync_training_person", "建店完成后拉取培训人员"),
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -16,6 +16,7 @@ import com.github.pagehelper.PageHelper;
|
||||
import com.google.common.collect.Maps;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@@ -161,4 +162,11 @@ public class ShopInfoDAO {
|
||||
public Long getRegionIdByid(Long shopId){
|
||||
return shopInfoMapper.getRegionIdByid(shopId);
|
||||
}
|
||||
|
||||
public ShopInfoDO selectByStoreNum(String storeNum){
|
||||
if (StringUtils.isBlank(storeNum)) {
|
||||
return null;
|
||||
}
|
||||
return shopInfoMapper.selectByStoreNum(storeNum);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.cool.store.dto.ehr;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
/**
|
||||
* 鲜丰门店下培训人员拉取
|
||||
* @author chenyupeng
|
||||
* @since 2021/8/17
|
||||
*/
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class SyncXfsgTrainingPersonInfoDTO {
|
||||
|
||||
/**
|
||||
* 企业id
|
||||
*/
|
||||
private String enterpriseId;
|
||||
/**
|
||||
* 工号
|
||||
*/
|
||||
private String jobnumber;
|
||||
/**
|
||||
* 身份证号码
|
||||
*/
|
||||
private String idCard;
|
||||
/**
|
||||
* 门店编号
|
||||
*/
|
||||
private String storeNum;
|
||||
|
||||
|
||||
}
|
||||
@@ -5,13 +5,13 @@ import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import javax.persistence.*;
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@ApiModel("加盟费/保证金实体")
|
||||
public class FranchiseFeeRequest {
|
||||
|
||||
private Long id;
|
||||
@ApiModelProperty("shopId")
|
||||
private Long shopId;
|
||||
@ApiModelProperty("payId")
|
||||
|
||||
@@ -8,6 +8,7 @@ import com.aliyun.openservices.ons.api.bean.Subscription;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.enums.RocketMqGroupEnum;
|
||||
import com.cool.store.mq.RocketMqConfig;
|
||||
import com.cool.store.mq.consumer.listener.XfsgTrainingPersonSyncListener;
|
||||
import com.google.common.collect.Maps;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
@@ -29,6 +30,8 @@ public class ConsumerClient {
|
||||
private RocketMqConfig rocketMqConfig;
|
||||
// @Resource
|
||||
// private FeiShuEventListener feiShuEventListener;
|
||||
@Resource
|
||||
private XfsgTrainingPersonSyncListener xfsgTrainingPersonSyncListener;
|
||||
|
||||
/**
|
||||
* 获取通用配置
|
||||
@@ -81,4 +84,20 @@ public class ConsumerClient {
|
||||
// return consumerBean;
|
||||
// }
|
||||
|
||||
/**
|
||||
* 鲜丰门店下培训人员拉取
|
||||
*/
|
||||
@Bean(initMethod = "start", destroyMethod = "shutdown")
|
||||
public ConsumerBean xfsgTrainingPersonSyncQueueBean() {
|
||||
RocketMqGroupEnum groupEnum = RocketMqGroupEnum.SYNC_TRAINING_PERSON;
|
||||
ConsumerBean consumerBean = new ConsumerBean();
|
||||
//配置文件
|
||||
Properties properties = getCommonProperties(groupEnum);
|
||||
consumerBean.setProperties(properties);
|
||||
Map<Subscription, MessageListener> commonSubscriptionTable = getCommonSubscriptionTable(groupEnum, xfsgTrainingPersonSyncListener);
|
||||
//订阅多个topic如上面设置
|
||||
consumerBean.setSubscriptionTable(commonSubscriptionTable);
|
||||
return consumerBean;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,157 @@
|
||||
package com.cool.store.mq.consumer.listener;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.aliyun.openservices.ons.api.Action;
|
||||
import com.aliyun.openservices.ons.api.ConsumeContext;
|
||||
import com.aliyun.openservices.ons.api.Message;
|
||||
import com.aliyun.openservices.ons.api.MessageListener;
|
||||
import com.cool.store.constants.CommonConstants;
|
||||
import com.cool.store.dao.ShopInfoDAO;
|
||||
import com.cool.store.dao.TempUserDetailDAO;
|
||||
import com.cool.store.dto.ehr.StaffBaseInfoDTO;
|
||||
import com.cool.store.dto.ehr.SyncXfsgTrainingPersonInfoDTO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.entity.TempUserDetailDO;
|
||||
import com.cool.store.enums.UserRoleEnum;
|
||||
import com.cool.store.service.XfsgEhrService;
|
||||
import com.cool.store.utils.RedisUtilPool;
|
||||
import com.cool.store.utils.poi.DateUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* 鲜丰门店下培训人员拉取
|
||||
* @author wxp
|
||||
* @since 2024/4/29
|
||||
*/
|
||||
@Slf4j
|
||||
@Service
|
||||
public class XfsgTrainingPersonSyncListener implements MessageListener {
|
||||
|
||||
@Resource
|
||||
public XfsgEhrService xfsgEhrService;
|
||||
|
||||
@Resource
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
|
||||
@Resource
|
||||
private TempUserDetailDAO tempUserDetailDAO;
|
||||
|
||||
@Autowired
|
||||
public RedisUtilPool redisUtilPool;
|
||||
|
||||
@Override
|
||||
public Action consume(Message message, ConsumeContext context) {
|
||||
String text = new String(message.getBody());
|
||||
if(StringUtils.isBlank(text)){
|
||||
log.info("消息体为空,tag:{},messageId:{}",message.getTag(),message.getMsgID());
|
||||
return Action.CommitMessage;
|
||||
}
|
||||
String lockKey = "XfsgTrainingPersonSyncListener:" + message.getMsgID();
|
||||
boolean lock = redisUtilPool.setNxExpire(lockKey, message.getMsgID(), CommonConstants.NORMAL_LOCK_TIMES);
|
||||
if(lock){
|
||||
try {
|
||||
syncXfsgTrainingPerson(text);
|
||||
}catch (Exception e){
|
||||
log.error("XfsgTrainingPersonSyncListener consume error",e);
|
||||
return Action.ReconsumeLater;
|
||||
}finally {
|
||||
redisUtilPool.delKey(lockKey);
|
||||
}
|
||||
log.info("消费成功,tag:{},messageId:{},reqBody={}",message.getTag(),message.getMsgID(),text);
|
||||
return Action.CommitMessage;
|
||||
}
|
||||
return Action.ReconsumeLater;
|
||||
}
|
||||
|
||||
public void syncXfsgTrainingPerson(String text) {
|
||||
log.info("syncXfsgTrainingPerson, reqBody={}", text);
|
||||
SyncXfsgTrainingPersonInfoDTO request = JSONObject.parseObject(text, SyncXfsgTrainingPersonInfoDTO.class);
|
||||
if(StringUtils.isAnyBlank(request.getStoreNum(), request.getJobnumber(), request.getIdCard())){
|
||||
log.info("syncXfsgTrainingPerson参数缺失={}", text);
|
||||
return;
|
||||
}
|
||||
// 系统建店完成一定有门店编码???
|
||||
ShopInfoDO shopInfoDO = shopInfoDAO.selectByStoreNum(request.getStoreNum());
|
||||
if(shopInfoDO == null){
|
||||
log.info("门店编码对应的店铺信息不存在storeNum:{}", request.getStoreNum());
|
||||
return;
|
||||
}
|
||||
TempUserDetailDO checkTempUserDetailDO = tempUserDetailDAO.selectByIdCard(request.getIdCard());
|
||||
// 系统已建店,并且身份证号信息不存在
|
||||
if(checkTempUserDetailDO != null){
|
||||
log.info("培训人员身份证信息已存在idCard:{}", checkTempUserDetailDO.getIdCard());
|
||||
return;
|
||||
}
|
||||
StaffBaseInfoDTO staffBaseInfoDTO = xfsgEhrService.getUserInfoByCode(request.getJobnumber());
|
||||
log.info("培训人员主数据信息:staffBaseInfoDTO:{}", JSONObject.toJSONString(staffBaseInfoDTO));
|
||||
if(staffBaseInfoDTO != null){
|
||||
TempUserDetailDO tempUserDetailDO = fillTempUserDetailDO(shopInfoDO, staffBaseInfoDTO);
|
||||
tempUserDetailDAO.insertSelective(tempUserDetailDO);
|
||||
}
|
||||
}
|
||||
|
||||
private TempUserDetailDO fillTempUserDetailDO(ShopInfoDO shopInfoDO, StaffBaseInfoDTO staffBaseInfoDTO) {
|
||||
TempUserDetailDO tempUserDetailDO = new TempUserDetailDO();
|
||||
tempUserDetailDO.setLineId(shopInfoDO.getLineId());
|
||||
tempUserDetailDO.setShopId(shopInfoDO.getId());
|
||||
tempUserDetailDO.setRegionId(shopInfoDO.getRegionId());
|
||||
tempUserDetailDO.setMobile(staffBaseInfoDTO.getPhone());
|
||||
tempUserDetailDO.setUsername(staffBaseInfoDTO.getName());
|
||||
tempUserDetailDO.setSex(staffBaseInfoDTO.getSex());
|
||||
if(StringUtils.isNotBlank(staffBaseInfoDTO.getAge())){
|
||||
tempUserDetailDO.setAge(Integer.valueOf(staffBaseInfoDTO.getAge()));
|
||||
}
|
||||
tempUserDetailDO.setIdCard(staffBaseInfoDTO.getIdCard());
|
||||
tempUserDetailDO.setStatus(1);
|
||||
tempUserDetailDO.setEducational(fillEducational(staffBaseInfoDTO.getHighestDegree()));
|
||||
tempUserDetailDO.setRoleId(fillRoleId(staffBaseInfoDTO.getJobName()));
|
||||
tempUserDetailDO.setIdCardNegativeUrl(staffBaseInfoDTO.getEmblemPhoto());
|
||||
tempUserDetailDO.setIdCardPositiveUrl(staffBaseInfoDTO.getIdNumPhoto());
|
||||
tempUserDetailDO.setHealthCertificateUrl(staffBaseInfoDTO.getHealthCertificate());
|
||||
tempUserDetailDO.setRegisterTime(new Date());
|
||||
if(StringUtils.isNotBlank(staffBaseInfoDTO.getEntryDate())){
|
||||
tempUserDetailDO.setRegisterTime(DateUtils.parseDate(staffBaseInfoDTO.getEntryDate()));
|
||||
}
|
||||
tempUserDetailDO.setSubmitTime(new Date());
|
||||
tempUserDetailDO.setSource("sync");
|
||||
return tempUserDetailDO;
|
||||
}
|
||||
|
||||
// 学历 0-小学 1-初中 2-高中 3-中专 4-大专 5-本科 6-硕士 7-硕士以上
|
||||
private Integer fillEducational(String highestDegree) {
|
||||
if("小学".equals(highestDegree)){
|
||||
return 0;
|
||||
}else if("初中".equals(highestDegree)){
|
||||
return 1;
|
||||
}else if("高中".equals(highestDegree)){
|
||||
return 2;
|
||||
}else if("中专".equals(highestDegree)){
|
||||
return 3;
|
||||
}else if("大专".equals(highestDegree)){
|
||||
return 4;
|
||||
}else if("本科".equals(highestDegree)){
|
||||
return 5;
|
||||
}else if("硕士".equals(highestDegree)){
|
||||
return 6;
|
||||
}else if("硕士以上".equals(highestDegree)){
|
||||
return 7;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
private Long fillRoleId(String jobName) {
|
||||
if(UserRoleEnum.XFSG_CLERK.getDesc().equals(jobName)){
|
||||
return UserRoleEnum.XFSG_CLERK.getCode();
|
||||
}else if(UserRoleEnum.XFSG_SHOPOWNER.getDesc().equals(jobName)){
|
||||
return UserRoleEnum.XFSG_SHOPOWNER.getCode();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -30,6 +30,7 @@ import com.github.pagehelper.PageInfo;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.*;
|
||||
@@ -61,6 +62,7 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
EnterpriseUserMapper userMapper;
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean submitLicense(SubmitLicenseRequest request) {
|
||||
log.info("submitLicense request:{}", JSONObject.toJSONString(request));
|
||||
if (Objects.isNull(request)){
|
||||
@@ -143,6 +145,7 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
}
|
||||
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Boolean licenseExamine(Long shopId, Integer status,String result) {
|
||||
ShopAuditInfoDO shopAuditInfoDO = new ShopAuditInfoDO();
|
||||
shopAuditInfoDO.setShopId(shopId);
|
||||
@@ -153,14 +156,21 @@ public class ApplyLicenseServiceImpl implements ApplyLicenseService {
|
||||
shopAuditInfoDO.setSubmittedUserName(user.getName());
|
||||
shopAuditInfoDO.setDataType(1);
|
||||
shopAuditInfoDO.setResultType(status);
|
||||
LicenseTransactDO licenseTransactDO = new LicenseTransactDO();
|
||||
licenseTransactDO.setShopId(shopId);
|
||||
if (status == Constants.ZERO_INTEGER){
|
||||
shopAuditInfoDO.setPassReason(result);
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_43;
|
||||
licenseTransactDO.setSubmitStatus(3);
|
||||
applyLicenseMapper.updateByPrimaryKeySelective(licenseTransactDO);
|
||||
}else if (status == Constants.ONE_INTEGER){
|
||||
licenseTransactDO.setSubmitStatus(2);
|
||||
shopAuditInfoDO.setRejectReason(result);
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_42;
|
||||
}
|
||||
//插入操作/意见
|
||||
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
||||
//更新阶段状态
|
||||
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId,shopSubStageStatusEnum,null);
|
||||
return null;
|
||||
}
|
||||
|
||||
@@ -51,8 +51,14 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
||||
public Boolean submitLicense(FranchiseFeeRequest request) {
|
||||
log.info("submitLicense request:{}", JSONObject.toJSONString(request));
|
||||
FranchiseFeeDO franchiseFeeDO = request.toFranchiseFeeDO();
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(),ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_71);
|
||||
return franchiseFeeMapper.insertSelective(franchiseFeeDO) == 1 ? true:false;
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_71);
|
||||
if (request.getId() != null) {
|
||||
franchiseFeeDO.setId(request.getId());
|
||||
franchiseFeeMapper.updateByPrimaryKeySelective(franchiseFeeDO);
|
||||
} else {
|
||||
franchiseFeeMapper.insertSelective(franchiseFeeDO);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -62,12 +68,12 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
||||
FranchiseFeeDO result = franchiseFeeMapper.selectOne(franchiseFeeDO);
|
||||
FranchiseFeeResponse resp = FranchiseFeeResponse.from(result);
|
||||
LinePayDO linePayDO = linePayMapper.selectByPrimaryKey(result.getPayId());
|
||||
if (Objects.nonNull(linePayDO)){
|
||||
if (Objects.nonNull(linePayDO)) {
|
||||
FranchiseFeeResponse.LinePay linePayResult = FranchiseFeeResponse.LinePay.from(linePayDO);
|
||||
LineInfoDO lineInfoDO = lineInfoMapper.getByLineId(linePayDO.getLineId());
|
||||
linePayResult.setPartnerName(lineInfoDO.getUsername());
|
||||
linePayResult.setAmount(new BigInteger(result.getPerformanceBond()).add(new BigInteger(result.getFirstYearFee())).toString());
|
||||
if (Objects.nonNull(result.getAuditId())){
|
||||
if (Objects.nonNull(result.getAuditId())) {
|
||||
ShopAuditInfoDO shopAuditInfoDO = shopAuditInfoMapper.selectByPrimaryKey(result.getAuditId());
|
||||
linePayResult.setStatus(shopAuditInfoDO.getResultType());
|
||||
linePayResult.setResult(shopAuditInfoDO.getResultType() == 0 ? shopAuditInfoDO.getPassReason() : shopAuditInfoDO.getRejectReason());
|
||||
@@ -88,15 +94,15 @@ public class FranchiseFeeServiceImpl implements FranchiseFeeService {
|
||||
shopAuditInfoDO.setSubmittedUserName(user.getName());
|
||||
shopAuditInfoDO.setDataType(1);
|
||||
shopAuditInfoDO.setResultType(request.getStatus());
|
||||
if (request.getStatus() == Constants.ZERO_INTEGER){
|
||||
if (request.getStatus() == Constants.ZERO_INTEGER) {
|
||||
shopAuditInfoDO.setPassReason(request.getResult());
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_73;
|
||||
}else if (request.getStatus() == Constants.ONE_INTEGER){
|
||||
} else if (request.getStatus() == Constants.ONE_INTEGER) {
|
||||
shopAuditInfoDO.setRejectReason(request.getResult());
|
||||
shopSubStageStatusEnum = ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_74;
|
||||
}
|
||||
//更新阶段信息
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(),shopSubStageStatusEnum);
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), shopSubStageStatusEnum);
|
||||
//插入audit
|
||||
shopAuditInfoMapper.insertSelective(shopAuditInfoDO);
|
||||
//更新auditId
|
||||
|
||||
@@ -69,9 +69,9 @@ public class LinePayServiceImpl implements LinePayService {
|
||||
@Override
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
public Long submitPayInfo(LinePaySubmitRequest request, PartnerUserInfoVO partnerUser) {
|
||||
LineInfoDO lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||
if (Objects.isNull(lineInfo)) {
|
||||
throw new ServiceException(ErrorCodeEnum.LINE_ID_IS_NOT_EXIST);
|
||||
LineInfoDO lineInfo = new LineInfoDO();
|
||||
if (request.getLineId() != null){
|
||||
lineInfo = lineInfoDAO.getLineInfo(request.getLineId());
|
||||
}
|
||||
if (request.getPayBusinessType() != null
|
||||
&& request.getPayBusinessType() == Constants.ONE_INTEGER
|
||||
|
||||
@@ -47,7 +47,7 @@ public class OpenPreparationController {
|
||||
private OpeningOperationPlanService openingOperationPlanService;
|
||||
@Resource
|
||||
private AuditOpeningOperationPlanService auditOpeningOperationPlanService;
|
||||
|
||||
@ApiOperation("刷新")
|
||||
@GetMapping("/flush")
|
||||
public ResponseResult<Boolean> flush(@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(openingOperationPlanService.flush(shopId));
|
||||
|
||||
@@ -18,6 +18,7 @@ import com.cool.store.vo.DesignInfoVo;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
@@ -37,28 +38,29 @@ import java.util.List;
|
||||
public class PCDecorationController {
|
||||
@Resource
|
||||
private DecorationService decorationService;
|
||||
@ApiOperation("刷新")
|
||||
@GetMapping("/flush")
|
||||
public ResponseResult<Boolean> flush(@RequestParam("shopId") Long shopId) {
|
||||
return ResponseResult.success(decorationService.flush(shopId));
|
||||
}
|
||||
@ApiModelProperty("获取设计阶段信息")
|
||||
@ApiOperation("获取设计阶段信息")
|
||||
@GetMapping("/design")
|
||||
public ResponseResult<DesignInfoVo> get(@RequestParam Long shopId){
|
||||
return ResponseResult.success( decorationService.DesignInfo(shopId)) ;
|
||||
}
|
||||
|
||||
@ApiModelProperty("获取施工阶段信息")
|
||||
@ApiOperation("获取施工阶段信息")
|
||||
@GetMapping("/getConstruction")
|
||||
public ResponseResult<List<ConstructionScheduleDTO>> getConstruction(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getConstruction(shopId)) ;
|
||||
}
|
||||
@ApiModelProperty("获取装修款信息")
|
||||
@ApiOperation("获取装修款信息")
|
||||
@GetMapping("/getDecorationModelInfo")
|
||||
public ResponseResult<DecorationModelVO> getDecorationModelInfo(@RequestParam Long shopId){
|
||||
PartnerUserInfoVO user = null;
|
||||
return ResponseResult.success(decorationService.getDecorationModel(shopId,user));
|
||||
}
|
||||
@ApiModelProperty("查看三方验收")
|
||||
@ApiOperation("查看三方验收")
|
||||
@GetMapping("/getThreeAcceptance")
|
||||
public ResponseResult<ThreeAcceptanceResponse> getThreeAcceptance(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getThreeAcceptance(shopId));
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.context.PartnerUserHolder;
|
||||
import com.cool.store.dto.decoration.ConstructionScheduleDTO;
|
||||
import com.cool.store.dto.decoration.DecorationModelDTO;
|
||||
import com.cool.store.request.LinePaySubmitRequest;
|
||||
import com.cool.store.request.ThreeAcceptanceRequest;
|
||||
@@ -8,14 +9,17 @@ import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.response.ThreeAcceptanceResponse;
|
||||
import com.cool.store.service.DecorationService;
|
||||
import com.cool.store.vo.DecorationModelVO;
|
||||
import com.cool.store.vo.DesignInfoVo;
|
||||
import com.cool.store.vo.PartnerUserInfoVO;
|
||||
import com.sun.xml.bind.v2.TODO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Auther: WangShuo
|
||||
@@ -31,30 +35,40 @@ public class MiniDecorationController {
|
||||
@Resource
|
||||
private DecorationService decorationService;
|
||||
@PostMapping("/submitDecorationModel")
|
||||
@ApiOperation("提交装修款")
|
||||
public ResponseResult submitDecorationModel(@RequestBody LinePaySubmitRequest linePaySubmitRequest){
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
//TODO
|
||||
user.setPartnerId("61bf57dc65334885802a278835f499d0");
|
||||
return ResponseResult.success(decorationService.submitDecorationModel(linePaySubmitRequest, user));
|
||||
}
|
||||
@ApiModelProperty("获取装修款信息,和二维码")
|
||||
@ApiOperation("获取设计阶段信息")
|
||||
@GetMapping("/design")
|
||||
public ResponseResult<DesignInfoVo> get(@RequestParam Long shopId){
|
||||
return ResponseResult.success( decorationService.DesignInfo(shopId)) ;
|
||||
}
|
||||
@ApiOperation("获取施工阶段信息")
|
||||
@GetMapping("/getConstruction")
|
||||
public ResponseResult<List<ConstructionScheduleDTO>> getConstruction(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getConstruction(shopId)) ;
|
||||
}
|
||||
@ApiOperation("获取装修款信息,和二维码")
|
||||
@GetMapping("/getDecorationModel")
|
||||
public ResponseResult<DecorationModelDTO> getDecorationModel(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.DecorationModel(shopId)) ;
|
||||
}
|
||||
@ApiModelProperty("获取装修款信息")
|
||||
@ApiOperation("获取装修款信息")
|
||||
@GetMapping("/getDecorationModelInfo")
|
||||
public ResponseResult<DecorationModelVO> getDecorationModelInfo(@RequestParam Long shopId){
|
||||
PartnerUserInfoVO user = PartnerUserHolder.getUser();
|
||||
user.setPartnerId("61bf57dc65334885802a278835f499d0");
|
||||
return ResponseResult.success(decorationService.getDecorationModel(shopId,user));
|
||||
}
|
||||
@ApiModelProperty("提交三方验收")
|
||||
@ApiOperation("提交三方验收")
|
||||
@PostMapping("/submitThreeAcceptance")
|
||||
public ResponseResult<Integer> submitThreeAcceptance(@RequestParam ThreeAcceptanceRequest request){
|
||||
return ResponseResult.success(decorationService.submitAcceptance(request));
|
||||
}
|
||||
@ApiModelProperty("查看三方验收")
|
||||
@ApiOperation("查看三方验收")
|
||||
@GetMapping("/getThreeAcceptance")
|
||||
public ResponseResult<ThreeAcceptanceResponse> getThreeAcceptance(@RequestParam Long shopId){
|
||||
return ResponseResult.success(decorationService.getThreeAcceptance(shopId));
|
||||
|
||||
@@ -37,7 +37,7 @@ import javax.annotation.Resource;
|
||||
public class MiniOpenPreparationController {
|
||||
@Resource
|
||||
private OpeningOperationPlanService openingOperationPlanService;
|
||||
|
||||
|
||||
@Resource
|
||||
private FirstOrderService firstOrderService;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user