支付新增shopId
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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">
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
@@ -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());
|
||||
|
||||
Reference in New Issue
Block a user