Commit 96940a93 authored by shiyu's avatar shiyu

保证金

parent aee26c6d
......@@ -4,6 +4,8 @@ import java.io.Serializable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Date;
import com.xxdxxs.entity.Entity;
import lombok.Data;
/**
......@@ -11,7 +13,7 @@ import lombok.Data;
* @date 2024/11/06
*/
@Data
public class UserAccount implements Serializable {
public class UserAccount implements Entity {
private Long id;
/**
......@@ -49,6 +51,11 @@ public class UserAccount implements Serializable {
*/
private Long earnestAmount;
/**
* 保证金可用额度
*/
private Long earnestUsableAmount;
/**
* 创建时间
*/
......@@ -75,6 +82,7 @@ public class UserAccount implements Serializable {
sb.append(", introduceAmount=").append(introduceAmount);
sb.append(", introduceWaitEntryAmount=").append(introduceWaitEntryAmount);
sb.append(", earnestAmount=").append(earnestAmount);
sb.append(", earnestUsableAmount=").append(earnestUsableAmount);
sb.append(", createTime=").append(createTime);
sb.append(", updateTime=").append(updateTime);
sb.append(", serialVersionUID=").append(serialVersionUID);
......@@ -102,6 +110,7 @@ public class UserAccount implements Serializable {
&& (this.getIntroduceAmount() == null ? other.getIntroduceAmount() == null : this.getIntroduceAmount().equals(other.getIntroduceAmount()))
&& (this.getIntroduceWaitEntryAmount() == null ? other.getIntroduceWaitEntryAmount() == null : this.getIntroduceWaitEntryAmount().equals(other.getIntroduceWaitEntryAmount()))
&& (this.getEarnestAmount() == null ? other.getEarnestAmount() == null : this.getEarnestAmount().equals(other.getEarnestAmount()))
&& (this.getEarnestUsableAmount() == null ? other.getEarnestUsableAmount() == null : this.getEarnestUsableAmount().equals(other.getEarnestUsableAmount()))
&& (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
&& (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()));
}
......@@ -118,6 +127,7 @@ public class UserAccount implements Serializable {
result = prime * result + ((getIntroduceAmount() == null) ? 0 : getIntroduceAmount().hashCode());
result = prime * result + ((getIntroduceWaitEntryAmount() == null) ? 0 : getIntroduceWaitEntryAmount().hashCode());
result = prime * result + ((getEarnestAmount() == null) ? 0 : getEarnestAmount().hashCode());
result = prime * result + ((getEarnestUsableAmount() == null) ? 0 : getEarnestUsableAmount().hashCode());
result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
return result;
......@@ -139,6 +149,7 @@ public class UserAccount implements Serializable {
introduceAmount("introduce_amount", "introduceAmount", "BIGINT", false),
introduceWaitEntryAmount("introduce_wait_entry_amount", "introduceWaitEntryAmount", "BIGINT", false),
earnestAmount("earnest_amount", "earnestAmount", "BIGINT", false),
earnestUsableAmount("earnest_usable_amount", "earnestUsableAmount", "BIGINT", false),
createTime("create_time", "createTime", "TIMESTAMP", false),
updateTime("update_time", "updateTime", "TIMESTAMP", false);
......
......@@ -1204,6 +1204,138 @@ public class UserAccountExample {
return (Criteria) this;
}
public Criteria andEarnestUsableAmountIsNull() {
addCriterion("earnest_usable_amount is null");
return (Criteria) this;
}
public Criteria andEarnestUsableAmountIsNotNull() {
addCriterion("earnest_usable_amount is not null");
return (Criteria) this;
}
public Criteria andEarnestUsableAmountEqualTo(Long value) {
addCriterion("earnest_usable_amount =", value, "earnestUsableAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andEarnestUsableAmountEqualToColumn(UserAccount.Column column) {
addCriterion(new StringBuilder("earnest_usable_amount = ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andEarnestUsableAmountNotEqualTo(Long value) {
addCriterion("earnest_usable_amount <>", value, "earnestUsableAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andEarnestUsableAmountNotEqualToColumn(UserAccount.Column column) {
addCriterion(new StringBuilder("earnest_usable_amount <> ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andEarnestUsableAmountGreaterThan(Long value) {
addCriterion("earnest_usable_amount >", value, "earnestUsableAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andEarnestUsableAmountGreaterThanColumn(UserAccount.Column column) {
addCriterion(new StringBuilder("earnest_usable_amount > ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andEarnestUsableAmountGreaterThanOrEqualTo(Long value) {
addCriterion("earnest_usable_amount >=", value, "earnestUsableAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andEarnestUsableAmountGreaterThanOrEqualToColumn(UserAccount.Column column) {
addCriterion(new StringBuilder("earnest_usable_amount >= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andEarnestUsableAmountLessThan(Long value) {
addCriterion("earnest_usable_amount <", value, "earnestUsableAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andEarnestUsableAmountLessThanColumn(UserAccount.Column column) {
addCriterion(new StringBuilder("earnest_usable_amount < ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andEarnestUsableAmountLessThanOrEqualTo(Long value) {
addCriterion("earnest_usable_amount <=", value, "earnestUsableAmount");
return (Criteria) this;
}
/**
* This method was generated by MyBatis Generator.
* This method corresponds to the database table user_account
*
* @mbg.generated
* @project https://github.com/itfsw/mybatis-generator-plugin
*/
public Criteria andEarnestUsableAmountLessThanOrEqualToColumn(UserAccount.Column column) {
addCriterion(new StringBuilder("earnest_usable_amount <= ").append(column.getEscapedColumnName()).toString());
return (Criteria) this;
}
public Criteria andEarnestUsableAmountIn(List<Long> values) {
addCriterion("earnest_usable_amount in", values, "earnestUsableAmount");
return (Criteria) this;
}
public Criteria andEarnestUsableAmountNotIn(List<Long> values) {
addCriterion("earnest_usable_amount not in", values, "earnestUsableAmount");
return (Criteria) this;
}
public Criteria andEarnestUsableAmountBetween(Long value1, Long value2) {
addCriterion("earnest_usable_amount between", value1, value2, "earnestUsableAmount");
return (Criteria) this;
}
public Criteria andEarnestUsableAmountNotBetween(Long value1, Long value2) {
addCriterion("earnest_usable_amount not between", value1, value2, "earnestUsableAmount");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
......
package com.wwdz.ch.db.impl.openShop;
import com.wwdz.ch.db.dao.openShop.UserAccountDao;
import com.wwdz.ch.db.domain.openShop.UserAccount;
import com.wwdz.ch.db.mapper.UserMapper;
import com.wwdz.ch.db.mapper.openShop.UserAccountMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
@Repository
public class UserAccountDaoImpl implements UserAccountDao {
@Autowired
UserAccountMapper userAccountMapper;
@Override
public boolean insert(UserAccount userAccount) {
return false;
}
@Override
public boolean update(UserAccount userAccount) {
return false;
}
@Override
public UserAccount findByUserId(long userId) {
return null;
}
}
......@@ -3,8 +3,10 @@ package com.wwdz.ch.db.mapper.openShop;
import com.wwdz.ch.db.domain.openShop.UserAccount;
import com.wwdz.ch.db.domain.openShop.UserAccountExample;
import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface UserAccountMapper {
long countByExample(UserAccountExample example);
......
......@@ -10,6 +10,7 @@
<result column="introduce_amount" jdbcType="BIGINT" property="introduceAmount" />
<result column="introduce_wait_entry_amount" jdbcType="BIGINT" property="introduceWaitEntryAmount" />
<result column="earnest_amount" jdbcType="BIGINT" property="earnestAmount" />
<result column="earnest_usable_amount" jdbcType="BIGINT" property="earnestUsableAmount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
......@@ -73,7 +74,8 @@
</sql>
<sql id="Base_Column_List">
id, user_id, guarantee_amount, goods_amount, goods_wait_entry_amount, introduce_amount,
introduce_wait_entry_amount, earnest_amount, create_time, update_time
introduce_wait_entry_amount, earnest_amount, earnest_usable_amount, create_time,
update_time
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.openShop.UserAccountExample" resultMap="BaseResultMap">
select
......@@ -109,7 +111,8 @@
</when>
<otherwise>
id, user_id, guarantee_amount, goods_amount, goods_wait_entry_amount, introduce_amount,
introduce_wait_entry_amount, earnest_amount, create_time, update_time
introduce_wait_entry_amount, earnest_amount, earnest_usable_amount, create_time,
update_time
</otherwise>
</choose>
from user_account
......@@ -141,7 +144,8 @@
</when>
<otherwise>
id, user_id, guarantee_amount, goods_amount, goods_wait_entry_amount, introduce_amount,
introduce_wait_entry_amount, earnest_amount, create_time, update_time
introduce_wait_entry_amount, earnest_amount, earnest_usable_amount, create_time,
update_time
</otherwise>
</choose>
from user_account
......@@ -163,12 +167,12 @@
</selectKey>
insert into user_account (user_id, guarantee_amount, goods_amount,
goods_wait_entry_amount, introduce_amount, introduce_wait_entry_amount,
earnest_amount, create_time, update_time
)
earnest_amount, earnest_usable_amount, create_time,
update_time)
values (#{userId,jdbcType=BIGINT}, #{guaranteeAmount,jdbcType=BIGINT}, #{goodsAmount,jdbcType=BIGINT},
#{goodsWaitEntryAmount,jdbcType=BIGINT}, #{introduceAmount,jdbcType=BIGINT}, #{introduceWaitEntryAmount,jdbcType=BIGINT},
#{earnestAmount,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP}
)
#{earnestAmount,jdbcType=BIGINT}, #{earnestUsableAmount,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.openShop.UserAccount">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
......@@ -197,6 +201,9 @@
<if test="earnestAmount != null">
earnest_amount,
</if>
<if test="earnestUsableAmount != null">
earnest_usable_amount,
</if>
<if test="createTime != null">
create_time,
</if>
......@@ -226,6 +233,9 @@
<if test="earnestAmount != null">
#{earnestAmount,jdbcType=BIGINT},
</if>
<if test="earnestUsableAmount != null">
#{earnestUsableAmount,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
......@@ -267,6 +277,9 @@
<if test="record.earnestAmount != null">
earnest_amount = #{record.earnestAmount,jdbcType=BIGINT},
</if>
<if test="record.earnestUsableAmount != null">
earnest_usable_amount = #{record.earnestUsableAmount,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
......@@ -288,6 +301,7 @@
introduce_amount = #{record.introduceAmount,jdbcType=BIGINT},
introduce_wait_entry_amount = #{record.introduceWaitEntryAmount,jdbcType=BIGINT},
earnest_amount = #{record.earnestAmount,jdbcType=BIGINT},
earnest_usable_amount = #{record.earnestUsableAmount,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
......@@ -318,6 +332,9 @@
<if test="earnestAmount != null">
earnest_amount = #{earnestAmount,jdbcType=BIGINT},
</if>
<if test="earnestUsableAmount != null">
earnest_usable_amount = #{earnestUsableAmount,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
......@@ -336,6 +353,7 @@
introduce_amount = #{introduceAmount,jdbcType=BIGINT},
introduce_wait_entry_amount = #{introduceWaitEntryAmount,jdbcType=BIGINT},
earnest_amount = #{earnestAmount,jdbcType=BIGINT},
earnest_usable_amount = #{earnestUsableAmount,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
......@@ -374,7 +392,8 @@
</when>
<otherwise>
id, user_id, guarantee_amount, goods_amount, goods_wait_entry_amount, introduce_amount,
introduce_wait_entry_amount, earnest_amount, create_time, update_time
introduce_wait_entry_amount, earnest_amount, earnest_usable_amount, create_time,
update_time
</otherwise>
</choose>
from user_account
......@@ -386,260 +405,4 @@
</if>
limit 1
</select>
<resultMap id="BaseResultMap" type="com.wwdz.ch.db.domain.openShop.UserAccount">
<id column="id" jdbcType="BIGINT" property="id" />
<result column="user_id" jdbcType="BIGINT" property="userId" />
<result column="guarantee_amount" jdbcType="BIGINT" property="guaranteeAmount" />
<result column="item_income_amount" jdbcType="BIGINT" property="itemIncomeAmount" />
<result column="introduce_amount" jdbcType="BIGINT" property="introduceAmount" />
<result column="earnest_amount" jdbcType="BIGINT" property="earnestAmount" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
<foreach collection="oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Update_By_Example_Where_Clause">
<where>
<foreach collection="example.oredCriteria" item="criteria" separator="or">
<if test="criteria.valid">
<trim prefix="(" prefixOverrides="and" suffix=")">
<foreach collection="criteria.criteria" item="criterion">
<choose>
<when test="criterion.noValue">
and ${criterion.condition}
</when>
<when test="criterion.singleValue">
and ${criterion.condition} #{criterion.value}
</when>
<when test="criterion.betweenValue">
and ${criterion.condition} #{criterion.value} and #{criterion.secondValue}
</when>
<when test="criterion.listValue">
and ${criterion.condition}
<foreach close=")" collection="criterion.value" item="listItem" open="(" separator=",">
#{listItem}
</foreach>
</when>
</choose>
</foreach>
</trim>
</if>
</foreach>
</where>
</sql>
<sql id="Base_Column_List">
id, user_id, guarantee_amount, item_income_amount, introduce_amount, earnest_amount,
create_time, update_time
</sql>
<select id="selectByExample" parameterType="com.wwdz.ch.db.domain.openShop.UserAccountExample" resultMap="BaseResultMap">
select
<if test="distinct">
distinct
</if>
'true' as QUERYID,
<include refid="Base_Column_List" />
from user_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
<if test="orderByClause != null">
order by ${orderByClause}
</if>
</select>
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from user_account
where id = #{id,jdbcType=BIGINT}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
delete from user_account
where id = #{id,jdbcType=BIGINT}
</delete>
<delete id="deleteByExample" parameterType="com.wwdz.ch.db.domain.openShop.UserAccountExample">
delete from user_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</delete>
<insert id="insert" parameterType="com.wwdz.ch.db.domain.openShop.UserAccount">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into user_account (user_id, guarantee_amount, item_income_amount,
introduce_amount, earnest_amount, create_time,
update_time)
values (#{userId,jdbcType=BIGINT}, #{guaranteeAmount,jdbcType=BIGINT}, #{itemIncomeAmount,jdbcType=BIGINT},
#{introduceAmount,jdbcType=BIGINT}, #{earnestAmount,jdbcType=BIGINT}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.wwdz.ch.db.domain.openShop.UserAccount">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
SELECT LAST_INSERT_ID()
</selectKey>
insert into user_account
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">
user_id,
</if>
<if test="guaranteeAmount != null">
guarantee_amount,
</if>
<if test="itemIncomeAmount != null">
item_income_amount,
</if>
<if test="introduceAmount != null">
introduce_amount,
</if>
<if test="earnestAmount != null">
earnest_amount,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">
#{userId,jdbcType=BIGINT},
</if>
<if test="guaranteeAmount != null">
#{guaranteeAmount,jdbcType=BIGINT},
</if>
<if test="itemIncomeAmount != null">
#{itemIncomeAmount,jdbcType=BIGINT},
</if>
<if test="introduceAmount != null">
#{introduceAmount,jdbcType=BIGINT},
</if>
<if test="earnestAmount != null">
#{earnestAmount,jdbcType=BIGINT},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.wwdz.ch.db.domain.openShop.UserAccountExample" resultType="java.lang.Long">
select count(*) from user_account
<if test="_parameter != null">
<include refid="Example_Where_Clause" />
</if>
</select>
<update id="updateByExampleSelective" parameterType="map">
update user_account
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=BIGINT},
</if>
<if test="record.userId != null">
user_id = #{record.userId,jdbcType=BIGINT},
</if>
<if test="record.guaranteeAmount != null">
guarantee_amount = #{record.guaranteeAmount,jdbcType=BIGINT},
</if>
<if test="record.itemIncomeAmount != null">
item_income_amount = #{record.itemIncomeAmount,jdbcType=BIGINT},
</if>
<if test="record.introduceAmount != null">
introduce_amount = #{record.introduceAmount,jdbcType=BIGINT},
</if>
<if test="record.earnestAmount != null">
earnest_amount = #{record.earnestAmount,jdbcType=BIGINT},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.updateTime != null">
update_time = #{record.updateTime,jdbcType=TIMESTAMP},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByExample" parameterType="map">
update user_account
set id = #{record.id,jdbcType=BIGINT},
user_id = #{record.userId,jdbcType=BIGINT},
guarantee_amount = #{record.guaranteeAmount,jdbcType=BIGINT},
item_income_amount = #{record.itemIncomeAmount,jdbcType=BIGINT},
introduce_amount = #{record.introduceAmount,jdbcType=BIGINT},
earnest_amount = #{record.earnestAmount,jdbcType=BIGINT},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
update_time = #{record.updateTime,jdbcType=TIMESTAMP}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
</update>
<update id="updateByPrimaryKeySelective" parameterType="com.wwdz.ch.db.domain.openShop.UserAccount">
update user_account
<set>
<if test="userId != null">
user_id = #{userId,jdbcType=BIGINT},
</if>
<if test="guaranteeAmount != null">
guarantee_amount = #{guaranteeAmount,jdbcType=BIGINT},
</if>
<if test="itemIncomeAmount != null">
item_income_amount = #{itemIncomeAmount,jdbcType=BIGINT},
</if>
<if test="introduceAmount != null">
introduce_amount = #{introduceAmount,jdbcType=BIGINT},
</if>
<if test="earnestAmount != null">
earnest_amount = #{earnestAmount,jdbcType=BIGINT},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where id = #{id,jdbcType=BIGINT}
</update>
<update id="updateByPrimaryKey" parameterType="com.wwdz.ch.db.domain.openShop.UserAccount">
update user_account
set user_id = #{userId,jdbcType=BIGINT},
guarantee_amount = #{guaranteeAmount,jdbcType=BIGINT},
item_income_amount = #{itemIncomeAmount,jdbcType=BIGINT},
introduce_amount = #{introduceAmount,jdbcType=BIGINT},
earnest_amount = #{earnestAmount,jdbcType=BIGINT},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where id = #{id,jdbcType=BIGINT}
</update>
</mapper>
\ No newline at end of file
......@@ -8,9 +8,11 @@ import com.wwdz.ch.core.util.IdUtils;
import com.wwdz.ch.core.util.PriceUtil;
import com.wwdz.ch.db.dao.openShop.EarnestOrderDao;
import com.wwdz.ch.db.dao.openShop.EarnestRecordDao;
import com.wwdz.ch.db.dao.openShop.UserAccountDao;
import com.wwdz.ch.db.domain.openShop.EarnestOrder;
import com.wwdz.ch.db.dto.request.distribution.DistributionOrderRequestDto;
import com.wwdz.ch.db.dto.request.openShop.EarnestOrderRequestDto;
import com.wwdz.ch.db.dto.request.openShop.EarnestRecordRequestDto;
import com.wwdz.ch.wx.service.openShop.AuctionEarnestService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
......@@ -32,6 +34,9 @@ public class AuctionEarnestServiceImpl implements AuctionEarnestService {
@Autowired
WxPayServiceApi wxPayServiceApi;
@Autowired
UserAccountDao userAccountDao;
@Override
public Result payEarnest(EarnestOrderRequestDto dto) {
try {
......@@ -74,4 +79,20 @@ public class AuctionEarnestServiceImpl implements AuctionEarnestService {
}
return Result.failed();
}
@Override
public Result occupyEarnest(EarnestRecordRequestDto dto) {
try {
return Result.success();
} catch (Exception e) {
logger.error("占用保证金失败 error : {}", e);
}
return Result.failed();
}
@Override
public Result releaseEarnest(EarnestRecordRequestDto dto) {
return null;
}
}
......@@ -2,6 +2,7 @@ package com.wwdz.ch.wx.service.openShop;
import com.wwdz.ch.core.type.Result;
import com.wwdz.ch.db.dto.request.openShop.EarnestOrderRequestDto;
import com.wwdz.ch.db.dto.request.openShop.EarnestRecordRequestDto;
public interface AuctionEarnestService {
......@@ -13,7 +14,6 @@ public interface AuctionEarnestService {
Result payEarnest(EarnestOrderRequestDto dto);
/**
* 获取支付参数
* 预支付并返回支付所需要的前端参数
......@@ -21,6 +21,16 @@ public interface AuctionEarnestService {
*/
Result getPayParam(EarnestOrderRequestDto dto);
/**
* 占用保证金
* @return
*/
Result occupyEarnest(EarnestRecordRequestDto dto);
/**
* 释放保证金
* @param dto
* @return
*/
Result releaseEarnest(EarnestRecordRequestDto dto);
}
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