Browse Source

经销商/自动签收

njs 1 year ago
parent
commit
5d912c57e0

suishenbang-order/src/main/resources/mapper/order/MetaEmployeeMapper.xml → suishenbang-order/src/main/resources/mapper/order/CustomersCodeMapper.xml


+ 1 - 2
suishenbang-wxportal/suishenbang-wxportal-api/src/main/java/com/dgtly/wxportal/controller/EsignController.java

@@ -7,7 +7,6 @@ import com.dgtly.common.core.controller.ApiBaseController;
 import com.dgtly.common.core.domain.AjaxResult;
 import com.dgtly.common.core.domain.ParameterObject;
 import com.dgtly.common.utils.StringUtils;
-import com.dgtly.sync.service.ICustomersService;
 import com.dgtly.system.domain.AssRelcustomerinfo;
 import com.dgtly.system.domain.CustomersExt;
 import com.dgtly.system.domain.SysUser;
@@ -73,7 +72,7 @@ public class EsignController extends ApiBaseController {
     @Autowired
     private IAssRelcustomerinfoService assRelcustomerinfoService;
     @Autowired
-    private ICustomersService customersService;
+    private ICustomersCodeService customersService;
     /**
      * @description: 经销商订单签收方法
      * 没有注册就注册,注册完就认证,然后再点击签署按钮,获取经销商用户id,对应主体id

+ 22 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/mapper/CustomersCodeMapper.java

@@ -0,0 +1,22 @@
+package com.dgtly.wxportal.mapper;
+
+import org.apache.ibatis.annotations.Param;
+/**
+ * 经销商 Mapper接口
+ * 
+ * @author dgtly
+ * @date 2020-08-27
+ */
+public interface CustomersCodeMapper
+{
+
+    /**
+     * @description:根据经销商code查询名称
+     * @param:
+     * @return:
+     * @author: njs
+     * @date: 2023/8/29 9:32
+     */
+    public String selectCustomerNameByCustomerCode(@Param("customerCode")String customerCode);
+
+}

+ 23 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/ICustomersCodeService.java

@@ -0,0 +1,23 @@
+package com.dgtly.wxportal.service;
+
+
+
+/**
+ * @description: 经销商 Service接口
+ * @param:
+ * @return:
+ * @author: njs
+ * @date: 2023/8/29 10:26
+ */
+public interface ICustomersCodeService
+{
+
+    /**
+     * @description:根据经销商code查询名称
+     * @param:
+     * @return:
+     * @author: njs
+     * @date: 2023/8/29 9:32
+     */
+    public String selectCustomerNameByCustomerCode(String customerCode);
+}

+ 36 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/java/com/dgtly/wxportal/service/impl/CustomersCodeServiceImpl.java

@@ -0,0 +1,36 @@
+package com.dgtly.wxportal.service.impl;
+
+import com.dgtly.common.core.text.Convert;
+import com.dgtly.common.utils.DateUtils;
+import com.dgtly.wxportal.mapper.CustomersCodeMapper;
+import com.dgtly.wxportal.service.ICustomersCodeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 经销商 Service业务层处理
+ * 
+ * @author dgtly
+ * @date 2020-08-27
+ */
+@Service
+public class CustomersCodeServiceImpl implements ICustomersCodeService
+{
+    @Autowired
+    private CustomersCodeMapper customersMapper;
+
+    /**
+     * @param customerCode
+     * @description:根据经销商code查询名称
+     * @param:
+     * @return:
+     * @author: njs
+     * @date: 2023/8/29 9:32
+     */
+    @Override
+    public String selectCustomerNameByCustomerCode(String customerCode) {
+        return customersMapper.selectCustomerNameByCustomerCode(customerCode);
+    }
+}

+ 12 - 0
suishenbang-wxportal/suishenbang-wxportal-common/src/main/resources/mapper/wxportal/CustomersCodeMapper.xml

@@ -0,0 +1,12 @@
+<?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.dgtly.wxportal.mapper.CustomersCodeMapper">
+
+    <select id="selectCustomerNameByCustomerCode" resultType="java.lang.String">
+        select chains_name from customers where 1=1
+        <if test="customerCode !=null and customerCode !='' ">and chains_code =#{customerCode}</if>
+        limit 1
+    </select>
+</mapper>