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

This commit is contained in:
zhangchenbiao
2024-05-07 14:36:31 +08:00
10 changed files with 41 additions and 46 deletions

View File

@@ -184,6 +184,7 @@ public enum ErrorCodeEnum {
UPDATE_SHOP_SUB_STAGE_STATUS_FALSE(103009,"修改开业运营方案阶段状态失败",null),
SHOP_ID_NOT_EXIST(103010,"shopId不存在",null),
FIRST_ORDER_PARAM_NULL(103020,"首批订货金参数为空",null),
USER_NOT_LOGIN(103021,"用户未登录",null),
XFSG_SERVICE_ERROR(103099,"鲜丰服务调用失败",null),
GET_FIRST_ORDER(103021,"获取鲜丰首批订货金失败",null),

View File

@@ -27,8 +27,19 @@ public class LinePayDAO {
return linePayDO;
}
public LinePayDO getByLineIdAndPayTypeAndShopId(Long lineId,Integer payBusinessType,Long shopId) {
LinePayDO linePayDO = linePayMapper.getByLineIdAndPayTypeAndShopId(lineId,payBusinessType,shopId);
return linePayDO;
}
/**
* //todo 全部替换掉后弃用
* @param lineId
* @param payBusinessType
* @return
*/
public LinePayDO getLinePayByLineIdAndPayType(Long lineId,Integer payBusinessType) {
LinePayDO linePayDO = linePayMapper.getLinePayByLineIdAndPayType(lineId,payBusinessType);
LinePayDO linePayDO = linePayMapper.getByLineIdAndPayTypeAndShopId(lineId,payBusinessType,null);
return linePayDO;
}

View File

@@ -40,8 +40,10 @@ public interface LinePayMapper {
int deleteByPrimaryKey(Long id);
LinePayDO getLinePayByLineId(@Param("lineId") Long lineId);
LinePayDO getLinePayByLineIdAndPayType(@Param("lineId") Long lineId,
@Param("payBusinessType")Integer payBusinessType);
LinePayDO getByLineIdAndPayTypeAndShopId(@Param("lineId") Long lineId,
@Param("payBusinessType")Integer payBusinessType,
@Param("shopId") Long shopId);
/**
* getLinePayByLineIds

View File

@@ -4,6 +4,7 @@
<resultMap id="BaseResultMap" type="com.cool.store.entity.LinePayDO">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="partner_id" jdbcType="VARCHAR" property="partnerId"/>
<result column="shop_id" jdbcType="BIGINT" property="shopId"/>
<result column="line_id" jdbcType="BIGINT" property="lineId"/>
<result column="pay_status" jdbcType="TINYINT" property="payStatus"/>
<result column="pay_type" jdbcType="TINYINT" property="payType"/>
@@ -24,8 +25,7 @@
<result column="pay_business_type" jdbcType="TINYINT" property="payBusinessType"/>
</resultMap>
<sql id="Base_Column_List">
id
, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
id,shop_id, partner_id, line_id, pay_status, pay_type, pay_user_name, pay_account, bank_code,
bank_name, branch_bank_code, branch_bank_name, pay_time, pay_pic, promise_pic, create_time,
update_time, create_user_id, update_user_id, deleted,pay_business_type
</sql>
@@ -299,12 +299,17 @@
and deleted = '0' limit 1
</select>
<select id="getLinePayByLineIdAndPayType" resultMap="BaseResultMap">
<select id="getByLineIdAndPayTypeAndShopId" resultMap="BaseResultMap">
select *
from xfsg_line_pay
where line_id = #{lineId}
and deleted = '0'
and pay_business_type = #{payBusinessType}
<where>
line_id = #{lineId}
and deleted = '0'
and pay_business_type = #{payBusinessType}
<if test="shop_id != null and shopId != ''">
and shop_id = #{shopId}
</if>
</where>
</select>
<select id="getLinePayByLineIds" resultMap="BaseResultMap">

View File

@@ -21,6 +21,9 @@ public class LinePayDO implements Serializable {
@ApiModelProperty("")
private Long id;
@ApiModelProperty("shopId")
private Long shopId;
@ApiModelProperty("xfsg_user_info.partner_id")
private String partnerId;

View File

@@ -16,5 +16,5 @@ public interface FirstOrderService {
Integer saveOrder(FirstOrderRequest request, LoginUserInfo user);
FirstOrderDTO getOrder(Long shopId);
FirstOrderDTO flush(Long shopId);
}

View File

@@ -627,7 +627,6 @@ public class DecorationServiceImpl implements DecorationService {
@Override
public ThreeSignResponse getThreeAcceptanceSign(Long shopId) {
ThreeSignResponse threeSignResponse = new ThreeSignResponse();
AcceptanceInfoDO acceptanceInfoDO = acceptanceInfoDAO.selectByShopId(shopId);
if (Objects.isNull(acceptanceInfoDO)) {

View File

@@ -79,11 +79,9 @@ public class FirstOrderServiceImp implements FirstOrderService {
//云立方同步
if (num > 0) {
try {
// ShopInfoDO shopInfo = shopService.getShopInfo(order.getShopId());
// String shopCode = shopInfo.getShopInfopCode();
// String shopCode = "31310383";
// Boolean flag = coolStoreStartFlowService.getFirstOrder(shopCode);
Boolean flag = Boolean.TRUE;
ShopInfoDO shopInfo = shopService.getShopInfo(order.getShopId());
String storeNum = shopInfo.getStoreNum();
Boolean flag = coolStoreStartFlowService.getFirstOrder(storeNum);
log.info("saveOrder,flag:{}", flag);
if (flag == null) {
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
@@ -105,7 +103,7 @@ public class FirstOrderServiceImp implements FirstOrderService {
public FirstOrderDTO getOrder(Long shopId) {
log.info("getOrder shopId:{},", shopId);
if (shopId == null) {
log.error("shopId/shopCode is null");
log.error("shopId is null");
throw new ServiceException(ErrorCodeEnum.FIRST_ORDER_PARAM_NULL);
}
FirstOrderDTO order = firstOrderDAO.selectFirstOrderByShopId(shopId);
@@ -114,31 +112,4 @@ public class FirstOrderServiceImp implements FirstOrderService {
order.setFirstOrderSubStage(firstOrderStageInfo.getShopSubStageStatus());
return order;
}
@Override
public FirstOrderDTO flush(Long shopId) {
ShopStageInfoDO orderStageInfo = shopStageInfoDAO.getShopSubStageInfo(shopId, ShopSubStageEnum.SHOP_STAGE_15);
try {
if (!orderStageInfo.getShopSubStageStatus().
equals(ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151.getShopSubStageStatus())) {
ShopInfoDO shopInfo = shopService.getShopInfo(shopId);
String shopCode = shopInfo.getShopCode();
Boolean flag = coolStoreStartFlowService.getFirstOrder(shopCode);
log.info("saveOrder,flag:{}", flag);
if (flag == null) {
throw new ServiceException(ErrorCodeEnum.GET_FIRST_ORDER);
}
if (flag) {
//更改子阶段状态
shopStageInfoDAO.updateShopStageAndAuditInfo(shopId,
ShopSubStageStatusEnum.SHOP_SUB_STAGE_STATUS_151, null);
preparationService.whetherToOpenForAcceptance(shopId);
}
}
} catch (Exception e) {
log.error("获取鲜丰订货金异常", e);
}
FirstOrderDTO order = getOrder(shopId);
return order;
}
}

View File

@@ -76,7 +76,7 @@ public class LinePayServiceImpl implements LinePayService {
if (request.getPayBusinessType() != null
&& request.getPayBusinessType() == Constants.ONE_INTEGER
&& request.getShopId() != null) {
LinePayDO linePayDO = linePayDAO.getLinePayByLineIdAndPayType(request.getLineId(), request.getPayBusinessType());
LinePayDO linePayDO = linePayDAO.getByLineIdAndPayTypeAndShopId(request.getLineId(), request.getPayBusinessType(),request.getShopId());
if (Objects.isNull(linePayDO)) {
fillLinePay(true, linePayDO, request, partnerUser);
Long aLong = linePayDAO.addLinePay(linePayDO);
@@ -136,6 +136,9 @@ public class LinePayServiceImpl implements LinePayService {
linePayDO.setPromisePic(request.getPromisePic());
linePayDO.setPayStatus(WorkflowSubStageStatusEnum.PAY_DEPOSIT_50.getCode());
linePayDO.setPayBusinessType(request.getPayBusinessType());
if (Objects.nonNull(request.getShopId())){
linePayDO.setShopId(request.getShopId());
}
if (isAdd) {
linePayDO.setPartnerId(partnerUser.getPartnerId());
linePayDO.setLineId(request.getLineId());

View File

@@ -39,7 +39,7 @@ import java.util.List;
@RequestMapping("/pc/openPreparation")
@Api(tags = "pc开业筹备")
@Slf4j
public class OpenPreparationController {
public class PCOpenPreparationController {
@Resource
private FirstOrderService firstOrderService;