Переглянути джерело

销售明细接口和库存接口

qng 3 роки тому
батько
коміт
9ba203de74

+ 4 - 4
eccs-biz/src/main/java/com/emato/biz/service/impl/SalesDetaiServicelImpl.java

@@ -10,8 +10,8 @@ import com.emato.biz.mapper.mall.MallMngChangeMapper;
 import com.emato.biz.service.mall.ISalesDetaiServicel;
 import com.emato.common.core.Result;
 import com.emato.common.utils.DateUtils;
-import com.emato.common.utils.oms.request.DesUtils;
 import com.emato.common.utils.sign.Md5Utils;
+import com.emato.system.mapper.SysConfigMapper;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -35,8 +35,8 @@ public class SalesDetaiServicelImpl implements ISalesDetaiServicel {
     private InventoryDataMapper inventoryDataMapper;
     @Autowired
     private MallMngChangeMapper mallMngChangeMapper;
-
-
+    @Autowired
+    private SysConfigMapper configMapper;
 
     /**
      * kmall向eccs系统推送数据
@@ -58,7 +58,7 @@ public class SalesDetaiServicelImpl implements ISalesDetaiServicel {
         try {
             String strMsg = httpServletRequest.getHeader("Sign");
             String tranDtion = httpServletRequest.getHeader("tranDtion")==null?"":httpServletRequest.getHeader("tranDtion");
-            if(!strMsg.equals(DesUtils.SIGN)){
+            if(!strMsg.equals(configMapper.getConfigValue("sign"))){
                 return Result.error("1003","签名错误");
             }
             if(tranDtion.equals("")){

+ 2 - 0
eccs-system/src/main/java/com/emato/system/mapper/SysConfigMapper.java

@@ -65,4 +65,6 @@ public interface SysConfigMapper
      * @return 结果
      */
     public int deleteConfigByIds(Long[] configIds);
+
+    public String getConfigValue(String configKey);
 }

+ 5 - 0
eccs-system/src/main/resources/mapper/system/SysConfigMapper.xml

@@ -37,6 +37,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectConfigVo"/>
         <include refid="sqlwhereSearch"/>
     </select>
+
+    <select id="getConfigValue" parameterType="java.lang.String" resultType="java.lang.String">
+        select  config_value
+		from sys_config where config_key=#{configKey}
+    </select>
     
     <select id="selectConfigList" parameterType="SysConfig" resultMap="SysConfigResult">
         <include refid="selectConfigVo"/>