|
@@ -259,7 +259,7 @@
|
|
member_no, member_amt, print_count, car_no, customer_phone, customer_grade, oil_type)
|
|
member_no, member_amt, print_count, car_no, customer_phone, customer_grade, oil_type)
|
|
VALUES (
|
|
VALUES (
|
|
#{orderId,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{oilGun,jdbcType=VARCHAR},
|
|
#{orderId,jdbcType=INTEGER}, #{orderNo,jdbcType=VARCHAR}, #{oilGun,jdbcType=VARCHAR},
|
|
- #{oilName,jdbcType=VARCHAR}, #{oilPirce,jdbcType=VARCHAR}, #{consumerId,jdbcType=INTEGER}, #{consumer,jdbcType=VARCHAR},
|
|
|
|
|
|
+ #{oilName,jdbcType=VARCHAR}, #{oilPirce,jdbcType=DOUBLE}, #{consumerId,jdbcType=INTEGER}, #{consumer,jdbcType=VARCHAR},
|
|
#{amt,jdbcType=DOUBLE}, #{stationId,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR},
|
|
#{amt,jdbcType=DOUBLE}, #{stationId,jdbcType=INTEGER}, #{status,jdbcType=VARCHAR},
|
|
#{orderLiters,jdbcType=VARCHAR}, #{payType,jdbcType=VARCHAR}, #{payWay,jdbcType=VARCHAR},
|
|
#{orderLiters,jdbcType=VARCHAR}, #{payType,jdbcType=VARCHAR}, #{payWay,jdbcType=VARCHAR},
|
|
#{payDate,jdbcType=TIMESTAMP}, #{oilPersonnel,jdbcType=VARCHAR}, #{createdDate,jdbcType=TIMESTAMP},
|
|
#{payDate,jdbcType=TIMESTAMP}, #{oilPersonnel,jdbcType=VARCHAR}, #{createdDate,jdbcType=TIMESTAMP},
|
|
@@ -416,7 +416,7 @@
|
|
#{oilName,jdbcType=VARCHAR},
|
|
#{oilName,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
<if test="oilPirce != null">
|
|
<if test="oilPirce != null">
|
|
- #{oilPirce,jdbcType=VARCHAR},
|
|
|
|
|
|
+ #{oilPirce,jdbcType=DOUBLE},
|
|
</if>
|
|
</if>
|
|
<if test="consumerId != null">
|
|
<if test="consumerId != null">
|
|
#{consumerId,jdbcType=INTEGER},
|
|
#{consumerId,jdbcType=INTEGER},
|
|
@@ -669,7 +669,7 @@
|
|
customer_grade = #{record.customerGrade,jdbcType=VARCHAR},
|
|
customer_grade = #{record.customerGrade,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
<if test="oilType != null">
|
|
<if test="oilType != null">
|
|
- oil_type = #{record.oilType,jdbcType=VARCHAR}
|
|
|
|
|
|
+ oil_type = #{record.oilType,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
</set>
|
|
</set>
|
|
<if test="_parameter != null">
|
|
<if test="_parameter != null">
|
|
@@ -692,7 +692,7 @@
|
|
pay_date = #{payDate,jdbcType=TIMESTAMP},
|
|
pay_date = #{payDate,jdbcType=TIMESTAMP},
|
|
</if>
|
|
</if>
|
|
<if test="printCount != null">
|
|
<if test="printCount != null">
|
|
- print_count = #{printCount,jdbcType=INTEGER}
|
|
|
|
|
|
+ print_count = #{printCount,jdbcType=INTEGER},
|
|
</if>
|
|
</if>
|
|
</set>
|
|
</set>
|
|
<where>
|
|
<where>
|
|
@@ -700,6 +700,36 @@
|
|
</where>
|
|
</where>
|
|
</update>
|
|
</update>
|
|
|
|
|
|
|
|
+
|
|
|
|
+ <!--根据用户登录openId 获取用户信息用于插入客户表-->
|
|
|
|
+ <select id="getUserInfoByOpenId" parameterType="com.platform.yijia.pojo.AppUserInfo" resultType="com.platform.yijia.pojo.AppUserInfo">
|
|
|
|
+ SELECT
|
|
|
|
+ user_id AS userId,
|
|
|
|
+ mina_openid AS minaOpenid,
|
|
|
|
+ blog_openid AS blogOpenid,
|
|
|
|
+ registe_date AS registeDate,
|
|
|
|
+ mobile_phone AS mobilePhone,
|
|
|
|
+ user_type AS userType
|
|
|
|
+ FROM
|
|
|
|
+ app_user_info
|
|
|
|
+ WHERE
|
|
|
|
+ mobile_phone = (
|
|
|
|
+ SELECT
|
|
|
|
+ mobile_phone
|
|
|
|
+ FROM
|
|
|
|
+ app_user_info
|
|
|
|
+ <where>
|
|
|
|
+ <if test="blogOpenid !=null and blogOpenid !='' ">
|
|
|
|
+ blog_openid = #{blogOpenid}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="minaOpenid !=null and minaOpenid !='' ">
|
|
|
|
+ mina_openid = #{minaOpenid}
|
|
|
|
+ </if>
|
|
|
|
+ </where>
|
|
|
|
+ )
|
|
|
|
+ </select>
|
|
|
|
+
|
|
|
|
+
|
|
<!-- 判断客户表是否已存在-->
|
|
<!-- 判断客户表是否已存在-->
|
|
<select id="isExistCustomer" parameterType="com.platform.yijia.pojo.CustomerManage" resultType="com.platform.yijia.pojo.CustomerManage">
|
|
<select id="isExistCustomer" parameterType="com.platform.yijia.pojo.CustomerManage" resultType="com.platform.yijia.pojo.CustomerManage">
|
|
SELECT
|
|
SELECT
|
|
@@ -709,6 +739,9 @@
|
|
phone_number AS phoneNumber,
|
|
phone_number AS phoneNumber,
|
|
regtime AS regtime,
|
|
regtime AS regtime,
|
|
station_name AS stationName,
|
|
station_name AS stationName,
|
|
|
|
+ oil_name AS oilName,
|
|
|
|
+ liters AS liters,
|
|
|
|
+ amt AS amt,
|
|
cy_liters AS cyLiters,
|
|
cy_liters AS cyLiters,
|
|
qy_liters AS qyLiters,
|
|
qy_liters AS qyLiters,
|
|
cy_amt AS cyAmt,
|
|
cy_amt AS cyAmt,
|
|
@@ -716,14 +749,14 @@
|
|
FROM
|
|
FROM
|
|
customer_manage
|
|
customer_manage
|
|
<where>
|
|
<where>
|
|
- <if test="blogOpenid !=null and blogOpenid !='' ">
|
|
|
|
- blog_openid = #{blogOpenid}
|
|
|
|
|
|
+ <if test="stationId !=null and stationId !='' ">
|
|
|
|
+ station_id = #{stationId}
|
|
</if>
|
|
</if>
|
|
- <if test="minaOpenid !=null and minaOpenid !='' ">
|
|
|
|
- AND mina_openid = #{minaOpenid}
|
|
|
|
|
|
+ <if test="phoneNumber !=null and phoneNumber !='' ">
|
|
|
|
+ AND phone_number = #{phoneNumber}
|
|
</if>
|
|
</if>
|
|
- <if test="stationId !=null and stationId !='' ">
|
|
|
|
- AND station_id = #{stationId}
|
|
|
|
|
|
+ <if test="oilName !=null and oilName !='' ">
|
|
|
|
+ AND oil_name = #{oilName}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</select>
|
|
</select>
|
|
@@ -745,6 +778,17 @@
|
|
<if test="stationName !=null ">
|
|
<if test="stationName !=null ">
|
|
station_name = #{stationName},
|
|
station_name = #{stationName},
|
|
</if>
|
|
</if>
|
|
|
|
+ <if test="oilName !=null ">
|
|
|
|
+ oil_name = #{oilName},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="liters !=null ">
|
|
|
|
+ liters = #{liters},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="amt !=null ">
|
|
|
|
+ amt = #{amt},
|
|
|
|
+ </if>
|
|
|
|
+
|
|
|
|
+
|
|
<if test="cyLiters !=null ">
|
|
<if test="cyLiters !=null ">
|
|
cy_liters = #{cyLiters},
|
|
cy_liters = #{cyLiters},
|
|
</if>
|
|
</if>
|
|
@@ -759,14 +803,14 @@
|
|
</if>
|
|
</if>
|
|
</set>
|
|
</set>
|
|
<where>
|
|
<where>
|
|
- <if test="blogOpenid != null and blogOpenid !='' ">
|
|
|
|
- blog_openid = #{blogOpenid}
|
|
|
|
|
|
+ <if test="stationId != null and stationId !='' ">
|
|
|
|
+ station_id = #{stationId}
|
|
</if>
|
|
</if>
|
|
- <if test="minaOpenid != null and minaOpenid !='' ">
|
|
|
|
- mina_openid = #{minaOpenid}
|
|
|
|
|
|
+ <if test="phoneNumber !=null and phoneNumber !='' ">
|
|
|
|
+ AND phone_number = #{phoneNumber}
|
|
</if>
|
|
</if>
|
|
- <if test="stationId != null and stationId !='' ">
|
|
|
|
- AND station_id = #{stationId}
|
|
|
|
|
|
+ <if test="oilName !=null and oilName !='' ">
|
|
|
|
+ AND oil_name = #{oilName}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
</update>
|
|
</update>
|
|
@@ -814,6 +858,16 @@
|
|
station_name,
|
|
station_name,
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
+ <if test="oilName !=null ">
|
|
|
|
+ oil_name,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="liters !=null ">
|
|
|
|
+ liters,
|
|
|
|
+ </if>
|
|
|
|
+ <if test="amt !=null ">
|
|
|
|
+ amt,
|
|
|
|
+ </if>
|
|
|
|
+
|
|
<if test="cyGrade !=null ">
|
|
<if test="cyGrade !=null ">
|
|
cy_grade,
|
|
cy_grade,
|
|
</if>
|
|
</if>
|
|
@@ -889,6 +943,16 @@
|
|
#{stationName, jdbcType=VARCHAR},
|
|
#{stationName, jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
|
|
|
|
|
|
+ <if test="oilName !=null ">
|
|
|
|
+ #{oilName},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="liters !=null ">
|
|
|
|
+ #{liters},
|
|
|
|
+ </if>
|
|
|
|
+ <if test="amt !=null ">
|
|
|
|
+ #{amt},
|
|
|
|
+ </if>
|
|
|
|
+
|
|
<if test="cyGrade !=null ">
|
|
<if test="cyGrade !=null ">
|
|
#{cyGrade},
|
|
#{cyGrade},
|
|
</if>
|
|
</if>
|
|
@@ -994,7 +1058,7 @@
|
|
oil_name = #{oilName,jdbcType=VARCHAR},
|
|
oil_name = #{oilName,jdbcType=VARCHAR},
|
|
</if>
|
|
</if>
|
|
<if test="oilPirce != null">
|
|
<if test="oilPirce != null">
|
|
- oil_pirce = #{oilPirce,jdbcType=VARCHAR},
|
|
|
|
|
|
+ oil_pirce = #{oilPirce,jdbcType=DOUBLE},
|
|
</if>
|
|
</if>
|
|
<if test="consumerId != null">
|
|
<if test="consumerId != null">
|
|
consumer_id = #{consumerId,jdbcType=INTEGER},
|
|
consumer_id = #{consumerId,jdbcType=INTEGER},
|
|
@@ -1116,7 +1180,7 @@
|
|
set order_no = #{orderNo,jdbcType=VARCHAR},
|
|
set order_no = #{orderNo,jdbcType=VARCHAR},
|
|
oil_gun = #{oilGun,jdbcType=VARCHAR},
|
|
oil_gun = #{oilGun,jdbcType=VARCHAR},
|
|
oil_name = #{oilName,jdbcType=VARCHAR},
|
|
oil_name = #{oilName,jdbcType=VARCHAR},
|
|
- oil_pirce = #{oilPirce,jdbcType=VARCHAR},
|
|
|
|
|
|
+ oil_pirce = #{oilPirce,jdbcType=DOUBLE},
|
|
consumer_id = #{consumerId,jdbcType=INTEGER},
|
|
consumer_id = #{consumerId,jdbcType=INTEGER},
|
|
consumer = #{consumer,jdbcType=VARCHAR},
|
|
consumer = #{consumer,jdbcType=VARCHAR},
|
|
amt = #{amt,jdbcType=VARCHAR},
|
|
amt = #{amt,jdbcType=VARCHAR},
|