zhangyuewww 2 سال پیش
والد
کامیت
4b49ace461

+ 6 - 1
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/entity/HyReleaseGoodsInfo.java

@@ -166,7 +166,7 @@ public class HyReleaseGoodsInfo extends BaseModel<HyReleaseGoodsInfo> {
      */
     private Double stationFee;
     /**
-     * 常发标识(1常发)
+     * 原数据id
      */
     private String oftenFlag;
     /**
@@ -235,6 +235,11 @@ public class HyReleaseGoodsInfo extends BaseModel<HyReleaseGoodsInfo> {
      */
     @TableField(exist = false)
     private String driverFlag;
+    /**
+     * 常发标识
+     */
+    @TableField(exist = false)
+    private String oftenFlag1;
 
     @Override
     protected Serializable pkVal() {

+ 16 - 0
winsea-haixin-plugin-wangluohuoyun/src/main/java/com/yh/saas/plugin/yiliangyiyun/service/impl/HyReleaseGoodsInfoServiceImpl.java

@@ -181,6 +181,22 @@ public class HyReleaseGoodsInfoServiceImpl extends ServiceImpl<HyReleaseGoodsInf
                 }
             }
         }
+        //货主端
+        else{
+            if (!CollectionUtils.isEmpty(dataList)) {
+                for (HyReleaseGoodsInfo hyReleaseGoodsInfo1:dataList){
+                    HyReleaseGoodsInfo hyReleaseGoodsInfo2=this.selectOne(new EntityWrapper<HyReleaseGoodsInfo>()
+                    .eq("often_flag",hyReleaseGoodsInfo1.getId()));
+                    if (hyReleaseGoodsInfo2!=null){
+                        hyReleaseGoodsInfo1.setOftenFlag1("1");
+                    }
+                    else {
+                        hyReleaseGoodsInfo1.setOftenFlag1("0");
+                    }
+                }
+
+            }
+        }
         page.setRecords(hyReleaseGoodsInfoList == null ? Lists.newArrayList() : hyReleaseGoodsInfoList);
         page.setTotal(hyReleaseGoodsInfoList.size() == 0 ? 0 : hyReleaseGoodsInfoList.size());
         page.setCurrent(hyReleaseGoodsInfo.getCurrentPage());

+ 14 - 14
winsea-haixin-plugin-wangluohuoyun/src/main/resources/mapper/HyReleaseGoodsInfoMapper.xml

@@ -6,7 +6,7 @@
         SELECT
         COUNT(id)
         FROM hy_release_goods_info
-        WHERE 1=1
+        WHERE delete_flag = '0'
         <if test="commonId != null and commonId != ''">
             AND common_id = #{commonId}
         </if>
@@ -24,13 +24,13 @@
         </if>
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
-                AND status!='已下架' and delete_flag = '0'
+                AND status!='已下架'  and often_flag is null
+            </if>
+            <if test="searchType == 2">
+                AND often_flag is null
             </if>
-             <if test="searchType == 2">
-                AND delete_flag = '0'
-             </if>
             <if test="searchType == 3">
-                AND often_flag = '1'
+                AND often_flag is not null
             </if>
         </if>
     </select>
@@ -73,7 +73,7 @@
         create_date as createDate,
         update_date as updateDate
         FROM hy_release_goods_info
-        WHERE 1=1
+        WHERE delete_flag = '0'
         <if test="commonId != null and commonId != ''">
             AND common_id = #{commonId}
         </if>
@@ -91,13 +91,13 @@
         </if>
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
-                AND status!='已下架' and delete_flag = '0'
+                AND status!='已下架'  and often_flag is null
             </if>
             <if test="searchType == 2">
-                AND delete_flag = '0'
+                AND often_flag is null
             </if>
             <if test="searchType == 3">
-                AND often_flag = '1'
+                AND often_flag is not null
             </if>
         </if>
         ORDER BY update_date DESC
@@ -144,7 +144,7 @@
         create_date as createDate,
         update_date as updateDate
         FROM hy_release_goods_info
-        WHERE 1=1
+        WHERE  delete_flag = '0'
         <if test="commonId != null and commonId != ''">
             AND common_id = #{commonId}
         </if>
@@ -162,13 +162,13 @@
 <!--        </if>-->
         <if test="searchType != null and searchType != ''">
             <if test="searchType == 1">
-                AND status!='已下架' and delete_flag = '0'
+                AND status!='已下架'  and often_flag is null
             </if>
             <if test="searchType == 2">
-                AND delete_flag = '0'
+                AND often_flag is null
             </if>
             <if test="searchType == 3">
-                AND often_flag = '1'
+                AND often_flag is not null
             </if>
         </if>
         ORDER BY update_date DESC