yangdamao 1 年之前
父節點
當前提交
f7ce541057

+ 7 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsServiceImpl.java

@@ -1738,6 +1738,13 @@ public class GoodsServiceImpl extends ServiceImpl<GoodsMapper, Goods> implements
                     goods.setCertificateTpId(getNewCertificateTpId(goods.getCertificateTpId(), newTenantId, recordList));
                     goods.setCertificateTpId(getNewCertificateTpId(goods.getCertificateTpId(), newTenantId, recordList));
                 }
                 }
 
 
+                //商品关联题库
+                if (StringUtils.isNotBlank(goods.getQuestionRelIds())){
+                    String collect = Arrays.stream(goods.getQuestionRelIds().split(","))
+                            .map(x -> getNewId(Long.valueOf(x), GoodsCopyEnum.GOODS.getType()).toString()).collect(Collectors.joining(","));
+                    goods.setQuestionRelIds(collect);
+                }
+
                 //规格模板
                 //规格模板
                 if (ObjectUtils.isNotNull(goods.getSpecTemplateId())) {
                 if (ObjectUtils.isNotNull(goods.getSpecTemplateId())) {
                     Long oldSpecTemplateId = goods.getSpecTemplateId();
                     Long oldSpecTemplateId = goods.getSpecTemplateId();

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/top/goods/service/impl/TopOldOrderServiceImpl.java

@@ -516,6 +516,10 @@ public class TopOldOrderServiceImpl extends ServiceImpl<TopOldOrderMapper, TopOl
         return orderVoList;
         return orderVoList;
     }
     }
 
 
+    public static void main(String[] args) {
+        String encrypt = EncryptHandler.encrypt("441229198103120017");
+        System.out.println("encrypt = " + encrypt);
+    }
 
 
 
 
     private BigDecimal getInstTimeSettleCost(TopOldOrderVo orderVo) {
     private BigDecimal getInstTimeSettleCost(TopOldOrderVo orderVo) {

+ 5 - 28
zhongzheng-system/src/main/resources/mapper/modules/top/TopOldOrderMapper.xml

@@ -46,13 +46,7 @@
         SELECT
         SELECT
         vto.*
         vto.*
         FROM
         FROM
-        <if test="businessFullName != null and businessFullName != '' and ((userCard == null or userCard == '') and (userName == null or userName == ''))">
-            ( SELECT DISTINCT order_sn
-            FROM `v_top_order_business` where INSTR( business_full_name,#{businessFullName} ) > 0
-            ) a
-            LEFT JOIN v_top_order vto ON a.order_sn = vto.order_sn
-        </if>
-        <if test="((userCard != null and userCard != '') or (userName != null and userName != '')) and (businessFullName == null or businessFullName == '')">
+        <if test="((userCard != null and userCard != '') or (userName != null and userName != ''))">
             ( SELECT DISTINCT order_sn
             ( SELECT DISTINCT order_sn
             FROM `v_top_order_card` where 1=1
             FROM `v_top_order_card` where 1=1
             <if test="userCard != null and userCard != ''">
             <if test="userCard != null and userCard != ''">
@@ -64,33 +58,16 @@
             ) a
             ) a
             LEFT JOIN v_top_order vto ON a.order_sn = vto.order_sn
             LEFT JOIN v_top_order vto ON a.order_sn = vto.order_sn
         </if>
         </if>
-        <if test="((userCard != null and userCard != '') or (userName != null and userName != '')) and businessFullName != null and businessFullName != ''">
-            ( SELECT DISTINCT order_sn
-            FROM (
-            SELECT
-            DISTINCT order_sn
-            FROM
-            ( SELECT order_sn FROM v_top_order_business WHERE INSTR( business_full_name,#{businessFullName} ) > 0 UNION
-            ALL SELECT order_sn FROM v_top_order_card
-            WHERE 1 = 1
-            <if test="userCard != null and userCard != ''">
-                AND user_card = #{userCard,typeHandler=com.zhongzheng.common.type.EncryptHandler}
-            </if>
-            <if test="userName != null and userName != ''">
-                AND user_name LIKE CONCAT( '%', #{userName}, '%' )
-            </if>
-            ) b
-            ) m
-            ) a
-            LEFT JOIN v_top_order vto ON a.order_sn = vto.order_sn
-        </if>
-        <if test="(userCard == null or userCard == '') and (businessFullName == null or businessFullName == '') and (userName == null or userName == '')">
+        <if test="(userCard == null or userCard == '') and (userName == null or userName == '')">
             v_top_order vto
             v_top_order vto
         </if>
         </if>
         WHERE vto.`status` in (0,1)
         WHERE vto.`status` in (0,1)
         <if test="operationType != null">
         <if test="operationType != null">
             AND vto.operation_type = #{operationType}
             AND vto.operation_type = #{operationType}
         </if>
         </if>
+        <if test="businessFullName != null and businessFullName != ''">
+            AND vto.business_full_name = #{businessFullName}
+        </if>
         <if test="checkStatus != null and checkStatus.size()!=0 ">
         <if test="checkStatus != null and checkStatus.size()!=0 ">
             AND vto.check_status in
             AND vto.check_status in
             <foreach collection="checkStatus" item="item" index="index" open="(" close=")" separator=",">
             <foreach collection="checkStatus" item="item" index="index" open="(" close=")" separator=",">