Commit 6a8eded9 authored by shiyu's avatar shiyu

领取奖励

parent 979beb12
...@@ -61,7 +61,7 @@ public class DistributionEnum { ...@@ -61,7 +61,7 @@ public class DistributionEnum {
BLACK(8, "盲盒"), BLACK(8, "盲盒"),
BLACK_COLLECTION(10, "盲袋集合,一个商品对应有多个sku"), BLACK_COLLECTION(10, "盲袋集合,一个商品对应有多个sku"),
GIFT(11, "赠品订单"), GIFT(11, "赠品订单"),
QIANDAO_GIFT(11, "赠品订单"), QIANDAO_GIFT(12, "赠品订单"),
; ;
private int code; private int code;
......
...@@ -10,7 +10,7 @@ import lombok.Data; ...@@ -10,7 +10,7 @@ import lombok.Data;
/** /**
* @author shiyu * @author shiyu
* @date 2024/12/23 * @date 2025/01/15
*/ */
@Data @Data
public class SignInTask implements Entity { public class SignInTask implements Entity {
...@@ -91,6 +91,11 @@ public class SignInTask implements Entity { ...@@ -91,6 +91,11 @@ public class SignInTask implements Entity {
*/ */
private Boolean hasReward; private Boolean hasReward;
/**
* 奖励物品id
*/
private Long rewardItemId;
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
@Override @Override
...@@ -115,6 +120,7 @@ public class SignInTask implements Entity { ...@@ -115,6 +120,7 @@ public class SignInTask implements Entity {
sb.append(", updateTime=").append(updateTime); sb.append(", updateTime=").append(updateTime);
sb.append(", isPrivate=").append(isPrivate); sb.append(", isPrivate=").append(isPrivate);
sb.append(", hasReward=").append(hasReward); sb.append(", hasReward=").append(hasReward);
sb.append(", rewardItemId=").append(rewardItemId);
sb.append(", serialVersionUID=").append(serialVersionUID); sb.append(", serialVersionUID=").append(serialVersionUID);
sb.append("]"); sb.append("]");
return sb.toString(); return sb.toString();
...@@ -147,7 +153,8 @@ public class SignInTask implements Entity { ...@@ -147,7 +153,8 @@ public class SignInTask implements Entity {
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime())) && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime())) && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
&& (this.getIsPrivate() == null ? other.getIsPrivate() == null : this.getIsPrivate().equals(other.getIsPrivate())) && (this.getIsPrivate() == null ? other.getIsPrivate() == null : this.getIsPrivate().equals(other.getIsPrivate()))
&& (this.getHasReward() == null ? other.getHasReward() == null : this.getHasReward().equals(other.getHasReward())); && (this.getHasReward() == null ? other.getHasReward() == null : this.getHasReward().equals(other.getHasReward()))
&& (this.getRewardItemId() == null ? other.getRewardItemId() == null : this.getRewardItemId().equals(other.getRewardItemId()));
} }
@Override @Override
...@@ -170,6 +177,7 @@ public class SignInTask implements Entity { ...@@ -170,6 +177,7 @@ public class SignInTask implements Entity {
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode()); result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
result = prime * result + ((getIsPrivate() == null) ? 0 : getIsPrivate().hashCode()); result = prime * result + ((getIsPrivate() == null) ? 0 : getIsPrivate().hashCode());
result = prime * result + ((getHasReward() == null) ? 0 : getHasReward().hashCode()); result = prime * result + ((getHasReward() == null) ? 0 : getHasReward().hashCode());
result = prime * result + ((getRewardItemId() == null) ? 0 : getRewardItemId().hashCode());
return result; return result;
} }
...@@ -196,7 +204,8 @@ public class SignInTask implements Entity { ...@@ -196,7 +204,8 @@ public class SignInTask implements Entity {
createTime("create_time", "createTime", "TIMESTAMP", false), createTime("create_time", "createTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false), updateTime("update_time", "updateTime", "TIMESTAMP", false),
isPrivate("is_private", "isPrivate", "BIT", false), isPrivate("is_private", "isPrivate", "BIT", false),
hasReward("has_reward", "hasReward", "BIT", false); hasReward("has_reward", "hasReward", "BIT", false),
rewardItemId("reward_item_id", "rewardItemId", "BIGINT", false);
/** /**
* This field was generated by MyBatis Generator. * This field was generated by MyBatis Generator.
......
...@@ -2289,6 +2289,138 @@ public class SignInTaskExample { ...@@ -2289,6 +2289,138 @@ public class SignInTaskExample {
addCriterion("has_reward not between", value1, value2, "hasReward"); addCriterion("has_reward not between", value1, value2, "hasReward");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andRewardItemIdIsNull() {
addCriterion("reward_item_id is null");
return (Criteria) this;
}
public Criteria andRewardItemIdIsNotNull() {
addCriterion("reward_item_id is not null");
return (Criteria) this;
}
public Criteria andRewardItemIdEqualTo(Long value) {
addCriterion("reward_item_id =", value, "rewardItemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_task
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRewardItemIdEqualToColumn(SignInTask.Column column) {
addCriterion(new StringBuilder("reward_item_id = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andRewardItemIdNotEqualTo(Long value) {
addCriterion("reward_item_id <>", value, "rewardItemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_task
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRewardItemIdNotEqualToColumn(SignInTask.Column column) {
addCriterion(new StringBuilder("reward_item_id <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andRewardItemIdGreaterThan(Long value) {
addCriterion("reward_item_id >", value, "rewardItemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_task
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRewardItemIdGreaterThanColumn(SignInTask.Column column) {
addCriterion(new StringBuilder("reward_item_id > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andRewardItemIdGreaterThanOrEqualTo(Long value) {
addCriterion("reward_item_id >=", value, "rewardItemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_task
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRewardItemIdGreaterThanOrEqualToColumn(SignInTask.Column column) {
addCriterion(new StringBuilder("reward_item_id >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andRewardItemIdLessThan(Long value) {
addCriterion("reward_item_id <", value, "rewardItemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_task
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRewardItemIdLessThanColumn(SignInTask.Column column) {
addCriterion(new StringBuilder("reward_item_id < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andRewardItemIdLessThanOrEqualTo(Long value) {
addCriterion("reward_item_id <=", value, "rewardItemId");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table sign_in_task
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andRewardItemIdLessThanOrEqualToColumn(SignInTask.Column column) {
addCriterion(new StringBuilder("reward_item_id <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andRewardItemIdIn(List<Long> values) {
addCriterion("reward_item_id in", values, "rewardItemId");
return (Criteria) this;
}
public Criteria andRewardItemIdNotIn(List<Long> values) {
addCriterion("reward_item_id not in", values, "rewardItemId");
return (Criteria) this;
}
public Criteria andRewardItemIdBetween(Long value1, Long value2) {
addCriterion("reward_item_id between", value1, value2, "rewardItemId");
return (Criteria) this;
}
public Criteria andRewardItemIdNotBetween(Long value1, Long value2) {
addCriterion("reward_item_id not between", value1, value2, "rewardItemId");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
......
...@@ -91,4 +91,9 @@ public class SignInTaskRequestDto extends BaseRequestDto implements Entity { ...@@ -91,4 +91,9 @@ public class SignInTaskRequestDto extends BaseRequestDto implements Entity {
* 是否私有 * 是否私有
*/ */
private Boolean isPrivate; private Boolean isPrivate;
/**
* 奖励物品id
*/
private Long rewardItemId;
} }
...@@ -7,7 +7,6 @@ import java.util.List; ...@@ -7,7 +7,6 @@ import java.util.List;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
@Mapper @Mapper
public interface SignInTaskMapper { public interface SignInTaskMapper {
long countByExample(SignInTaskExample example); long countByExample(SignInTaskExample example);
......
...@@ -18,6 +18,7 @@ ...@@ -18,6 +18,7 @@
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
<result column="is_private" jdbcType="BIT" property="isPrivate" /> <result column="is_private" jdbcType="BIT" property="isPrivate" />
<result column="has_reward" jdbcType="BIT" property="hasReward" /> <result column="has_reward" jdbcType="BIT" property="hasReward" />
<result column="reward_item_id" jdbcType="BIGINT" property="rewardItemId" />
</resultMap> </resultMap>
<sql id="Example_Where_Clause"> <sql id="Example_Where_Clause">
<where> <where>
...@@ -80,7 +81,7 @@ ...@@ -80,7 +81,7 @@
<sql id="Base_Column_List"> <sql id="Base_Column_List">
id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time, id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time,
goal_days, `type`, `state`, `desc`, creator_id, create_time, update_time, is_private, goal_days, `type`, `state`, `desc`, creator_id, create_time, update_time, is_private,
has_reward has_reward, reward_item_id
</sql> </sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.qiandao.SignInTaskExample" resultMap="BaseResultMap"> <select id="selectByExample" parameterType="com.wwdz.ch.db.domain.qiandao.SignInTaskExample" resultMap="BaseResultMap">
select select
...@@ -117,7 +118,7 @@ ...@@ -117,7 +118,7 @@
<otherwise> <otherwise>
id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time, id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time,
goal_days, `type`, `state`, `desc`, creator_id, create_time, update_time, is_private, goal_days, `type`, `state`, `desc`, creator_id, create_time, update_time, is_private,
has_reward has_reward, reward_item_id
</otherwise> </otherwise>
</choose> </choose>
from sign_in_task from sign_in_task
...@@ -150,7 +151,7 @@ ...@@ -150,7 +151,7 @@
<otherwise> <otherwise>
id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time, id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time,
goal_days, `type`, `state`, `desc`, creator_id, create_time, update_time, is_private, goal_days, `type`, `state`, `desc`, creator_id, create_time, update_time, is_private,
has_reward has_reward, reward_item_id
</otherwise> </otherwise>
</choose> </choose>
from sign_in_task from sign_in_task
...@@ -174,14 +175,14 @@ ...@@ -174,14 +175,14 @@
end_valid_time, sign_in_start_time, sign_in_end_time, end_valid_time, sign_in_start_time, sign_in_end_time,
goal_days, `type`, `state`, goal_days, `type`, `state`,
`desc`, creator_id, create_time, `desc`, creator_id, create_time,
update_time, is_private, has_reward update_time, is_private, has_reward,
) reward_item_id)
values (#{name,jdbcType=VARCHAR}, #{image,jdbcType=VARCHAR}, #{startValidTime,jdbcType=TIMESTAMP}, values (#{name,jdbcType=VARCHAR}, #{image,jdbcType=VARCHAR}, #{startValidTime,jdbcType=TIMESTAMP},
#{endValidTime,jdbcType=TIMESTAMP}, #{signInStartTime,jdbcType=TIMESTAMP}, #{signInEndTime,jdbcType=TIMESTAMP}, #{endValidTime,jdbcType=TIMESTAMP}, #{signInStartTime,jdbcType=TIMESTAMP}, #{signInEndTime,jdbcType=TIMESTAMP},
#{goalDays,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{state,jdbcType=INTEGER}, #{goalDays,jdbcType=INTEGER}, #{type,jdbcType=INTEGER}, #{state,jdbcType=INTEGER},
#{desc,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{desc,jdbcType=VARCHAR}, #{creatorId,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{isPrivate,jdbcType=BIT}, #{hasReward,jdbcType=BIT} #{updateTime,jdbcType=TIMESTAMP}, #{isPrivate,jdbcType=BIT}, #{hasReward,jdbcType=BIT},
) #{rewardItemId,jdbcType=BIGINT})
</insert> </insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.qiandao.SignInTask"> <insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.qiandao.SignInTask">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
...@@ -234,6 +235,9 @@ ...@@ -234,6 +235,9 @@
<if test="hasReward != null"> <if test="hasReward != null">
has_reward, has_reward,
</if> </if>
<if test="rewardItemId != null">
reward_item_id,
</if>
</trim> </trim>
<trim prefix="values (" suffix=")" suffixOverrides=","> <trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="name != null"> <if test="name != null">
...@@ -281,6 +285,9 @@ ...@@ -281,6 +285,9 @@
<if test="hasReward != null"> <if test="hasReward != null">
#{hasReward,jdbcType=BIT}, #{hasReward,jdbcType=BIT},
</if> </if>
<if test="rewardItemId != null">
#{rewardItemId,jdbcType=BIGINT},
</if>
</trim> </trim>
</insert> </insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.qiandao.SignInTaskExample" resultType="java.lang.Long"> <select id="countByExample" parameterType="com.wwdz.ch.db.domain.qiandao.SignInTaskExample" resultType="java.lang.Long">
...@@ -340,6 +347,9 @@ ...@@ -340,6 +347,9 @@
<if test="record.hasReward != null"> <if test="record.hasReward != null">
has_reward = #{record.hasReward,jdbcType=BIT}, has_reward = #{record.hasReward,jdbcType=BIT},
</if> </if>
<if test="record.rewardItemId != null">
reward_item_id = #{record.rewardItemId,jdbcType=BIGINT},
</if>
</set> </set>
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
...@@ -362,7 +372,8 @@ ...@@ -362,7 +372,8 @@
create_time = #{record.createTime,jdbcType=TIMESTAMP}, create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, update_time = #{record.updateTime,jdbcType=TIMESTAMP},
is_private = #{record.isPrivate,jdbcType=BIT}, is_private = #{record.isPrivate,jdbcType=BIT},
has_reward = #{record.hasReward,jdbcType=BIT} has_reward = #{record.hasReward,jdbcType=BIT},
reward_item_id = #{record.rewardItemId,jdbcType=BIGINT}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -415,6 +426,9 @@ ...@@ -415,6 +426,9 @@
<if test="hasReward != null"> <if test="hasReward != null">
has_reward = #{hasReward,jdbcType=BIT}, has_reward = #{hasReward,jdbcType=BIT},
</if> </if>
<if test="rewardItemId != null">
reward_item_id = #{rewardItemId,jdbcType=BIGINT},
</if>
</set> </set>
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
...@@ -434,7 +448,8 @@ ...@@ -434,7 +448,8 @@
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}, update_time = #{updateTime,jdbcType=TIMESTAMP},
is_private = #{isPrivate,jdbcType=BIT}, is_private = #{isPrivate,jdbcType=BIT},
has_reward = #{hasReward,jdbcType=BIT} has_reward = #{hasReward,jdbcType=BIT},
reward_item_id = #{rewardItemId,jdbcType=BIGINT}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.qiandao.SignInTaskExample" resultMap="BaseResultMap"> <select id="selectOneByExample" parameterType="com.wwdz.ch.db.domain.qiandao.SignInTaskExample" resultMap="BaseResultMap">
...@@ -472,7 +487,7 @@ ...@@ -472,7 +487,7 @@
<otherwise> <otherwise>
id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time, id, `name`, image, start_valid_time, end_valid_time, sign_in_start_time, sign_in_end_time,
goal_days, `type`, `state`, `desc`, creator_id, create_time, update_time, is_private, goal_days, `type`, `state`, `desc`, creator_id, create_time, update_time, is_private,
has_reward has_reward, reward_item_id
</otherwise> </otherwise>
</choose> </choose>
from sign_in_task from sign_in_task
......
...@@ -72,7 +72,7 @@ ...@@ -72,7 +72,7 @@
<javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.mapper.qiandao" <javaClientGenerator type="XMLMAPPER" targetPackage="com.wwdz.ch.db.mapper.qiandao"
targetProject="ch-dao/src/main/java"/> targetProject="ch-dao/src/main/java"/>
<table tableName="qd_user_sign_in_note" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true"> <table tableName="sign_in_task" enableCountByExample="true" enableUpdateByExample="true" enableDeleteByExample="true" enableSelectByExample="true" selectByExampleQueryId="true">
<generatedKey column="id" sqlStatement="Mysql" identity="true" /> <generatedKey column="id" sqlStatement="Mysql" identity="true" />
</table> </table>
......
...@@ -132,4 +132,9 @@ public class SignInTaskVo implements Entity { ...@@ -132,4 +132,9 @@ public class SignInTaskVo implements Entity {
private Boolean isExpire = false; private Boolean isExpire = false;
private Integer rate; private Integer rate;
/**
* 奖励物品id
*/
private Long rewardItemId;
} }
...@@ -15,7 +15,6 @@ import com.wwdz.ch.db.domain.distribution.DistributionOrder; ...@@ -15,7 +15,6 @@ import com.wwdz.ch.db.domain.distribution.DistributionOrder;
import com.wwdz.ch.db.domain.qiandao.QdUserSignIn; import com.wwdz.ch.db.domain.qiandao.QdUserSignIn;
import com.wwdz.ch.db.domain.qiandao.QdUserSignInNote; import com.wwdz.ch.db.domain.qiandao.QdUserSignInNote;
import com.wwdz.ch.db.domain.qiandao.SignInTask; import com.wwdz.ch.db.domain.qiandao.SignInTask;
import com.wwdz.ch.db.dto.request.distribution.DistributionOrderRequestDto;
import com.wwdz.ch.db.dto.request.qiandao.QdUserSignInRequestDto; import com.wwdz.ch.db.dto.request.qiandao.QdUserSignInRequestDto;
import com.wwdz.ch.wx.service.qiandao.QdUserSignInService; import com.wwdz.ch.wx.service.qiandao.QdUserSignInService;
import com.xxdxxs.utils.DateUtils; import com.xxdxxs.utils.DateUtils;
...@@ -199,9 +198,9 @@ public class QdUserSignInServiceImpl implements QdUserSignInService { ...@@ -199,9 +198,9 @@ public class QdUserSignInServiceImpl implements QdUserSignInService {
String distributionOrderId = IdUtils.getOrderNumber(CommConsts.DISTRIBUTION_ORDER_PREFIX); String distributionOrderId = IdUtils.getOrderNumber(CommConsts.DISTRIBUTION_ORDER_PREFIX);
//赠品订单收取运费10元 //赠品订单
long orderAmount = 1000L; long orderAmount = 0L;
DistributionOrderRequestDto prePayDto = new DistributionOrderRequestDto(); /*DistributionOrderRequestDto prePayDto = new DistributionOrderRequestDto();
prePayDto.setDistributionOrderId(distributionOrderId); prePayDto.setDistributionOrderId(distributionOrderId);
prePayDto.setAmount(String.valueOf(orderAmount)); prePayDto.setAmount(String.valueOf(orderAmount));
prePayDto.setBuyerOpenid(dto.getUserOpenId()); prePayDto.setBuyerOpenid(dto.getUserOpenId());
...@@ -210,16 +209,16 @@ public class QdUserSignInServiceImpl implements QdUserSignInService { ...@@ -210,16 +209,16 @@ public class QdUserSignInServiceImpl implements QdUserSignInService {
if (!prePayResult.getSuccess()) { if (!prePayResult.getSuccess()) {
return Result.failed("签到礼品支付运费预下单失败"); return Result.failed("签到礼品支付运费预下单失败");
} }
String prepayId = (String) prePayResult.getData(); String prepayId = (String) prePayResult.getData();*/
SignInTask signInTask = signInTaskDao.findById(taskId);
//创建赠品订单 //创建赠品订单
DistributionOrder distributionOrder = new DistributionOrder(); DistributionOrder distributionOrder = new DistributionOrder();
distributionOrder.setItemId(null); distributionOrder.setItemId(signInTask.getRewardItemId());
distributionOrder.setItemNum(1); distributionOrder.setItemNum(1);
distributionOrder.setDistributionOrderId(distributionOrderId); distributionOrder.setDistributionOrderId(distributionOrderId);
distributionOrder.setBuyerId(userId); distributionOrder.setBuyerId(userId);
distributionOrder.setBuyerOpenid(dto.getUserOpenId()); distributionOrder.setBuyerOpenid(dto.getUserOpenId());
distributionOrder.setPrepayId(prepayId); distributionOrder.setPrepayId(null);
distributionOrder.setShopId(CommConsts.SYSTEM_ACCOUNT.longValue()); distributionOrder.setShopId(CommConsts.SYSTEM_ACCOUNT.longValue());
distributionOrder.setSellerId(CommConsts.SYSTEM_ACCOUNT.longValue()); distributionOrder.setSellerId(CommConsts.SYSTEM_ACCOUNT.longValue());
distributionOrder.setAmount(orderAmount); distributionOrder.setAmount(orderAmount);
...@@ -230,11 +229,11 @@ public class QdUserSignInServiceImpl implements QdUserSignInService { ...@@ -230,11 +229,11 @@ public class QdUserSignInServiceImpl implements QdUserSignInService {
distributionOrder.setUpdateTime(new Date()); distributionOrder.setUpdateTime(new Date());
distributionOrder.setType(DistributionEnum.DistributionTypeEnum.QIANDAO_GIFT.getCode()); distributionOrder.setType(DistributionEnum.DistributionTypeEnum.QIANDAO_GIFT.getCode());
distributionOrder.setRemark(null); distributionOrder.setRemark(null);
distributionOrder.setState(DistributionEnum.DistributionOrderStateEnum.PRE_PAY.getCode()); distributionOrder.setState(DistributionEnum.DistributionOrderStateEnum.PRE_SEND.getCode());
distributionOrderDao.insert(distributionOrder); distributionOrderDao.insert(distributionOrder);
Map<String, String> map = new HashMap<>(); Map<String, String> map = new HashMap<>();
map.put("distributionOrderId", distributionOrderId); map.put("distributionOrderId", distributionOrderId);
map.put("prepayId", prepayId); //map.put("prepayId", prepayId);
return Result.success(map); return Result.success(map);
} catch (Exception e) { } catch (Exception e) {
logger.error("乾岛领取奖励失败 error:{}", e); logger.error("乾岛领取奖励失败 error:{}", e);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment