From 55e7f47b26b2087f7da86f5257dd48e72fb364b6 Mon Sep 17 00:00:00 2001 From: wuzeyu <1223318623@qq.com> Date: 星期五, 28 六月 2024 10:31:21 +0800 Subject: [PATCH] 修改农户查询接口返回驼峰命名,修改农户修改SQL语句 --- pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml | 35 +++++++++++++++++++++++++++++++---- 1 files changed, 31 insertions(+), 4 deletions(-) diff --git a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml index 5d33225..faeb515 100644 --- a/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml +++ b/pipIrr-platform/pipIrr-global/src/main/resources/mapper/SeClientMapper.xml @@ -28,7 +28,7 @@ </resultMap> <sql id="Base_Column_List"> <!--@mbg.generated--> - id, countyId, townId, villageId, blockId, divideId, `name`, virtualId, clientNum, + id, countyId, townId, villageId, blockid, divideId, `name`, virtualId, clientNum, districtNum, districtTitle, phone, idCard, area, typeId, address, remarks, `operator`, operateDt, disabled, deleted </sql> @@ -56,7 +56,7 @@ operateDt, disabled, deleted ) values (#{id,jdbcType=BIGINT}, #{countyid,jdbcType=BIGINT}, #{townid,jdbcType=BIGINT}, - #{villageid,jdbcType=BIGINT}, #{blockid,jdbcType=BIGINT}, #{divideid,jdbcType=BIGINT}, + #{villageid,jdbcType=BIGINT}, #{blockid,jdbcType=BIGINT}, #{divideid,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{virtualid,jdbcType=BIGINT}, #{clientnum,jdbcType=VARCHAR}, #{districtnum,jdbcType=BIGINT}, #{districttitle,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, #{idcard,jdbcType=VARCHAR}, #{area,jdbcType=DOUBLE}, #{typeid,jdbcType=BIGINT}, @@ -286,7 +286,7 @@ address = #{address,jdbcType=VARCHAR}, remarks = #{remarks,jdbcType=VARCHAR}, `operator` = #{operator,jdbcType=BIGINT}, - operateDt = #{operatedt,jdbcType=TIMESTAMP}, + operateDt = #{operatedt,jdbcType=TIMESTAMP} <!-- disabled = #{disabled,jdbcType=TINYINT},--> <!-- deleted = #{deleted,jdbcType=TINYINT}--> where id = #{id,jdbcType=BIGINT} @@ -341,7 +341,7 @@ CAST(cli.villageId AS char) AS villageId, dis_village.name AS villageName, CAST(cli.blockId AS char) AS blockId, - blo.name AS bolckName, + blo.name AS blockName, CAST(cli.divideId AS char) AS divideId, divi.name AS divideName, CAST(cli.typeId AS char) AS waterTypeId, @@ -406,6 +406,11 @@ SELECT id FROM se_client WHERE clientNum = ${clientNum} </select> + <!--鏍规嵁鐢佃瘽鍙风爜鑾峰彇鍐滄埛ID--> + <select id="getClientIdByPhone" resultType="java.lang.Long"> + SELECT id FROM se_client WHERE phone = #{phoneNumber} + </select> + <!--鏍规嵁鍐滄埛ID閫昏緫鍒犻櫎鍐滄埛--> <update id="deleteClientById" parameterType="java.lang.Long"> update se_client set deleted = 1 @@ -431,4 +436,26 @@ SELECT id, typeName from se_water_type </select> + <!--鑾峰彇鍐滄埛鍩烘湰淇℃伅锛屽皬绋嬪簭棣栭〉浣跨敤--> + <select id="getSimpleClientInfo" resultType="com.dy.pipIrrGlobal.voSe.VoClientWechat"> + SELECT + CAST(ope.id AS char) AS sessionId, + CAST(cli.id AS char) AS clientId, + cli.name AS clientName, + cli.phone, + CAST(cli.blockId AS char) AS blockId + FROM se_open_id ope + INNER JOIN se_client cli ON ope.client_id = cli.id + <where> + <if test = "sessionId != null"> + AND ope.id = #{sessionId} + </if> + + <if test = "openId != null"> + AND ope.open_id = #{openId} + </if> + </where> + LIMIT 0,1 + </select> + </mapper> \ No newline at end of file -- Gitblit v1.8.0