ソースを参照

新增收货地址编码到订单中

LiRong 4 ヶ月 前
コミット
8e62fd722e

+ 0 - 10
leromro-core/src/main/java/com/leromro/core/domain/Address.java

@@ -56,16 +56,6 @@ public class Address extends BaseEntity
     @ApiModelProperty("年龄")
     private Integer age;
 
-    /** 是否有传染病  0否  1是 */
-    @TableField("is_contagion")
-    @ApiModelProperty("是否有传染病  0否  1是")
-    private Integer isContagion;
-
-    /** 传染病内容 */
-    @TableField("have_contagion")
-    @ApiModelProperty("传染病内容")
-    private String haveContagion;
-
     /** 省级区划编号 */
     @TableField("province_code")
     @ApiModelProperty("省级区划编号")

+ 15 - 0
leromro-core/src/main/java/com/leromro/core/domain/MainOrders.java

@@ -148,6 +148,21 @@ public class MainOrders extends BaseEntity
     @ApiModelProperty("受服务地址手机号")
     private String clientTelephone;
 
+    /** 省级区划编号 */
+    @TableField("province_code")
+    @ApiModelProperty("省级区划编号")
+    private String provinceCode;
+
+    /** 市级编号 */
+    @TableField("city_code")
+    @ApiModelProperty("市级编号")
+    private String cityCode;
+
+    /** 区级区划编号 */
+    @TableField("district_code")
+    @ApiModelProperty("区级区划编号")
+    private String districtCode;
+
     /** 是否删除 0未删除,1已删除 */
     @Excel(name = "是否删除 0未删除,1已删除")
     @ApiModelProperty("是否删除 0未删除,1已删除")

+ 3 - 1
leromro-core/src/main/java/com/leromro/core/service/impl/MainOrderServiceImpl.java

@@ -2,7 +2,6 @@ package com.leromro.core.service.impl;
 
 import cn.hutool.core.lang.Snowflake;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.leromro.common.utils.SecurityUtils;
 import com.leromro.core.domain.*;
@@ -100,6 +99,9 @@ public class MainOrderServiceImpl extends ServiceImpl<MainOrdersMapper, MainOrde
         orders.setAddress(address.getAddress());
         orders.setClientName(address.getName());
         orders.setClientTelephone(address.getTelephone());
+        orders.setProvinceCode(address.getProvinceCode());
+        orders.setCityCode(address.getCityCode());
+        orders.setDistrictCode(address.getDistrictCode());
         long orderId = snowflake.nextId();
         orders.setMainOrderId(String.valueOf(orderId));
         orders.setOrderStatus("1");

+ 1 - 9
leromro-core/src/main/resources/mapper/core/AddressMapper.xml

@@ -11,8 +11,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="name"    column="name"    />
         <result property="sex"    column="sex"    />
         <result property="age"    column="age"    />
-        <result property="isContagion"    column="is_contagion"    />
-        <result property="haveContagion"    column="have_contagion"    />
         <result property="provinceCode"    column="province_code"    />
         <result property="provinceName"    column="province_name"    />
         <result property="cityCode"    column="city_code"    />
@@ -31,7 +29,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectAddressVo">
-        select address_id, user_id, telephone, name,sex, age, is_contagion, have_contagion, province_code, province_name, city_code, city_name, district_code, district_name, address, is_default, is_delete, label, create_time, create_by, update_time, update_by, remark from l_address
+        select address_id, user_id, telephone, name,sex, age, province_code, province_name, city_code, city_name, district_code, district_name, address, is_default, is_delete, label, create_time, create_by, update_time, update_by, remark from l_address
     </sql>
 
 
@@ -79,8 +77,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="name != null">name,</if>
             <if test="sex != null">sex,</if>
             <if test="age != null">age,</if>
-            <if test="isContagion != null">is_contagion,</if>
-            <if test="haveContagion != null">have_contagion,</if>
             <if test="provinceCode != null">province_code,</if>
             <if test="provinceName != null">province_name,</if>
             <if test="cityCode != null">city_code,</if>
@@ -103,8 +99,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="name != null">#{name},</if>
             <if test="sex != null">#{sex},</if>
             <if test="age != null">#{age},</if>
-            <if test="isContagion != null">#{isContagion},</if>
-            <if test="haveContagion != null">#{haveContagion},</if>
             <if test="provinceCode != null">#{provinceCode},</if>
             <if test="provinceName != null">#{provinceName},</if>
             <if test="cityCode != null">#{cityCode},</if>
@@ -131,8 +125,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="name != null">name = #{name},</if>
             <if test="sex != null">sex = #{sex},</if>
             <if test="age != null">age = #{age},</if>
-            <if test="isContagion != null">is_contagion = #{isContagion},</if>
-            <if test="haveContagion != null">have_contagion = #{haveContagion},</if>
             <if test="provinceCode != null">province_code = #{provinceCode},</if>
             <if test="provinceName != null">province_name = #{provinceName},</if>
             <if test="cityCode != null">city_code = #{cityCode},</if>