Browse Source

fix input

he2802 2 năm trước cách đây
mục cha
commit
1bb963af3d

+ 11 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/bo/OrderBusinessConfigGoodsQueryBo.java

@@ -48,4 +48,15 @@ public class OrderBusinessConfigGoodsQueryBo extends BaseEntity {
 	/** 0 未启用 1启用 */
 	@ApiModelProperty("0 未启用 1启用")
 	private Integer status;
+
+	/** 业务层次id */
+	@ApiModelProperty("业务层次ID")
+	private Long businessId;
+	@ApiModelProperty("项目类型ID")
+	private Long projectId;
+	@ApiModelProperty("教育类型ID")
+	private Long educationId;
+	/** 班级类型 1基础班 2强化班 3私塾班 */
+	@ApiModelProperty("班级类型 1基础班 2强化班 3私塾班")
+	private Integer gradeType;
 }

+ 8 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderBusinessConfigServiceImpl.java

@@ -11,8 +11,11 @@ import com.zhongzheng.modules.order.bo.OrderBusinessConfigEditBo;
 import com.zhongzheng.modules.order.bo.OrderBusinessConfigQueryBo;
 import com.zhongzheng.modules.order.domain.OrderBusinessConfig;
 import com.zhongzheng.modules.order.mapper.OrderBusinessConfigMapper;
+import com.zhongzheng.modules.order.service.IOrderBusinessConfigGoodsService;
 import com.zhongzheng.modules.order.service.IOrderBusinessConfigService;
+import com.zhongzheng.modules.order.service.IOrderGoodsService;
 import com.zhongzheng.modules.order.vo.OrderBusinessConfigVo;
+import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
@@ -33,6 +36,10 @@ import java.util.stream.Collectors;
 @Service
 public class OrderBusinessConfigServiceImpl extends ServiceImpl<OrderBusinessConfigMapper, OrderBusinessConfig> implements IOrderBusinessConfigService {
 
+    @Autowired
+    private IOrderBusinessConfigGoodsService iOrderBusinessConfigGoodsService;
+
+
     @Override
     public OrderBusinessConfigVo queryById(Long id){
         OrderBusinessConfig db = this.baseMapper.selectById(id);
@@ -53,6 +60,7 @@ public class OrderBusinessConfigServiceImpl extends ServiceImpl<OrderBusinessCon
         return this.baseMapper.getList(bo);
     }
 
+
     @Override
     public OrderBusinessConfigVo getDetail(OrderBusinessConfigQueryBo bo) {
         return this.baseMapper.getDetail(bo);

+ 4 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/vo/OrderBusinessConfigGoodsVo.java

@@ -51,5 +51,9 @@ public class OrderBusinessConfigGoodsVo {
 	private String educationName;
 	@ApiModelProperty("项目名称")
 	private String projectName;
+	/** 配置名称 */
+	@Excel(name = "配置名称")
+	@ApiModelProperty("配置名称")
+	private String configName;
 	private List<GoodsVo> goodsList;
 }

+ 23 - 3
zhongzheng-system/src/main/resources/mapper/modules/order/OrderBusinessConfigGoodsMapper.xml

@@ -24,6 +24,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="businessName" column="business_name"/>
         <result property="educationName" column="education_name"/>
         <result property="projectName" column="project_name"/>
+        <result property="configName" column="config_name"/>
         <collection property="goodsList" column="goods_ids" select="findGoodsList"/>
     </resultMap>
 
@@ -59,7 +60,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectList" parameterType="com.zhongzheng.modules.order.bo.OrderBusinessConfigGoodsQueryBo" resultMap="OrderBusinessConfigGoodsVoResult">
         SELECT
             bcg.*,
-            cs.subject_name
+            cs.subject_name,
+            obc.config_name
         FROM
             order_business_config_goods bcg
             LEFT JOIN order_business_config obc ON bcg.config_id = obc.id
@@ -68,8 +70,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             LEFT JOIN course_education_type cet ON cet.id = cpt.education_id
                 LEFT JOIN course_subject cs on bcg.subject_id = cs.id
         WHERE
-            bcg.config_id = #{configId}
-
+        obc.`status` = 1
+        and bcg.`status` = 1
+        <if test="configId != null and configId != ''">
+            and bcg.config_id = #{configId}
+        </if>
+        <if test="gradeType != null and gradeType != ''">
+            and obc.grade_type = #{gradeType}
+        </if>
+        <if test="businessId != null and businessId != ''">
+            and obc.business_id = #{businessId}
+        </if>
+        <if test="projectId != null and projectId != ''">
+            and cpt.id = #{projectId}
+        </if>
+        <if test="educationId != null and educationId != ''">
+            and cet.id = #{educationId}
+        </if>
+        <if test="subjectId != null and subjectId != ''">
+            and bcg.subject_id = #{subjectId}
+        </if>
     </select>
 
 </mapper>