소스 검색

Merge branch 'dev' of ssh://10.10.100.21/source/saas-platform into dev

chenw 6 년 전
부모
커밋
59bd283ac8

+ 10 - 0
applications/money/money-dto/src/main/java/com/usoftchina/saas/money/po/ApcheckDetail.java

@@ -30,8 +30,18 @@ public class ApcheckDetail extends CommonBaseEntity{
 
     private String pr_spec;
 
+    private String pr_brand;
+
     private String pr_orispeccode;
 
+    public String getPr_brand() {
+        return pr_brand;
+    }
+
+    public void setPr_brand(String pr_brand) {
+        this.pr_brand = pr_brand;
+    }
+
     public String getPr_detail() {
         return pr_detail;
     }

+ 2 - 2
applications/money/money-server/src/main/java/com/usoftchina/saas/money/service/impl/VerificationServiceImpl.java

@@ -604,7 +604,7 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
                 for(VerificationdetDTO det : items1){
                     Double nowbalanceDet = det.getVd_nowbalance()==null?new Double(0):det.getVd_nowbalance();
                     Subledger sub = subledgerMapper.selectByPrimaryKey(Math.toIntExact(det.getVd_slid()));
-                    if (sub != null && sub.getSl_preamount() != 0 &&
+                    if (sub != null && sub.getSl_preamount() !=null && sub.getSl_preamount() != 0 &&
                             ("receivable_to_receivable".equals(verificationDTO.getVc_kind()) || "payable_to_payable".equals(verificationDTO.getVc_kind()))) {
                         nowbalanceDet=-1*nowbalanceDet;
                     }
@@ -898,7 +898,7 @@ public class VerificationServiceImpl extends CommonBaseServiceImpl<VerificationM
         for(Verificationdet det : items1){
             Double nowbalanceDet = det.getVd_nowbalance()==null?new Double(0):det.getVd_nowbalance();
             Subledger sub = subledgerMapper.selectByPrimaryKey(Math.toIntExact(det.getVd_slid()));
-            if (sub != null && sub.getSl_preamount() != 0 &&
+            if (sub != null && sub.getSl_preamount() != null && sub.getSl_preamount() != 0 &&
                     ("receivable_to_receivable".equals(verificationDTO.getVc_kind()) || "payable_to_payable".equals(verificationDTO.getVc_kind())
                     || "应收转应收".equals(verificationDTO.getVc_kind()) || "应付转应付".equals(verificationDTO.getVc_kind()))) {
                 nowbalanceDet=-1*nowbalanceDet;

+ 3 - 2
applications/money/money-server/src/main/resources/mapper/ApcheckMapper.xml

@@ -51,8 +51,9 @@
     <result column="creatorId" property="creatorId" jdbcType="INTEGER" />
     <result column="creatorName" property="creatorName" jdbcType="VARCHAR" />
     <result column="pr_detail" property="pr_detail" jdbcType="VARCHAR" />
-    <result column="creatorName" property="pr_spec" jdbcType="VARCHAR" />
-    <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR" />
+    <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR" />
+    <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR"/>
+    <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR"/>
   </resultMap>
 
   <sql id="Base_Column_List" >

+ 9 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/controller/PurchaseController.java

@@ -245,4 +245,13 @@ public class PurchaseController {
     public Result turnPurchase(@RequestBody InquiryTurnPurchaseReqDTO inquiryTurnPurchaseReqDTO){
         return Result.success(purchaseService.turnPurchase(inquiryTurnPurchaseReqDTO));
     }
+
+    /**
+     * 模板数据转正式采购单
+     */
+    @RequestMapping("/saveToFormal")
+    public Result saveToFormal(Integer id, boolean update) {
+        purchaseService.saveToFormal(id, update);
+        return Result.success();
+    }
 }

+ 22 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/DataImportMapper.java

@@ -0,0 +1,22 @@
+package com.usoftchina.saas.purchase.mapper;
+
+import com.usoftchina.saas.commons.po.DataImport;
+import com.usoftchina.saas.commons.po.DataImportDetail;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+public interface DataImportMapper {
+    void deleteByCaller(@Param("caller") String caller, @Param("companyid") Long companyid);
+    int insertSelective(DataImport record);
+
+    void updateErr(@Param("err") String err, @Param("id") Integer id);
+
+    List<DataImportDetail> selectDataById(Integer id);
+
+    DataImportDetail selectMainBycode(@Param("code") String code, @Param("id") int id, @Param("companyid") Long companyId);
+
+    void updateDataImport(Integer id);
+
+    void updateDataImportError(@Param("err") String err,@Param("id") int id);
+}

+ 11 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/mapper/PurchaseMapper.java

@@ -3,6 +3,9 @@ package com.usoftchina.saas.purchase.mapper;
 import com.usoftchina.saas.base.mapper.CommonBaseMapper;
 
 import com.usoftchina.saas.commons.dto.DocBaseDTO;
+import com.usoftchina.saas.document.dto.ProductDTO;
+import com.usoftchina.saas.document.entities.Address;
+import com.usoftchina.saas.document.entities.Vendor;
 import com.usoftchina.saas.purchase.po.Purchase;
 import org.apache.ibatis.annotations.Param;
 
@@ -44,4 +47,12 @@ public interface PurchaseMapper extends CommonBaseMapper<Purchase>{
     Integer checkClose(Long id);
 
     String validateCurrency(@Param("puId") Long piId, @Param("puCurrency") String piCurrency);
+
+    Vendor selectVendorByCode(@Param("code") String vend, @Param("companyid") Long companyId);
+
+    Integer checkCurrency(@Param("name") String currency, @Param("companyId") Long companyId);
+
+    ProductDTO selectProductByCode(@Param("code") String prodcode, @Param("companyid") Long companyId);
+
+    Address selectDefaultAddress(Long companyId);
 }

+ 2 - 0
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/PurchaseService.java

@@ -180,4 +180,6 @@ public interface PurchaseService extends CommonBaseService<PurchaseMapper, Purch
      * @return
      */
     DocBaseDTO turnPurchase(InquiryTurnPurchaseReqDTO inquiryTurnPurchaseReqDTO);
+
+    void saveToFormal(Integer id, boolean update);
 }

+ 107 - 6
applications/purchase/purchase-server/src/main/java/com/usoftchina/saas/purchase/service/impl/PurchaseServiceImpl.java

@@ -3,18 +3,15 @@ package com.usoftchina.saas.purchase.service.impl;
 import com.alibaba.fastjson.JSONObject;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
-import com.netflix.discovery.converters.Auto;
-import com.rabbitmq.tools.json.JSONUtil;
 import com.usoftchina.saas.account.dto.CompanyDTO;
 import com.usoftchina.saas.commons.cache.ConfigsCache;
+import com.usoftchina.saas.commons.po.DataImportDetail;
 import com.usoftchina.saas.document.api.AddressApi;
 import com.usoftchina.saas.document.api.CurrencyApi;
 import com.usoftchina.saas.document.api.ProductApi;
 import com.usoftchina.saas.document.api.VendorApi;
-import com.usoftchina.saas.document.dto.CurrencyDTO;
-import com.usoftchina.saas.document.dto.ProductDTO;
-import com.usoftchina.saas.document.dto.VendorDTO;
-import com.usoftchina.saas.document.dto.VendorListDTO;
+import com.usoftchina.saas.document.dto.*;
+import com.usoftchina.saas.document.entities.Address;
 import com.usoftchina.saas.document.entities.Vendor;
 import com.usoftchina.saas.document.entities.Vendorcontact;
 import com.usoftchina.saas.inquiry.api.InquiryApi;
@@ -115,6 +112,8 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
     private AddressApi addressApi;
     @Autowired
     private ProductApi productApi;
+    @Autowired
+    private DataImportMapper dataImportMapper;
 
     private static final Logger LOGGER = LoggerFactory.getLogger(PurchaseServiceImpl.class);
 
@@ -334,6 +333,108 @@ public class PurchaseServiceImpl extends CommonBaseServiceImpl<PurchaseMapper, P
         return saveFormData(purchaseFormDTO);
     }
 
+    @Override
+    public void saveToFormal(Integer id, boolean update) {
+        if (null == id || "0".equals(id)) {
+            return;
+        }
+        Long companyId = BaseContextHolder.getCompanyId();
+        StringBuilder err = new StringBuilder();
+        List<PurchaseFormDTO> list = new ArrayList<>();
+        PurchaseFormDTO purchaseFormDTO = null;
+        List<DataImportDetail> details = dataImportMapper.selectDataById(id);
+        if (!CollectionUtils.isEmpty(details)) {
+            Map<String, List<DataImportDetail>> datas = CollectionUtils.groupBy(details, DataImportDetail::getDd_codevalue);
+            Integer detno = null;
+            //取统一的交货地址
+            Address address = purchaseMapper.selectDefaultAddress(companyId);
+            String defaultAddress = null;
+            if (null != address) {
+                defaultAddress = address.getAd_address();
+            }
+            for (String code : datas.keySet()) {
+                purchaseFormDTO = new PurchaseFormDTO();
+                List<PurchaseDetailDTO> detailDTOList = new ArrayList<>();
+                List<DataImportDetail> data = datas.get(code);
+                DataImportDetail main = dataImportMapper.selectMainBycode(code, id, companyId);
+                if (StringUtils.isEmpty(main)) {
+                    throw new BizException(BizExceptionCode.BIZ_REPORT_NOTCORRECT);
+                }
+                PurchaseDTO purchaseDTO = JSONObject.parseObject(main.getDd_maindata(), PurchaseDTO.class);
+                //验证供应商编号
+                String vend = purchaseDTO.getPu_vendcode();
+                if (!StringUtils.isEmpty(vend)) {
+                   Vendor vendor = purchaseMapper.selectVendorByCode(vend, companyId);
+                   if (null == vendor) {
+                       err.append("采购订单号: " + purchaseDTO.getPu_code() + " 的供应商编号: "+ vend +" 在系统中不存在,请确认数据是否正确");
+                       break;
+                   }
+                   purchaseDTO.setPu_vendid(vendor.getId().intValue());
+                   purchaseDTO.setPu_vendname(vendor.getVe_name());
+                }
+                //币别验证
+                String currency = purchaseDTO.getPu_currency();
+                if (!StringUtils.isEmpty(currency)) {
+                    Integer count = purchaseMapper.checkCurrency(currency, BaseContextHolder.getCompanyId());
+                    if (count == 0) {
+                        err.append("采购订单号: " + purchaseDTO.getPu_code() + " 的币别: "+ currency +" 在系统中不存在,请确认数据是否正确");
+                        break;
+                    }
+                }
+                //新增
+                purchaseDTO.setId(0l);
+                purchaseDTO.setPu_status(Status.UNAUDITED.getDisplay());
+                purchaseDTO.setPu_statuscode(Status.UNAUDITED.name());
+                purchaseDTO.setPu_date(new Date());
+                purchaseDTO.setCreateTime(new Date());
+                purchaseDTO.setPu_shipaddresscode(defaultAddress);
+                if (null == purchaseDTO.getPu_delivery()) {
+                    purchaseDTO.setPu_delivery(new Date());
+                }
+                //添加从表
+                if (data.size() > 0) {
+                    detno = 1;
+                    for (DataImportDetail detail : data) {
+                        PurchaseDetailDTO purchaseDetailDTO = null;
+                        try {
+                            purchaseDetailDTO = JSONObject.parseObject(detail.getDd_detaildata(), PurchaseDetailDTO.class);
+                        } catch (Exception e) {
+                            continue;
+                        }
+                        if (null != purchaseDetailDTO) {
+                            //验证物料编号
+                            String prodcode = purchaseDetailDTO.getPd_prodcode();
+                            if (!StringUtils.isEmpty(prodcode)) {
+                                ProductDTO product = purchaseMapper.selectProductByCode(prodcode, companyId);
+                                if (null == product) {
+                                    err.append("采购订单号: " + purchaseDTO.getPu_code() + " 的明细料号: "+ prodcode +" 在系统中不存在,请确认数据是否正确");
+                                    break;
+                                }
+                                purchaseDetailDTO.setPd_prodid(product.getId());
+                                purchaseDetailDTO.setPd_detno(detno);
+                                detno++;
+                                detailDTOList.add(purchaseDetailDTO);
+                            }
+                        }
+                    }
+                }
+                //添加至List中
+                purchaseFormDTO.setMain(purchaseDTO);
+                purchaseFormDTO.setItems(detailDTOList);
+                purchaseFormDTO.setCodeModified(true);
+                list.add(purchaseFormDTO);
+            }
+            if (err.length() > 0) {
+                dataImportMapper.updateDataImportError(err.toString(), id);
+                throw new BizException(12345, err.toString());
+            }
+            for (PurchaseFormDTO  dto : list) {
+                saveFormData(dto);
+            }
+            dataImportMapper.updateDataImport(id);
+        }
+    }
+
     /**
      * 创建供应商
      * @param turnPurchaseReqDTO

+ 110 - 0
applications/purchase/purchase-server/src/main/resources/mapper/DataImportMapper.xml

@@ -0,0 +1,110 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
+<mapper namespace="com.usoftchina.saas.purchase.mapper.DataImportMapper" >
+  <resultMap id="DetailMap" type="com.usoftchina.saas.commons.po.DataImportDetail" >
+    <id column="dd_id" property="dd_id" jdbcType="INTEGER" />
+    <result column="dd_maindata" property="dd_maindata" jdbcType="VARCHAR" />
+    <result column="dd_detno" property="dd_detno" jdbcType="INTEGER" />
+    <result column="dd_diid" property="dd_diid" jdbcType="INTEGER" />
+    <result column="dd_checked" property="dd_checked" jdbcType="INTEGER" />
+    <result column="dd_success" property="dd_success" jdbcType="INTEGER" />
+    <result column="dd_toformal" property="dd_toformal" jdbcType="INTEGER" />
+    <result column="companyid" property="companyid" jdbcType="INTEGER" />
+    <result column="dd_detaildata" property="dd_detaildata" jdbcType="VARCHAR" />
+    <result column="dd_codevalue" property="dd_codevalue" jdbcType="VARCHAR" />
+  </resultMap>
+
+  <delete id="deleteByCaller">
+  delete from data_import where di_caller=#{caller} and companyid=#{companyid} and
+  il_toformal=0 and il_result is not null
+</delete>
+
+  <insert id="insertSelective" parameterType="com.usoftchina.saas.commons.po.DataImport" >
+    <selectKey  resultType="java.lang.Integer" keyProperty="di_id">
+      SELECT LAST_INSERT_ID() AS ID
+    </selectKey>
+    insert into data_import
+    <trim prefix="(" suffix=")" suffixOverrides="," >
+      <if test="di_caller != null" >
+        di_caller,
+      </if>
+      <if test="companyid != null" >
+        companyid,
+      </if>
+      <if test="di_date != null" >
+        di_date,
+      </if>
+      <if test="di_count != null" >
+        di_count,
+      </if>
+      <if test="di_result != null" >
+        di_result,
+      </if>
+      <if test="di_success != null" >
+        di_success,
+      </if>
+      <if test="di_man != null" >
+        di_man,
+      </if>
+      <if test="di_toformal != null" >
+        di_toformal,
+      </if>
+    </trim>
+    <trim prefix="values (" suffix=")" suffixOverrides="," >
+      <if test="di_caller != null" >
+        #{di_caller,jdbcType=VARCHAR},
+      </if>
+      <if test="companyid != null" >
+        #{companyid,jdbcType=INTEGER},
+      </if>
+      <if test="di_date != null" >
+        #{di_date,jdbcType=TIMESTAMP},
+      </if>
+      <if test="di_count != null" >
+        #{di_count,jdbcType=INTEGER},
+      </if>
+      <if test="di_result != null" >
+        #{di_result,jdbcType=VARCHAR},
+      </if>
+      <if test="di_success != null" >
+        #{di_success,jdbcType=INTEGER},
+      </if>
+      <if test="di_man != null" >
+        #{di_man,jdbcType=VARCHAR},
+      </if>
+      <if test="di_toformal != null" >
+        #{di_toformal,jdbcType=INTEGER},
+      </if>
+    </trim>
+  </insert>
+
+  <update id="updateErr" >
+  update data_import
+  set
+  di_result = #{err},
+  di_success = 0,
+  where di_id = #{id}
+</update>
+
+<select id="selectDataById" resultMap="DetailMap">
+  select * from  data_importdetail
+  where dd_diid = #{id}
+</select>
+
+  <select id="selectMainBycode" resultMap="DetailMap">
+    select * from  data_importdetail
+    where dd_codevalue = #{code} and dd_diid=#{id} and ifnull(dd_success,0)=0 and ifnull(dd_maindata,'')!='' and companyid=#{companyid}
+  </select>
+
+  <select id="selectMainOnly" resultMap="DetailMap">
+    select * from  data_importdetail
+    where dd_diid=#{id} and ifnull(dd_success,0)=0 and ifnull(dd_maindata,'')!='' and companyid=#{companyid}
+  </select>
+
+  <update id="updateDataImport" parameterType="integer">
+    update data_import set di_toformal=1,di_success=1  where di_id=#{id}
+  </update>
+  <update id="updateDataImportError">
+    update data_import set di_toformal=1,di_result=#{err} where di_id=#{id}
+  </update>
+</mapper>

+ 85 - 0
applications/purchase/purchase-server/src/main/resources/mapper/PurchaseMapper.xml

@@ -485,4 +485,89 @@
     select pu_code from purchase where ifnull(pu_sacode,'') != '' and  pu_id = #{puId} and pu_currency != #{puCurrency}
   </select>
 
+  <select id="selectVendorByCode" resultMap="vendorMap">
+    select * from vendor where ve_code = #{code} and companyid = #{companyid}
+  </select>
+
+  <select id="checkCurrency" resultType="integer">
+      SELECT COUNT(*) FROM CURRENCYS WHERE CR_NAME = #{name} AND COMPANYID = #{companyId}
+  </select>
+
+  <resultMap id="vendorMap" type="com.usoftchina.saas.document.entities.Vendor">
+    <id column="ve_id" property="id" jdbcType="INTEGER" />
+    <result column="ve_code" property="ve_code" jdbcType="VARCHAR" />
+    <result column="ve_shortname" property="ve_shortname" jdbcType="VARCHAR"/>
+    <result column="ve_uu" property="ve_uu" jdbcType="VARCHAR" />
+    <result column="ve_name" property="ve_name" jdbcType="VARCHAR" />
+    <result column="ve_type" property="ve_type" jdbcType="VARCHAR" />
+    <result column="ve_begindate" property="ve_begindate" jdbcType="TIMESTAMP" />
+    <result column="ve_beginapamount" property="ve_beginapamount" jdbcType="DOUBLE" />
+    <result column="ve_beginprepayamount" property="ve_beginprepayamount" jdbcType="DOUBLE" />
+    <result column="ve_promisedays" property="ve_promisedays" jdbcType="INTEGER" />
+    <result column="ve_taxrate" property="ve_taxrate" jdbcType="DOUBLE" />
+    <result column="ve_nsrzh" property="ve_nsrzh" jdbcType="VARCHAR" />
+    <result column="ve_bankaccount" property="ve_bankaccount" jdbcType="VARCHAR" />
+    <result column="ve_bankcode" property="ve_bankcode" jdbcType="VARCHAR" />
+    <result column="ve_status" property="ve_status" jdbcType="VARCHAR" />
+    <result column="ve_statuscode" property="ve_statuscode" jdbcType="VARCHAR" />
+    <result column="companyId" property="companyId" jdbcType="INTEGER" />
+    <result column="updaterId" property="updaterId" jdbcType="INTEGER" />
+    <result column="updateTime" property="updateTime" jdbcType="TIMESTAMP" />
+    <result column="ve_text1" property="ve_text1" jdbcType="VARCHAR" />
+    <result column="ve_text2" property="ve_text2" jdbcType="VARCHAR" />
+    <result column="ve_text3" property="ve_text3" jdbcType="VARCHAR" />
+    <result column="ve_text4" property="ve_text4" jdbcType="VARCHAR" />
+    <result column="ve_text5" property="ve_text5" jdbcType="VARCHAR" />
+    <result column="ve_payamount" property="ve_payamount" jdbcType="DOUBLE" />
+    <result column="ve_leftamount" property="ve_leftamount" jdbcType="DOUBLE" />
+    <result column="ve_beginym" property="ve_beginym" jdbcType="INTEGER" />
+    <result column="ve_preamount" property="ve_preamount" jdbcType="DOUBLE" />
+    <result column="ve_remark" property="ve_remark" jdbcType="VARCHAR" />
+    <result column="ve_address" property="ve_address" jdbcType="VARCHAR" />
+    <result column="ve_currency" property="ve_currency" jdbcType="VARCHAR" />
+  </resultMap>
+
+  <resultMap id="productMap" type="com.usoftchina.saas.document.dto.ProductDTO">
+    <id column="pr_id" property="id" jdbcType="INTEGER"/>
+    <result column="pr_code" property="pr_code" jdbcType="VARCHAR"/>
+    <result column="pr_detail" property="pr_detail" jdbcType="VARCHAR"/>
+    <result column="pr_spec" property="pr_spec" jdbcType="VARCHAR"/>
+    <result column="pr_unit" property="pr_unit" jdbcType="VARCHAR"/>
+    <result column="pr_kind" property="pr_kind" jdbcType="VARCHAR"/>
+    <result column="pr_orispeccode" property="pr_orispeccode" jdbcType="VARCHAR"/>
+    <result column="pr_whid" property="pr_whid" jdbcType="INTEGER"/>
+    <result column="pr_whcode" property="pr_whcode" jdbcType="VARCHAR"/>
+    <result column="pr_whname" property="pr_whname" jdbcType="VARCHAR"/>
+    <result column="pr_zxbzs" property="pr_zxbzs" jdbcType="INTEGER"/>
+    <result column="pr_leadtime" property="pr_leadtime" jdbcType="INTEGER"/>
+    <result column="pr_brand" property="pr_brand" jdbcType="VARCHAR"/>
+    <result column="pr_standardprice" property="pr_standardprice" jdbcType="DOUBLE"/>
+    <result column="pr_purcprice" property="pr_purcprice" jdbcType="DOUBLE"/>
+    <result column="pr_saleprice" property="pr_saleprice" jdbcType="DOUBLE"/>
+    <result column="pr_vendid" property="pr_vendid" jdbcType="INTEGER"/>
+    <result column="pr_vendcode" property="pr_vendcode" jdbcType="VARCHAR"/>
+    <result column="pr_vendname" property="pr_vendname" jdbcType="VARCHAR"/>
+  </resultMap>
+
+  <select id="selectProductByCode" resultMap="productMap">
+    select * from product where pr_code=#{code} and companyid=#{companyid}
+  </select>
+
+  <select id="selectDefaultAddress" resultMap="addressMap">
+    SELECT * FROM ADDRESS where COMPANYID=#{companyId} and ad_default=1
+  </select>
+
+  <resultMap id="addressMap" type="com.usoftchina.saas.document.entities.Address">
+    <id column="ad_id" jdbcType="INTEGER" property="id" />
+    <result column="companyId" jdbcType="INTEGER" property="companyId" />
+    <result column="updaterId" jdbcType="INTEGER" property="updaterId" />
+    <result column="updateTime" jdbcType="TIMESTAMP" property="updateTime" />
+    <result column="ad_text1" jdbcType="VARCHAR" property="ad_text1" />
+    <result column="ad_text2" jdbcType="VARCHAR" property="ad_text2" />
+    <result column="ad_text3" jdbcType="VARCHAR" property="ad_text3" />
+    <result column="ad_text4" jdbcType="VARCHAR" property="ad_text4" />
+    <result column="ad_text5" jdbcType="VARCHAR" property="ad_text5" />
+    <result column="ad_default" jdbcType="INTEGER" property="ad_default" />
+    <result column="ad_address" jdbcType="LONGVARCHAR" property="ad_address" />
+  </resultMap>
 </mapper>

+ 1 - 1
applications/sale/sale-server/src/main/resources/mapper/SaledownMapper.xml

@@ -46,7 +46,7 @@
   </sql>
   <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="long" >
     select 
-    <include refid="Base_Column_List" />
+    *
     from saledown
     where sa_id = #{sa_id}
   </select>