修改msg 信息统一处理
This commit is contained in:
parent
f3de388e49
commit
69b7ed77ec
|
|
@ -1,14 +1,10 @@
|
||||||
package com.chaozhanggui.system.cashierservice.dao;
|
package com.chaozhanggui.system.cashierservice.dao;
|
||||||
|
|
||||||
import com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow;
|
import com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow;
|
||||||
import org.apache.ibatis.annotations.Mapper;
|
|
||||||
import org.springframework.stereotype.Component;
|
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
@Component
|
|
||||||
@Mapper
|
|
||||||
public interface TbShopUserFlowMapper {
|
public interface TbShopUserFlowMapper {
|
||||||
int deleteByPrimaryKey(Integer id);
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
|
@ -22,5 +18,6 @@ public interface TbShopUserFlowMapper {
|
||||||
|
|
||||||
int updateByPrimaryKey(TbShopUserFlow record);
|
int updateByPrimaryKey(TbShopUserFlow record);
|
||||||
|
|
||||||
|
|
||||||
List<Map<String,Object>> selectByMemberAccountFlow(String memberId);
|
List<Map<String,Object>> selectByMemberAccountFlow(String memberId);
|
||||||
}
|
}
|
||||||
|
|
@ -19,6 +19,8 @@ public class TbShopUserFlow implements Serializable {
|
||||||
|
|
||||||
private Date createTime;
|
private Date createTime;
|
||||||
|
|
||||||
|
private String type;
|
||||||
|
|
||||||
private static final long serialVersionUID = 1L;
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
public Integer getId() {
|
public Integer getId() {
|
||||||
|
|
@ -76,4 +78,12 @@ public class TbShopUserFlow implements Serializable {
|
||||||
public void setCreateTime(Date createTime) {
|
public void setCreateTime(Date createTime) {
|
||||||
this.createTime = createTime;
|
this.createTime = createTime;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getType() {
|
||||||
|
return type;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setType(String type) {
|
||||||
|
this.type = type == null ? null : type.trim();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -352,6 +352,7 @@ public class PayService {
|
||||||
flow.setShopUserId(Integer.valueOf(user.getId()));
|
flow.setShopUserId(Integer.valueOf(user.getId()));
|
||||||
flow.setBizCode("accountPay");
|
flow.setBizCode("accountPay");
|
||||||
flow.setBizName("会员储值卡支付");
|
flow.setBizName("会员储值卡支付");
|
||||||
|
flow.setType("-");
|
||||||
flow.setAmount(orderInfo.getOrderAmount());
|
flow.setAmount(orderInfo.getOrderAmount());
|
||||||
flow.setBalance(user.getAmount());
|
flow.setBalance(user.getAmount());
|
||||||
flow.setCreateTime(new Date());
|
flow.setCreateTime(new Date());
|
||||||
|
|
@ -424,6 +425,7 @@ public class PayService {
|
||||||
TbShopUserFlow flow = new TbShopUserFlow();
|
TbShopUserFlow flow = new TbShopUserFlow();
|
||||||
flow.setShopUserId(Integer.valueOf(user.getId()));
|
flow.setShopUserId(Integer.valueOf(user.getId()));
|
||||||
flow.setBizCode("accountGroupPay");
|
flow.setBizCode("accountGroupPay");
|
||||||
|
flow.setType("-");
|
||||||
flow.setBizName("会员储值卡支付团购卷");
|
flow.setBizName("会员储值卡支付团购卷");
|
||||||
flow.setAmount(orderInfo.getOrderAmount());
|
flow.setAmount(orderInfo.getOrderAmount());
|
||||||
flow.setBalance(user.getAmount());
|
flow.setBalance(user.getAmount());
|
||||||
|
|
@ -1039,7 +1041,9 @@ public class PayService {
|
||||||
TbShopUserFlow flow=new TbShopUserFlow();
|
TbShopUserFlow flow=new TbShopUserFlow();
|
||||||
flow.setShopUserId(Integer.valueOf(tbShopUser.getId()));
|
flow.setShopUserId(Integer.valueOf(tbShopUser.getId()));
|
||||||
flow.setBizCode("scanMemberIn");
|
flow.setBizCode("scanMemberIn");
|
||||||
|
|
||||||
flow.setBizName("会员扫码充值");
|
flow.setBizName("会员扫码充值");
|
||||||
|
flow.setType("+");
|
||||||
flow.setAmount(memberIn.getAmount());
|
flow.setAmount(memberIn.getAmount());
|
||||||
flow.setBalance(tbShopUser.getAmount());
|
flow.setBalance(tbShopUser.getAmount());
|
||||||
flow.setCreateTime(new Date());
|
flow.setCreateTime(new Date());
|
||||||
|
|
@ -1065,6 +1069,7 @@ public class PayService {
|
||||||
flow.setShopUserId(Integer.valueOf(tbShopUser.getId()));
|
flow.setShopUserId(Integer.valueOf(tbShopUser.getId()));
|
||||||
flow.setBizCode("scanMemberAwardIn");
|
flow.setBizCode("scanMemberAwardIn");
|
||||||
flow.setBizName("会员充值奖励");
|
flow.setBizName("会员充值奖励");
|
||||||
|
flow.setType("+");
|
||||||
flow.setAmount(amount);
|
flow.setAmount(amount);
|
||||||
flow.setBalance(tbShopUser.getAmount());
|
flow.setBalance(tbShopUser.getAmount());
|
||||||
flow.setCreateTime(new Date());
|
flow.setCreateTime(new Date());
|
||||||
|
|
@ -1119,6 +1124,8 @@ public class PayService {
|
||||||
TbShopUserFlow flow=new TbShopUserFlow();
|
TbShopUserFlow flow=new TbShopUserFlow();
|
||||||
flow.setShopUserId(Integer.valueOf(tbShopUser.getId()));
|
flow.setShopUserId(Integer.valueOf(tbShopUser.getId()));
|
||||||
flow.setBizCode("scanMemberIn");
|
flow.setBizCode("scanMemberIn");
|
||||||
|
flow.setType("+");
|
||||||
|
|
||||||
flow.setBizName("线上充值");
|
flow.setBizName("线上充值");
|
||||||
flow.setAmount(memberIn.getAmount());
|
flow.setAmount(memberIn.getAmount());
|
||||||
flow.setBalance(tbShopUser.getAmount());
|
flow.setBalance(tbShopUser.getAmount());
|
||||||
|
|
@ -1145,6 +1152,7 @@ public class PayService {
|
||||||
flow=new TbShopUserFlow();
|
flow=new TbShopUserFlow();
|
||||||
flow.setShopUserId(Integer.valueOf(tbShopUser.getId()));
|
flow.setShopUserId(Integer.valueOf(tbShopUser.getId()));
|
||||||
flow.setBizCode("scanMemberAwardIn");
|
flow.setBizCode("scanMemberAwardIn");
|
||||||
|
flow.setType("+");
|
||||||
flow.setBizName("充值活动奖励");
|
flow.setBizName("充值活动奖励");
|
||||||
flow.setAmount(amount);
|
flow.setAmount(amount);
|
||||||
flow.setBalance(tbShopUser.getAmount());
|
flow.setBalance(tbShopUser.getAmount());
|
||||||
|
|
|
||||||
|
|
@ -52,9 +52,11 @@
|
||||||
|
|
||||||
<!-- 要生成的表tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
|
<!-- 要生成的表tableName是数据库中的表名或视图名 domainObjectName是实体类名-->
|
||||||
<!-- <table tableName="%" schema="fycashier" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
|
<!-- <table tableName="%" schema="fycashier" enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false" enableSelectByExample="false" selectByExampleQueryId="false" ></table>-->
|
||||||
<table tableName="tb_activate" domainObjectName="TbActivate"
|
<table tableName="tb_shop_user_flow" domainObjectName="TbShopUserFlow"
|
||||||
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
|
enableCountByExample="false" enableUpdateByExample="false" enableDeleteByExample="false"
|
||||||
enableSelectByExample="false" selectByExampleQueryId="false" >
|
enableSelectByExample="false" selectByExampleQueryId="false" >
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
|
|
||||||
</context>
|
</context>
|
||||||
</generatorConfiguration>
|
</generatorConfiguration>
|
||||||
|
|
@ -9,9 +9,10 @@
|
||||||
<result column="biz_code" jdbcType="VARCHAR" property="bizCode" />
|
<result column="biz_code" jdbcType="VARCHAR" property="bizCode" />
|
||||||
<result column="biz_name" jdbcType="VARCHAR" property="bizName" />
|
<result column="biz_name" jdbcType="VARCHAR" property="bizName" />
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||||
|
<result column="type" jdbcType="VARCHAR" property="type" />
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
<sql id="Base_Column_List">
|
||||||
id, shop_user_id, amount, balance, biz_code, biz_name, create_time
|
id, shop_user_id, amount, balance, biz_code, biz_name, create_time, type
|
||||||
</sql>
|
</sql>
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
select
|
select
|
||||||
|
|
@ -26,10 +27,10 @@
|
||||||
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
|
<insert id="insert" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
|
||||||
insert into tb_shop_user_flow (id, shop_user_id, amount,
|
insert into tb_shop_user_flow (id, shop_user_id, amount,
|
||||||
balance, biz_code, biz_name,
|
balance, biz_code, biz_name,
|
||||||
create_time)
|
create_time, type)
|
||||||
values (#{id,jdbcType=INTEGER}, #{shopUserId,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL},
|
values (#{id,jdbcType=INTEGER}, #{shopUserId,jdbcType=INTEGER}, #{amount,jdbcType=DECIMAL},
|
||||||
#{balance,jdbcType=DECIMAL}, #{bizCode,jdbcType=VARCHAR}, #{bizName,jdbcType=VARCHAR},
|
#{balance,jdbcType=DECIMAL}, #{bizCode,jdbcType=VARCHAR}, #{bizName,jdbcType=VARCHAR},
|
||||||
#{createTime,jdbcType=TIMESTAMP})
|
#{createTime,jdbcType=TIMESTAMP}, #{type,jdbcType=VARCHAR})
|
||||||
</insert>
|
</insert>
|
||||||
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
|
<insert id="insertSelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
|
||||||
insert into tb_shop_user_flow
|
insert into tb_shop_user_flow
|
||||||
|
|
@ -55,6 +56,9 @@
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
create_time,
|
create_time,
|
||||||
</if>
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
type,
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="id != null">
|
<if test="id != null">
|
||||||
|
|
@ -78,6 +82,9 @@
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
#{type,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</trim>
|
</trim>
|
||||||
</insert>
|
</insert>
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
|
<update id="updateByPrimaryKeySelective" parameterType="com.chaozhanggui.system.cashierservice.entity.TbShopUserFlow">
|
||||||
|
|
@ -101,6 +108,9 @@
|
||||||
<if test="createTime != null">
|
<if test="createTime != null">
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
</if>
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
type = #{type,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
</set>
|
</set>
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</update>
|
</update>
|
||||||
|
|
@ -111,17 +121,19 @@
|
||||||
balance = #{balance,jdbcType=DECIMAL},
|
balance = #{balance,jdbcType=DECIMAL},
|
||||||
biz_code = #{bizCode,jdbcType=VARCHAR},
|
biz_code = #{bizCode,jdbcType=VARCHAR},
|
||||||
biz_name = #{bizName,jdbcType=VARCHAR},
|
biz_name = #{bizName,jdbcType=VARCHAR},
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP}
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
type = #{type,jdbcType=VARCHAR}
|
||||||
where id = #{id,jdbcType=INTEGER}
|
where id = #{id,jdbcType=INTEGER}
|
||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectByMemberAccountFlow" resultType="java.util.Map">
|
<select id="selectByMemberAccountFlow" resultType="java.util.Map">
|
||||||
|
|
||||||
SELECT
|
SELECT
|
||||||
f.*,
|
f.*,
|
||||||
u.`name`
|
u.`name`
|
||||||
FROM
|
FROM
|
||||||
tb_shop_user_flow f
|
tb_shop_user_flow f
|
||||||
LEFT JOIN tb_shop_user u ON f.shop_user_id = u.id
|
LEFT JOIN tb_shop_user u ON f.shop_user_id = u.id
|
||||||
where 1=1
|
where 1=1
|
||||||
<if test="memberId != null and memberId!=''">
|
<if test="memberId != null and memberId!=''">
|
||||||
and u.id = #{memberId}
|
and u.id = #{memberId}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue