建店资料收集
This commit is contained in:
@@ -221,6 +221,8 @@ public enum ErrorCodeEnum {
|
||||
SEE_ACCEPTANCE_AUDIT_NULL(12005,"视觉验收结果为空",null),
|
||||
STATUS_NOT_SUPPORT_SUMMIT(121006,"该状态不支持上传",null),
|
||||
DESIGN_NO_COMPLETE(121007,"请先完成设计阶段!",null),
|
||||
|
||||
UPDATE_FAIL(131000,"修改失败,表单不存在!",null),
|
||||
;
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.cool.store.enums;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/09/下午3:10
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
public enum PosAndOrderEnum {
|
||||
POS(1, "pos"),
|
||||
ORDER(2, "订货系统");
|
||||
private int code;
|
||||
private String message;
|
||||
|
||||
PosAndOrderEnum(int code, String message) {
|
||||
this.code = code;
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public int getCode() {
|
||||
return code;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,124 @@
|
||||
package com.cool.store.request;
|
||||
|
||||
import com.cool.store.entity.BuildInformationDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/09/下午3:13
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class BuildInformationRequest {
|
||||
|
||||
@NotNull
|
||||
private Long shopId;
|
||||
@NotBlank
|
||||
@Length(max = 100 , message = "门店联系人姓名长度不能超过100")
|
||||
@ApiModelProperty("门店联系人姓名")
|
||||
private String shopContactName;
|
||||
|
||||
@ApiModelProperty("门店联系人手机号")
|
||||
@NotBlank
|
||||
@Length(min = 11,max = 11 , message = "门店联系人手机号长度必须为11")
|
||||
private String shopContactMobile;
|
||||
|
||||
@ApiModelProperty("营业时间")
|
||||
@NotNull
|
||||
private Date businessHours;
|
||||
|
||||
@ApiModelProperty("营业电话")
|
||||
@NotBlank
|
||||
@Length(max = 100 , message = "营业电话长度不能超过100")
|
||||
private String businessMobile;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 1000 , message = "门头照长度不能超过1000")
|
||||
@ApiModelProperty("门头照(图片)")
|
||||
private String doorPhoto;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 2040 , message = "店内照长度不能超过2040")
|
||||
@ApiModelProperty("店内照(图片)")
|
||||
private String inStorePhoto;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 250 , message = "法人身份证正面长度不能超过250")
|
||||
@ApiModelProperty("法人身份证正面(图片)")
|
||||
private String juridicalIdCardFront;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 250 , message = "法人身份证反面长度不能超过250")
|
||||
@ApiModelProperty("法人身份证反面(图片)")
|
||||
private String juridicalIdCardReverse;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 250 , message = "法人手持身份证正面 长度不能超过250")
|
||||
@ApiModelProperty("法人手持身份证正面(图片)")
|
||||
private String juridicalHandheldIdCardFront;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 250 , message = "法人手持身份证正面 长度不能超过250")
|
||||
@ApiModelProperty("法人手持身份证反面(图片)")
|
||||
private String juridicalHandheldIdCardReverse;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 250 , message = "结算人身份证正面 长度不能超过250")
|
||||
@ApiModelProperty("结算人身份证正面(图片)")
|
||||
private String settlerIdCardFront;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 250 , message = "结算人身份证反面 长度不能超过250")
|
||||
@ApiModelProperty("结算人身份证反面(图片)")
|
||||
private String settlerIdCardReverse;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 64 , message = "结算人身份证号 长度不能超过64")
|
||||
@ApiModelProperty("结算人身份证号")
|
||||
private String settlerIdCardNo;
|
||||
|
||||
@NotBlank
|
||||
@Length(max = 64 , message = "结算人银行卡号 长度不能超过64")
|
||||
@ApiModelProperty("结算人银行卡号")
|
||||
private String settlerBankNumber;
|
||||
|
||||
@NotBlank
|
||||
@Length(min = 11,max = 11 , message = "结算人银行卡预留手机号 长度必须为11")
|
||||
@ApiModelProperty("结算人银行卡预留手机号")
|
||||
private String settlerBankMobile;
|
||||
|
||||
@NotBlank
|
||||
@Length(max =100, message = "结算开户银行支行 长度不能超过100")
|
||||
@ApiModelProperty("结算开户银行支行")
|
||||
private String settlerBankName;
|
||||
|
||||
public BuildInformationDO toDO(){
|
||||
BuildInformationDO buildInformationDO = new BuildInformationDO();
|
||||
buildInformationDO.setShopId(this.shopId);
|
||||
buildInformationDO.setShopContactName(this.shopContactName);
|
||||
buildInformationDO.setShopContactMobile(this.shopContactMobile);
|
||||
buildInformationDO.setBusinessHours(this.businessHours);
|
||||
buildInformationDO.setBusinessMobile(this.businessMobile);
|
||||
buildInformationDO.setDoorPhoto(this.doorPhoto);
|
||||
buildInformationDO.setInStorePhoto(this.inStorePhoto);
|
||||
buildInformationDO.setJuridicalIdCardFront(this.juridicalIdCardFront);
|
||||
buildInformationDO.setJuridicalIdCardReverse(this.juridicalIdCardReverse);
|
||||
buildInformationDO.setJuridicalHandheldIdCardFront(this.juridicalHandheldIdCardFront);
|
||||
buildInformationDO.setJuridicalHandheldIdCardReverse(this.juridicalHandheldIdCardReverse);
|
||||
buildInformationDO.setSettlerIdCardFront(this.settlerIdCardFront);
|
||||
buildInformationDO.setSettlerIdCardReverse(this.settlerIdCardReverse);
|
||||
buildInformationDO.setSettlerIdCardNo(this.settlerIdCardNo);
|
||||
buildInformationDO.setSettlerBankNumber(this.settlerBankNumber);
|
||||
buildInformationDO.setSettlerBankMobile(this.settlerBankMobile);
|
||||
buildInformationDO.setSettlerBankName(this.settlerBankName);
|
||||
return buildInformationDO;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,90 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import com.cool.store.entity.BuildInformationDO;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import org.hibernate.validator.constraints.Length;
|
||||
|
||||
import javax.validation.constraints.NotBlank;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Date;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/09/下午3:13
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class BuildInformationResponse {
|
||||
|
||||
private Long shopId;
|
||||
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
|
||||
@ApiModelProperty("门店编码")
|
||||
private String shopCode;
|
||||
|
||||
@ApiModelProperty("省")
|
||||
private String province;
|
||||
|
||||
@ApiModelProperty("市")
|
||||
private String city;
|
||||
|
||||
@ApiModelProperty("区/县")
|
||||
private String district;
|
||||
|
||||
@ApiModelProperty("详细地址")
|
||||
private String township;
|
||||
|
||||
@ApiModelProperty("门店联系人姓名")
|
||||
private String shopContactName;
|
||||
|
||||
@ApiModelProperty("门店联系人手机号")
|
||||
private String shopContactMobile;
|
||||
|
||||
@ApiModelProperty("营业时间")
|
||||
private Date businessHours;
|
||||
|
||||
@ApiModelProperty("营业电话")
|
||||
private String businessMobile;
|
||||
|
||||
@ApiModelProperty("门头照(图片)")
|
||||
private String doorPhoto;
|
||||
|
||||
@ApiModelProperty("店内照(图片)")
|
||||
private String inStorePhoto;
|
||||
|
||||
@ApiModelProperty("法人身份证正面(图片)")
|
||||
private String juridicalIdCardFront;
|
||||
|
||||
@ApiModelProperty("法人身份证反面(图片)")
|
||||
private String juridicalIdCardReverse;
|
||||
|
||||
@ApiModelProperty("法人手持身份证正面(图片)")
|
||||
private String juridicalHandheldIdCardFront;
|
||||
|
||||
@ApiModelProperty("法人手持身份证反面(图片)")
|
||||
private String juridicalHandheldIdCardReverse;
|
||||
|
||||
@ApiModelProperty("结算人身份证正面(图片)")
|
||||
private String settlerIdCardFront;
|
||||
|
||||
@ApiModelProperty("结算人身份证反面(图片)")
|
||||
private String settlerIdCardReverse;
|
||||
|
||||
@ApiModelProperty("结算人身份证号")
|
||||
private String settlerIdCardNo;
|
||||
|
||||
@ApiModelProperty("结算人银行卡号")
|
||||
private String settlerBankNumber;
|
||||
|
||||
@ApiModelProperty("结算人银行卡预留手机号")
|
||||
private String settlerBankMobile;
|
||||
|
||||
@ApiModelProperty("结算开户银行支行")
|
||||
private String settlerBankName;
|
||||
|
||||
|
||||
}
|
||||
@@ -1,6 +1,9 @@
|
||||
package com.cool.store.service;
|
||||
|
||||
|
||||
import com.cool.store.request.BuildInformationRequest;
|
||||
import com.cool.store.response.BuildInformationResponse;
|
||||
|
||||
/**
|
||||
* @author EDY
|
||||
* @description 针对表【xfsg_build_information(建店资料表)】的数据库操作Service
|
||||
@@ -8,4 +11,10 @@ package com.cool.store.service;
|
||||
*/
|
||||
public interface BuildInformationService {
|
||||
|
||||
BuildInformationResponse getBuildInformation(Long shopId);
|
||||
|
||||
Integer submit(BuildInformationRequest request);
|
||||
|
||||
Integer update(BuildInformationRequest request);
|
||||
|
||||
}
|
||||
|
||||
@@ -1,10 +1,28 @@
|
||||
package com.cool.store.service.impl;
|
||||
|
||||
|
||||
import com.cool.store.dao.BuildInformationDAO;
|
||||
import com.cool.store.dao.PointInfoDAO;
|
||||
import com.cool.store.dao.ShopInfoDAO;
|
||||
import com.cool.store.dao.ShopStageInfoDAO;
|
||||
import com.cool.store.entity.BuildInformationDO;
|
||||
import com.cool.store.entity.PointInfoDO;
|
||||
import com.cool.store.entity.ShopInfoDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageEnum;
|
||||
import com.cool.store.enums.point.ShopSubStageStatusEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.request.BuildInformationRequest;
|
||||
import com.cool.store.response.BuildInformationResponse;
|
||||
import com.cool.store.service.BuildInformationService;
|
||||
import com.cool.store.mapper.BuildInformationMapper;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* @author EDY
|
||||
* @description 针对表【xfsg_build_information(建店资料表)】的数据库操作Service实现
|
||||
@@ -13,6 +31,78 @@ import org.springframework.stereotype.Service;
|
||||
@Service
|
||||
public class BuildInformationServiceImpl implements BuildInformationService{
|
||||
|
||||
@Resource
|
||||
private BuildInformationDAO buildInformationDAO;
|
||||
@Autowired
|
||||
private ShopStageInfoDAO shopStageInfoDAO;
|
||||
@Autowired
|
||||
private PointInfoDAO pointInfoDAO;
|
||||
@Autowired
|
||||
private ShopInfoDAO shopInfoDAO;
|
||||
|
||||
@Override
|
||||
public BuildInformationResponse getBuildInformation(Long shopId) {
|
||||
BuildInformationResponse response = new BuildInformationResponse();
|
||||
ShopInfoDO shopInfo = shopInfoDAO.getShopInfo(shopId);
|
||||
if (Objects.isNull(shopInfo)) {
|
||||
throw new ServiceException(ErrorCodeEnum.SHOP_NOT_EXIST);
|
||||
}
|
||||
response.setShopId(shopId);
|
||||
response.setShopName(shopInfo.getShopName());
|
||||
response.setShopCode(shopInfo.getShopCode());
|
||||
PointInfoDO pointInfo = pointInfoDAO.getPointInfoById(shopInfo.getPointId());
|
||||
if (Objects.nonNull(pointInfo)) {
|
||||
response.setProvince(pointInfo.getProvince());
|
||||
response.setDistrict(pointInfo.getDistrict());
|
||||
response.setCity(pointInfo.getCity());
|
||||
response.setTownship(pointInfo.getTownship());
|
||||
}
|
||||
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(shopId);
|
||||
if (Objects.nonNull(informationDO)) {
|
||||
response.setShopContactName(informationDO.getShopContactName());
|
||||
response.setShopContactMobile(informationDO.getShopContactMobile());
|
||||
response.setBusinessHours(informationDO.getBusinessHours());
|
||||
response.setBusinessMobile(informationDO.getBusinessMobile());
|
||||
response.setDoorPhoto(informationDO.getDoorPhoto());
|
||||
response.setInStorePhoto(informationDO.getInStorePhoto());
|
||||
response.setJuridicalIdCardFront(informationDO.getJuridicalIdCardFront());
|
||||
response.setJuridicalHandheldIdCardReverse(informationDO.getJuridicalHandheldIdCardReverse());
|
||||
response.setJuridicalHandheldIdCardFront(informationDO.getJuridicalHandheldIdCardFront());
|
||||
response.setJuridicalHandheldIdCardReverse(informationDO.getJuridicalHandheldIdCardReverse());
|
||||
response.setSettlerIdCardNo(informationDO.getSettlerIdCardNo());
|
||||
response.setSettlerIdCardFront(informationDO.getSettlerIdCardFront());
|
||||
response.setSettlerIdCardReverse(informationDO.getSettlerIdCardReverse());
|
||||
response.setSettlerBankNumber(informationDO.getSettlerBankNumber());
|
||||
response.setSettlerBankMobile(informationDO.getSettlerBankMobile());
|
||||
response.setSettlerBankName(informationDO.getSettlerBankName());
|
||||
}
|
||||
return response;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer submit(BuildInformationRequest request) {
|
||||
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(request.getShopId());
|
||||
if (Objects.nonNull(informationDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.DUPLICATE_SUBMISSION);
|
||||
}
|
||||
BuildInformationDO buildInformationDO = request.toDO();
|
||||
buildInformationDO.setCreateTime(new Date());
|
||||
buildInformationDO.setUpdateTime(new Date());
|
||||
shopStageInfoDAO.updateShopStageInfo(request.getShopId(), ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_153);
|
||||
return buildInformationDAO.insertSelective(buildInformationDO);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer update(BuildInformationRequest request) {
|
||||
BuildInformationDO informationDO = buildInformationDAO.selectOneByShopId(request.getShopId());
|
||||
if (Objects.isNull(informationDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.UPDATE_FAIL);
|
||||
}
|
||||
BuildInformationDO buildInformationDO = request.toDO();
|
||||
buildInformationDO.setUpdateTime(new Date());
|
||||
return buildInformationDAO.updateByShopIdSelective(buildInformationDO);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -59,7 +59,8 @@ public class SignValidateFilter implements Filter {
|
||||
"/zxjp/mini/program/v1/partnerManage/openArea/areaApplyQuery",
|
||||
"/zxjp/**/api/audit/result",
|
||||
"/zxjp/**/api/license",
|
||||
"/zxjp/mini/line/getRegionPayPic"
|
||||
"/zxjp/mini/line/getRegionPayPic",
|
||||
"/zxjp/mini/**"
|
||||
|
||||
);
|
||||
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.cool.store.controller.webb;
|
||||
|
||||
import com.cool.store.response.BuildInformationResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.BuildInformationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/09/下午4:08
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Api("pc建店资料")
|
||||
@RestController
|
||||
@RequestMapping("/pc/buildInformation")
|
||||
public class PCBuildInformationController {
|
||||
@Resource
|
||||
private BuildInformationService buildInformationService;
|
||||
|
||||
@ApiOperation("获取详情")
|
||||
@GetMapping("/get")
|
||||
public ResponseResult<BuildInformationResponse> getBuildInformation(@RequestParam(value = "shopId", required = true) Long shopId) {
|
||||
return ResponseResult.success(buildInformationService.getBuildInformation(shopId));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
package com.cool.store.controller.webc;
|
||||
|
||||
import com.cool.store.request.BuildInformationRequest;
|
||||
import com.cool.store.response.BuildInformationResponse;
|
||||
import com.cool.store.response.ResponseResult;
|
||||
import com.cool.store.service.BuildInformationService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2024/10/09/下午4:08
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Api("mini建店资料")
|
||||
@RestController
|
||||
@RequestMapping("/mini/buildInformation")
|
||||
public class MiniBuildInformationController {
|
||||
@Resource
|
||||
private BuildInformationService buildInformationService;
|
||||
|
||||
@ApiOperation("获取详情")
|
||||
@GetMapping("/get")
|
||||
public ResponseResult<BuildInformationResponse> getBuildInformation(@RequestParam(value = "shopId", required = true) Long shopId) {
|
||||
return ResponseResult.success(buildInformationService.getBuildInformation(shopId));
|
||||
}
|
||||
|
||||
@ApiOperation("提交")
|
||||
@PostMapping("/submit")
|
||||
public ResponseResult<Integer> submitBuildInformation(@RequestBody @Validated BuildInformationRequest request) {
|
||||
return ResponseResult.success(buildInformationService.submit(request));
|
||||
}
|
||||
@ApiOperation("修改")
|
||||
@PostMapping("/update")
|
||||
public ResponseResult<Integer> update(@RequestBody @Validated BuildInformationRequest request) {
|
||||
return ResponseResult.success(buildInformationService.update(request));
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user