|
@@ -11,26 +11,35 @@
|
|
|
<result property="type" column="type" jdbcType="CHAR"/>
|
|
|
<result property="lat" column="lat" jdbcType="DOUBLE"/>
|
|
|
<result property="lng" column="lng" jdbcType="DOUBLE"/>
|
|
|
- <result property="ownerid" column="ownerId" jdbcType="INTEGER"/>
|
|
|
+ <result property="ownerId" column="ownerId" jdbcType="INTEGER"/>
|
|
|
<result property="phone" column="phone" jdbcType="CHAR"/>
|
|
|
<result property="note" column="note" jdbcType="VARCHAR"/>
|
|
|
<result property="account" column="account" jdbcType="VARCHAR"/>
|
|
|
- <result property="accountname" column="accountName" jdbcType="VARCHAR"/>
|
|
|
+ <result property="accountName" column="accountName" jdbcType="VARCHAR"/>
|
|
|
+ <result property="accountType" column="accountType" jdbcType="CHAR"/>
|
|
|
+ <result property="relation" column="relation" jdbcType="CHAR"/>
|
|
|
<result property="apiv3" column="apiv3" jdbcType="VARCHAR"/>
|
|
|
- <result property="certpath" column="certPath" jdbcType="VARCHAR"/>
|
|
|
+ <result property="certPath" column="certPath" jdbcType="VARCHAR"/>
|
|
|
<result property="tripartite" column="tripartite" jdbcType="CHAR"/>
|
|
|
<result property="tripvalue" column="tripvalue" jdbcType="INTEGER"/>
|
|
|
- <result property="realtimesplit" column="realtimeSplit" jdbcType="INTEGER"/>
|
|
|
+ <result property="realtimeSplit" column="realtimeSplit" jdbcType="INTEGER"/>
|
|
|
<result property="status" column="status" jdbcType="CHAR"/>
|
|
|
+ <result property="totalIncome" column="totalIncome" jdbcType="INTEGER"/>
|
|
|
+ <result property="totalSplit" column="totalSplit" jdbcType="INTEGER"/>
|
|
|
+ <result property="totalCashOut" column="totalCashOut" jdbcType="INTEGER"/>
|
|
|
+ <result property="totalRefund" column="totalRefund" jdbcType="INTEGER"/>
|
|
|
+ <result property="balance" column="balance" jdbcType="INTEGER"/>
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
id,name,address,
|
|
|
type,lat,lng,
|
|
|
ownerId,phone,note,
|
|
|
- account,accountName,apiv3,
|
|
|
- certPath,tripartite,tripvalue,
|
|
|
- realtimeSplit,status
|
|
|
+ account,accountName,accountType,
|
|
|
+ relation,apiv3,certPath,
|
|
|
+ tripartite,tripvalue,realtimeSplit,
|
|
|
+ status,totalIncome,totalSplit,
|
|
|
+ totalCashOut,totalRefund,balance
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
|
@@ -39,10 +48,24 @@
|
|
|
from aska_retails
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</select>
|
|
|
- <select id="listAllRetails" resultType="com.mofangchuxing.aska.dao.domain.AskaRetails">
|
|
|
+
|
|
|
+ <select id="listAllRetails" resultType="com.mofangchuxing.aska.domain.vo.AskaRetailsVo">
|
|
|
select
|
|
|
<include refid="Base_Column_List" />
|
|
|
from aska_retails
|
|
|
+ where 1=1
|
|
|
+ <if test="name != null">
|
|
|
+ and name = #{name}
|
|
|
+ </if>
|
|
|
+ <if test="status != null">
|
|
|
+ and status = #{status}
|
|
|
+ </if>
|
|
|
+ </select>
|
|
|
+ <select id="listAllRetailsNoLimit" resultType="com.mofangchuxing.aska.domain.vo.AskaRetailsVo">
|
|
|
+ select id as retailId,
|
|
|
+ name as retailName,
|
|
|
+ lat,lng,address,status
|
|
|
+ from aska_retails
|
|
|
</select>
|
|
|
|
|
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
|
@@ -54,15 +77,21 @@
|
|
|
( id,name,address
|
|
|
,type,lat,lng
|
|
|
,ownerId,phone,note
|
|
|
- ,account,accountName,apiv3
|
|
|
- ,certPath,tripartite,tripvalue
|
|
|
- ,realtimeSplit,status)
|
|
|
+ ,account,accountName,accountType
|
|
|
+ ,relation,apiv3,certPath
|
|
|
+ ,tripartite,tripvalue,realtimeSplit
|
|
|
+ ,status,totalIncome,totalSplit
|
|
|
+ ,totalCashOut,totalRefund,balance
|
|
|
+ )
|
|
|
values (#{id,jdbcType=INTEGER},#{name,jdbcType=CHAR},#{address,jdbcType=VARCHAR}
|
|
|
,#{type,jdbcType=CHAR},#{lat,jdbcType=DOUBLE},#{lng,jdbcType=DOUBLE}
|
|
|
- ,#{ownerid,jdbcType=INTEGER},#{phone,jdbcType=CHAR},#{note,jdbcType=VARCHAR}
|
|
|
- ,#{account,jdbcType=VARCHAR},#{accountname,jdbcType=VARCHAR},#{apiv3,jdbcType=VARCHAR}
|
|
|
- ,#{certpath,jdbcType=VARCHAR},#{tripartite,jdbcType=CHAR},#{tripvalue,jdbcType=INTEGER}
|
|
|
- ,#{realtimesplit,jdbcType=INTEGER},#{status,jdbcType=CHAR})
|
|
|
+ ,#{ownerId,jdbcType=INTEGER},#{phone,jdbcType=CHAR},#{note,jdbcType=VARCHAR}
|
|
|
+ ,#{account,jdbcType=VARCHAR},#{accountName,jdbcType=VARCHAR},#{accountType,jdbcType=CHAR}
|
|
|
+ ,#{relation,jdbcType=CHAR},#{apiv3,jdbcType=VARCHAR},#{certPath,jdbcType=VARCHAR}
|
|
|
+ ,#{tripartite,jdbcType=CHAR},#{tripvalue,jdbcType=INTEGER},#{realtimeSplit,jdbcType=INTEGER}
|
|
|
+ ,#{status,jdbcType=CHAR},#{totalIncome,jdbcType=INTEGER},#{totalSplit,jdbcType=INTEGER}
|
|
|
+ ,#{totalCashOut,jdbcType=INTEGER},#{totalRefund,jdbcType=INTEGER},#{balance,jdbcType=INTEGER}
|
|
|
+ )
|
|
|
</insert>
|
|
|
<insert id="insertSelective" keyColumn="id" keyProperty="id" parameterType="com.mofangchuxing.aska.dao.domain.AskaRetails" useGeneratedKeys="true">
|
|
|
insert into aska_retails
|
|
@@ -73,17 +102,24 @@
|
|
|
<if test="type != null">type,</if>
|
|
|
<if test="lat != null">lat,</if>
|
|
|
<if test="lng != null">lng,</if>
|
|
|
- <if test="ownerid != null">ownerId,</if>
|
|
|
+ <if test="ownerId != null">ownerId,</if>
|
|
|
<if test="phone != null">phone,</if>
|
|
|
<if test="note != null">note,</if>
|
|
|
<if test="account != null">account,</if>
|
|
|
- <if test="accountname != null">accountName,</if>
|
|
|
+ <if test="accountName != null">accountName,</if>
|
|
|
+ <if test="accountType != null">accountType,</if>
|
|
|
+ <if test="relation != null">relation,</if>
|
|
|
<if test="apiv3 != null">apiv3,</if>
|
|
|
- <if test="certpath != null">certPath,</if>
|
|
|
+ <if test="certPath != null">certPath,</if>
|
|
|
<if test="tripartite != null">tripartite,</if>
|
|
|
<if test="tripvalue != null">tripvalue,</if>
|
|
|
- <if test="realtimesplit != null">realtimeSplit,</if>
|
|
|
+ <if test="realtimeSplit != null">realtimeSplit,</if>
|
|
|
<if test="status != null">status,</if>
|
|
|
+ <if test="totalIncome != null">totalIncome,</if>
|
|
|
+ <if test="totalSplit != null">totalSplit,</if>
|
|
|
+ <if test="totalCashOut != null">totalCashOut,</if>
|
|
|
+ <if test="totalRefund != null">totalRefund,</if>
|
|
|
+ <if test="balance != null">balance,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
<if test="id != null">#{id,jdbcType=INTEGER},</if>
|
|
@@ -92,17 +128,24 @@
|
|
|
<if test="type != null">#{type,jdbcType=CHAR},</if>
|
|
|
<if test="lat != null">#{lat,jdbcType=DOUBLE},</if>
|
|
|
<if test="lng != null">#{lng,jdbcType=DOUBLE},</if>
|
|
|
- <if test="ownerid != null">#{ownerid,jdbcType=INTEGER},</if>
|
|
|
+ <if test="ownerId != null">#{ownerId,jdbcType=INTEGER},</if>
|
|
|
<if test="phone != null">#{phone,jdbcType=CHAR},</if>
|
|
|
<if test="note != null">#{note,jdbcType=VARCHAR},</if>
|
|
|
<if test="account != null">#{account,jdbcType=VARCHAR},</if>
|
|
|
- <if test="accountname != null">#{accountname,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="accountName != null">#{accountName,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="accountType != null">#{accountType,jdbcType=CHAR},</if>
|
|
|
+ <if test="relation != null">#{relation,jdbcType=CHAR},</if>
|
|
|
<if test="apiv3 != null">#{apiv3,jdbcType=VARCHAR},</if>
|
|
|
- <if test="certpath != null">#{certpath,jdbcType=VARCHAR},</if>
|
|
|
+ <if test="certPath != null">#{certPath,jdbcType=VARCHAR},</if>
|
|
|
<if test="tripartite != null">#{tripartite,jdbcType=CHAR},</if>
|
|
|
<if test="tripvalue != null">#{tripvalue,jdbcType=INTEGER},</if>
|
|
|
- <if test="realtimesplit != null">#{realtimesplit,jdbcType=INTEGER},</if>
|
|
|
+ <if test="realtimeSplit != null">#{realtimeSplit,jdbcType=INTEGER},</if>
|
|
|
<if test="status != null">#{status,jdbcType=CHAR},</if>
|
|
|
+ <if test="totalIncome != null">#{totalIncome,jdbcType=INTEGER},</if>
|
|
|
+ <if test="totalSplit != null">#{totalSplit,jdbcType=INTEGER},</if>
|
|
|
+ <if test="totalCashOut != null">#{totalCashOut,jdbcType=INTEGER},</if>
|
|
|
+ <if test="totalRefund != null">#{totalRefund,jdbcType=INTEGER},</if>
|
|
|
+ <if test="balance != null">#{balance,jdbcType=INTEGER},</if>
|
|
|
</trim>
|
|
|
</insert>
|
|
|
<update id="updateByPrimaryKeySelective" parameterType="com.mofangchuxing.aska.dao.domain.AskaRetails">
|
|
@@ -123,8 +166,8 @@
|
|
|
<if test="lng != null">
|
|
|
lng = #{lng,jdbcType=DOUBLE},
|
|
|
</if>
|
|
|
- <if test="ownerid != null">
|
|
|
- ownerId = #{ownerid,jdbcType=INTEGER},
|
|
|
+ <if test="ownerId != null">
|
|
|
+ ownerId = #{ownerId,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="phone != null">
|
|
|
phone = #{phone,jdbcType=CHAR},
|
|
@@ -135,14 +178,20 @@
|
|
|
<if test="account != null">
|
|
|
account = #{account,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="accountname != null">
|
|
|
- accountName = #{accountname,jdbcType=VARCHAR},
|
|
|
+ <if test="accountName != null">
|
|
|
+ accountName = #{accountName,jdbcType=VARCHAR},
|
|
|
+ </if>
|
|
|
+ <if test="accountType != null">
|
|
|
+ accountType = #{accountType,jdbcType=CHAR},
|
|
|
+ </if>
|
|
|
+ <if test="relation != null">
|
|
|
+ relation = #{relation,jdbcType=CHAR},
|
|
|
</if>
|
|
|
<if test="apiv3 != null">
|
|
|
apiv3 = #{apiv3,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
- <if test="certpath != null">
|
|
|
- certPath = #{certpath,jdbcType=VARCHAR},
|
|
|
+ <if test="certPath != null">
|
|
|
+ certPath = #{certPath,jdbcType=VARCHAR},
|
|
|
</if>
|
|
|
<if test="tripartite != null">
|
|
|
tripartite = #{tripartite,jdbcType=CHAR},
|
|
@@ -150,12 +199,27 @@
|
|
|
<if test="tripvalue != null">
|
|
|
tripvalue = #{tripvalue,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
- <if test="realtimesplit != null">
|
|
|
- realtimeSplit = #{realtimesplit,jdbcType=INTEGER},
|
|
|
+ <if test="realtimeSplit != null">
|
|
|
+ realtimeSplit = #{realtimeSplit,jdbcType=INTEGER},
|
|
|
</if>
|
|
|
<if test="status != null">
|
|
|
status = #{status,jdbcType=CHAR},
|
|
|
</if>
|
|
|
+ <if test="totalIncome != null">
|
|
|
+ totalIncome = #{totalIncome,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="totalSplit != null">
|
|
|
+ totalSplit = #{totalSplit,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="totalCashOut != null">
|
|
|
+ totalCashOut = #{totalCashOut,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="totalRefund != null">
|
|
|
+ totalRefund = #{totalRefund,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
+ <if test="balance != null">
|
|
|
+ balance = #{balance,jdbcType=INTEGER},
|
|
|
+ </if>
|
|
|
</set>
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
@@ -167,17 +231,24 @@
|
|
|
type = #{type,jdbcType=CHAR},
|
|
|
lat = #{lat,jdbcType=DOUBLE},
|
|
|
lng = #{lng,jdbcType=DOUBLE},
|
|
|
- ownerId = #{ownerid,jdbcType=INTEGER},
|
|
|
+ ownerId = #{ownerId,jdbcType=INTEGER},
|
|
|
phone = #{phone,jdbcType=CHAR},
|
|
|
note = #{note,jdbcType=VARCHAR},
|
|
|
account = #{account,jdbcType=VARCHAR},
|
|
|
- accountName = #{accountname,jdbcType=VARCHAR},
|
|
|
+ accountName = #{accountName,jdbcType=VARCHAR},
|
|
|
+ accountType = #{accountType,jdbcType=CHAR},
|
|
|
+ relation = #{relation,jdbcType=CHAR},
|
|
|
apiv3 = #{apiv3,jdbcType=VARCHAR},
|
|
|
- certPath = #{certpath,jdbcType=VARCHAR},
|
|
|
+ certPath = #{certPath,jdbcType=VARCHAR},
|
|
|
tripartite = #{tripartite,jdbcType=CHAR},
|
|
|
tripvalue = #{tripvalue,jdbcType=INTEGER},
|
|
|
- realtimeSplit = #{realtimesplit,jdbcType=INTEGER},
|
|
|
- status = #{status,jdbcType=CHAR}
|
|
|
+ realtimeSplit = #{realtimeSplit,jdbcType=INTEGER},
|
|
|
+ status = #{status,jdbcType=CHAR},
|
|
|
+ totalIncome = #{totalIncome,jdbcType=INTEGER},
|
|
|
+ totalSplit = #{totalSplit,jdbcType=INTEGER},
|
|
|
+ totalCashOut = #{totalCashOut,jdbcType=INTEGER},
|
|
|
+ totalRefund = #{totalRefund,jdbcType=INTEGER},
|
|
|
+ balance = #{balance,jdbcType=INTEGER}
|
|
|
where id = #{id,jdbcType=INTEGER}
|
|
|
</update>
|
|
|
</mapper>
|