浏览代码

submit:12.01BUg处理

yangdamao 2 年之前
父节点
当前提交
96d60e34d1

+ 10 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/service/impl/GoodsSpecTemplateServiceImpl.java

@@ -90,6 +90,16 @@ public class GoodsSpecTemplateServiceImpl extends ServiceImpl<GoodsSpecTemplateM
                             Goods goods = goodsService.getById(x.getGoodsId());
                             SpecAttrPriceVo priceVo = BeanUtil.toBean(goods,SpecAttrPriceVo.class);
                             priceVo.setSpecAttrIds(x.getSpecAttributeIds());
+                            priceVo.setSpecialGoods(0);
+                            //商品业务类型
+                            CourseEducationType type = courseEducationTypeService.getById(goods.getEducationTypeId());
+                            CourseBusiness business = courseBusinessService.getById(goods.getBusinessId());
+                            if (ObjectUtils.isNotNull(type) && ObjectUtils.isNotNull(business)){
+                                String name = type.getEducationName() + business.getAliasName();
+                                if ("继续教育二级建造师".equals(name) || "继续教育二级造价师".equals(name)){
+                                    priceVo.setSpecialGoods(1);
+                                }
+                            }
                             return priceVo;
                         }).collect(Collectors.toList());
                         voList.addAll(collect);

+ 3 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/goods/vo/SpecAttrPriceVo.java

@@ -135,7 +135,9 @@ public class SpecAttrPriceVo implements Serializable {
     private Integer showStatus;
     /** 显示排序字段 */
     private Long showSort;
-
+    /** 显示排序字段 */
+    @ApiModelProperty("是否二建商品:1是 0否")
+    private Integer specialGoods;
 
 
 }

+ 4 - 2
zhongzheng-system/src/main/resources/mapper/modules/goods/GoodsMapper.xml

@@ -340,10 +340,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <if test="sortType != null and sortType == 3">
             ORDER BY g.show_sort DESC,g.stand_price DESC
         </if>
-        <if test="sortType == null or sortType == 1">
+        <if test="sortType != null and sortType == 1">
             ORDER BY g.show_sort DESC,g.create_time DESC
         </if>
-
+        <if test="sortType == null" >
+            ORDER BY g.create_time DESC
+        </if>
     </select>
 
     <select id="selectListToInput" parameterType="com.zhongzheng.modules.goods.bo.GoodsQueryBo" resultMap="GoodsResultVo">