he2802 %!s(int64=2) %!d(string=hai) anos
pai
achega
d6033adcbb

+ 9 - 0
zhongzheng-admin/src/main/java/com/zhongzheng/controller/order/OrderBusinessConfigGoodsController.java

@@ -54,6 +54,15 @@ public class OrderBusinessConfigGoodsController extends BaseController {
         return getDataTable(list);
     }
 
+    @ApiOperation("查询订单配置合并商品列表")
+    @PreAuthorize("@ss.hasPermi('system:goods:list')")
+    @GetMapping("/mergeList")
+    public TableDataInfo<OrderBusinessConfigGoodsVo> mergeList(OrderBusinessConfigGoodsQueryBo bo) {
+        startPage();
+        List<OrderBusinessConfigGoodsVo> list = iOrderBusinessConfigGoodsService.selectMergeList(bo);
+        return getDataTable(list);
+    }
+
 
 
     /**

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/mapper/OrderBusinessConfigGoodsMapper.java

@@ -18,4 +18,6 @@ import java.util.List;
  */
 public interface OrderBusinessConfigGoodsMapper extends BaseMapper<OrderBusinessConfigGoods> {
     List<OrderBusinessConfigGoodsVo> selectList(OrderBusinessConfigGoodsQueryBo bo);
+
+    List<OrderBusinessConfigGoodsVo> selectMergeList(OrderBusinessConfigGoodsQueryBo bo);
 }

+ 2 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/IOrderBusinessConfigGoodsService.java

@@ -51,4 +51,6 @@ public interface IOrderBusinessConfigGoodsService extends IService<OrderBusiness
 	Boolean deleteWithValidByIds(Collection<Long> ids, Boolean isValid);
 
 	List<OrderBusinessConfigGoodsVo> selectList(OrderBusinessConfigGoodsQueryBo bo);
+
+	List<OrderBusinessConfigGoodsVo> selectMergeList(OrderBusinessConfigGoodsQueryBo bo);
 }

+ 5 - 0
zhongzheng-system/src/main/java/com/zhongzheng/modules/order/service/impl/OrderBusinessConfigGoodsServiceImpl.java

@@ -113,4 +113,9 @@ public class OrderBusinessConfigGoodsServiceImpl extends ServiceImpl<OrderBusine
     public List<OrderBusinessConfigGoodsVo> selectList(OrderBusinessConfigGoodsQueryBo bo) {
         return this.baseMapper.selectList(bo);
     }
+
+    @Override
+    public List<OrderBusinessConfigGoodsVo> selectMergeList(OrderBusinessConfigGoodsQueryBo bo) {
+        return this.baseMapper.selectMergeList(bo);
+    }
 }

+ 48 - 1
zhongzheng-system/src/main/resources/mapper/modules/order/OrderBusinessConfigGoodsMapper.xml

@@ -62,6 +62,54 @@ 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,
+        obc.config_name
+        FROM
+        order_business_config_goods bcg
+        LEFT JOIN order_business_config obc ON bcg.config_id = obc.id
+        LEFT JOIN course_business cb ON obc.business_id = cb.id
+        LEFT JOIN course_project_type cpt ON cb.project_id = cpt.id
+        LEFT JOIN course_education_type cet ON cet.id = cpt.education_id
+        LEFT JOIN course_subject cs on bcg.subject_id = cs.id
+        WHERE
+        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>
+        <if test="businessName != null and businessName != ''">
+            and cb.business_name = #{businessName}
+        </if>
+        <if test="projectName != null and projectName != ''">
+            and cpt.project_name = #{projectName}
+        </if>
+        <if test="educationName != null and educationName != ''">
+            and cet.education_name = #{educationName}
+        </if>
+        <if test="subjectName != null and subjectName != ''">
+            and cs.subject_name = #{subjectName}
+        </if>
+    </select>
+
+
+    <select id="selectMergeList" parameterType="com.zhongzheng.modules.order.bo.OrderBusinessConfigGoodsQueryBo" resultMap="OrderBusinessConfigGoodsVoResult">
         SELECT
         bcg.config_id,
         any_value ( obc.config_name ) config_name,
@@ -108,5 +156,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         </if>
         GROUP BY bcg.config_id
     </select>
-
 </mapper>