瀏覽代碼

fix:代服

ct 14 小時之前
父節點
當前提交
38968058bb

+ 9 - 12
fs-admin/src/main/java/com/fs/his/controller/FsStoreOrderController.java

@@ -770,19 +770,16 @@ public class FsStoreOrderController extends BaseController
 
     private FsStoreOrderDf getDFInfo(String loginAccount) {
         //查询订单账户 判断是否存在该订单账户
-        List<DFConfigVo> erpAccounts = fsStoreOrderService.getErpAccount();
+        FsDfAccount erpAccount = fsDfAccountService.selectFsDfAccountByAccount(loginAccount);
         FsStoreOrderDf df = new FsStoreOrderDf();
-        for (DFConfigVo erpAccount : erpAccounts) {
-            if (loginAccount.equals(erpAccount.getLoginAccount())){
-                //添加df记录
-                df.setAppKey(erpAccount.getDfAppKey());
-                df.setAppSecret(erpAccount.getDfAppsecret());
-                df.setLoginAccount(loginAccount);
-                df.setMonthlyCard(erpAccount.getMonthlyCard());
-                df.setExpressProductCode(erpAccount.getExpressProductCode());
-                df.setStatus(0);
-                break;
-            }
+        if (erpAccount != null){
+            //添加df记录
+            df.setAppKey(erpAccount.getDfAppKey());
+            df.setAppSecret(erpAccount.getDfAppsecret());
+            df.setLoginAccount(loginAccount);
+            df.setMonthlyCard(erpAccount.getMonthlyCard());
+            df.setExpressProductCode(erpAccount.getExpressProductCode());
+            df.setStatus(0);
         }
         return df;
     }

+ 10 - 7
fs-service/src/main/java/com/fs/his/mapper/FsDfAccountMapper.java

@@ -3,17 +3,18 @@ package com.fs.his.mapper;
 import java.util.List;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.fs.his.domain.FsDfAccount;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 代服账户Mapper接口
- * 
+ *
  * @author fs
  * @date 2025-10-13
  */
 public interface FsDfAccountMapper extends BaseMapper<FsDfAccount>{
     /**
      * 查询代服账户
-     * 
+     *
      * @param id 代服账户主键
      * @return 代服账户
      */
@@ -21,7 +22,7 @@ public interface FsDfAccountMapper extends BaseMapper<FsDfAccount>{
 
     /**
      * 查询代服账户列表
-     * 
+     *
      * @param fsDfAccount 代服账户
      * @return 代服账户集合
      */
@@ -29,7 +30,7 @@ public interface FsDfAccountMapper extends BaseMapper<FsDfAccount>{
 
     /**
      * 新增代服账户
-     * 
+     *
      * @param fsDfAccount 代服账户
      * @return 结果
      */
@@ -37,7 +38,7 @@ public interface FsDfAccountMapper extends BaseMapper<FsDfAccount>{
 
     /**
      * 修改代服账户
-     * 
+     *
      * @param fsDfAccount 代服账户
      * @return 结果
      */
@@ -45,7 +46,7 @@ public interface FsDfAccountMapper extends BaseMapper<FsDfAccount>{
 
     /**
      * 删除代服账户
-     * 
+     *
      * @param id 代服账户主键
      * @return 结果
      */
@@ -53,9 +54,11 @@ public interface FsDfAccountMapper extends BaseMapper<FsDfAccount>{
 
     /**
      * 批量删除代服账户
-     * 
+     *
      * @param ids 需要删除的数据主键集合
      * @return 结果
      */
     int deleteFsDfAccountByIds(Long[] ids);
+
+    FsDfAccount selectFsDfAccountByAccount(@Param("loginAccount") String loginAccount);
 }

+ 2 - 0
fs-service/src/main/java/com/fs/his/service/IFsDfAccountService.java

@@ -58,4 +58,6 @@ public interface IFsDfAccountService extends IService<FsDfAccount>{
      * @return 结果
      */
     int deleteFsDfAccountById(Long id);
+
+    FsDfAccount selectFsDfAccountByAccount(String loginAccount);
 }

+ 12 - 7
fs-service/src/main/java/com/fs/his/service/impl/FsDfAccountServiceImpl.java

@@ -11,7 +11,7 @@ import com.fs.his.service.IFsDfAccountService;
 
 /**
  * 代服账户Service业务层处理
- * 
+ *
  * @author fs
  * @date 2025-10-13
  */
@@ -20,7 +20,7 @@ public class FsDfAccountServiceImpl extends ServiceImpl<FsDfAccountMapper, FsDfA
 
     /**
      * 查询代服账户
-     * 
+     *
      * @param id 代服账户主键
      * @return 代服账户
      */
@@ -32,7 +32,7 @@ public class FsDfAccountServiceImpl extends ServiceImpl<FsDfAccountMapper, FsDfA
 
     /**
      * 查询代服账户列表
-     * 
+     *
      * @param fsDfAccount 代服账户
      * @return 代服账户
      */
@@ -44,7 +44,7 @@ public class FsDfAccountServiceImpl extends ServiceImpl<FsDfAccountMapper, FsDfA
 
     /**
      * 新增代服账户
-     * 
+     *
      * @param fsDfAccount 代服账户
      * @return 结果
      */
@@ -57,7 +57,7 @@ public class FsDfAccountServiceImpl extends ServiceImpl<FsDfAccountMapper, FsDfA
 
     /**
      * 修改代服账户
-     * 
+     *
      * @param fsDfAccount 代服账户
      * @return 结果
      */
@@ -70,7 +70,7 @@ public class FsDfAccountServiceImpl extends ServiceImpl<FsDfAccountMapper, FsDfA
 
     /**
      * 批量删除代服账户
-     * 
+     *
      * @param ids 需要删除的代服账户主键
      * @return 结果
      */
@@ -82,7 +82,7 @@ public class FsDfAccountServiceImpl extends ServiceImpl<FsDfAccountMapper, FsDfA
 
     /**
      * 删除代服账户信息
-     * 
+     *
      * @param id 代服账户主键
      * @return 结果
      */
@@ -91,4 +91,9 @@ public class FsDfAccountServiceImpl extends ServiceImpl<FsDfAccountMapper, FsDfA
     {
         return baseMapper.deleteFsDfAccountById(id);
     }
+
+    @Override
+    public FsDfAccount selectFsDfAccountByAccount(String loginAccount) {
+        return baseMapper.selectFsDfAccountByAccount(loginAccount);
+    }
 }

+ 4 - 0
fs-service/src/main/resources/mapper/his/FsDfAccountMapper.xml

@@ -50,6 +50,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectFsDfAccountVo"/>
         where id = #{id}
     </select>
+    <select id="selectFsDfAccountByAccount" resultType="com.fs.his.domain.FsDfAccount">
+        <include refid="selectFsDfAccountVo"/>
+        where login_account like #{loginAccount}
+    </select>
 
     <insert id="insertFsDfAccount" parameterType="FsDfAccount" useGeneratedKeys="true" keyProperty="id">
         insert into fs_df_account

+ 7 - 7
fs-service/src/main/resources/mapper/his/FsStoreOrderMapper.xml

@@ -571,7 +571,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and so.status = #{maps.status}
         </if>
         <if test="maps.status == 6">
-            and so.`status`= 1
+            and so.`status`= 2
             and (
             so.store_id in (select store_id from fs_store where delivery_type=2 or delivery_type=1)
             )
@@ -779,7 +779,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and so.status = #{maps.status}
             </if>
             <if test="maps.status == 6">
-                and so.`status`= 1
+                and so.`status`= 2
                 and (
                 so.store_id in (select store_id from fs_store where delivery_type=2 or delivery_type=1)
                 )
@@ -997,7 +997,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and so.status = #{maps.status}
             </if>
             <if test="maps.status == 6">
-                and so.`status`= 1
+                and so.`status`= 2
                 and (
                 so.store_id in (select store_id from fs_store where delivery_type=2 or delivery_type=1)
                 )
@@ -1221,7 +1221,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and so.status = #{maps.status}
         </if>
         <if test="maps.status == 6">
-            and so.`status`= 1
+            and so.`status`= 2
             and ( so.store_id in (select store_id from fs_store where delivery_type=2 or delivery_type=1))
             and  (so.extend_order_id is null or  so.extend_order_id like '')
         </if>
@@ -1453,7 +1453,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             AND so.status = #{maps.status}
         </if>
         <if test="maps.status == 6">
-            AND so.`status` = 1
+            AND so.`status` = 2
             AND (
             so.store_id IN (SELECT store_id FROM fs_store WHERE delivery_type=2 OR delivery_type=1)
             )
@@ -1703,7 +1703,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and so.status = #{maps.status}
             </if>
             <if test="maps.status == 6">
-                and so.`status`= 1
+                and so.`status`= 2
                 and (
                 so.store_id in (select store_id from fs_store where delivery_type=2 or delivery_type=1)
                 )
@@ -1914,7 +1914,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 and so.status = #{maps.status}
             </if>
             <if test="maps.status == 6">
-                and so.`status`= 1
+                and so.`status`= 2
                 and (
                 so.store_id in (select store_id from fs_store where delivery_type=2 or delivery_type=1)
                 )