2 Commitit b5779adf79 ... 03ab37ab5f

Tekijä SHA1 Viesti Päivämäärä
  ct 03ab37ab5f Merge remote-tracking branch 'origin/master' 1 päivä sitten
  ct 15f90a6e39 套餐包区分appId显示: 1 päivä sitten

+ 2 - 0
fs-admin/src/main/java/com/fs/course/controller/FsCoursePlaySourceConfigController.java

@@ -46,11 +46,13 @@ public class FsCoursePlaySourceConfigController extends BaseController {
     @GetMapping("/list")
     public TableDataInfo list(@RequestParam(required = false) String name,
                               @RequestParam(required = false) String appid,
+                              @RequestParam(required = false) Integer isMall,
                               @RequestParam(required = false, defaultValue = "1") Integer pageNum,
                               @RequestParam(required = false, defaultValue = "10") Integer pageSize) {
         Map<String, Object> params = new HashMap<>();
         params.put("name", name);
         params.put("appid", appid);
+        params.put("isMall", isMall);
         LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
         String json = configService.selectConfigByKey("course.config");
         CourseConfig config = JSONUtil.toBean(json, CourseConfig.class);

+ 5 - 0
fs-service/src/main/java/com/fs/course/domain/FsCoursePlaySourceConfig.java

@@ -90,4 +90,9 @@ public class FsCoursePlaySourceConfig {
     private Long createUserId;
     // 创建部门
     private Long createDeptId;
+
+    /**
+     * 是否是互医/商城小程序
+     */
+    private Integer isMall;
 }

+ 3 - 0
fs-service/src/main/java/com/fs/course/param/FsCoursePlaySourceConfigCreateParam.java

@@ -45,4 +45,7 @@ public class FsCoursePlaySourceConfigCreateParam {
 
     @ApiModelProperty("所属公司")
     private Long companyId;
+
+    @ApiModelProperty("是否是互医/商城小程序")
+    private Integer isMall;
 }

+ 3 - 0
fs-service/src/main/java/com/fs/course/param/FsCoursePlaySourceConfigEditParam.java

@@ -42,4 +42,7 @@ public class FsCoursePlaySourceConfigEditParam {
 
     @ApiModelProperty("所属公司")
     private Long companyId;
+
+    @ApiModelProperty("是否是互医/商城小程序")
+    private Integer isMall;
 }

+ 5 - 0
fs-service/src/main/java/com/fs/course/vo/FsCoursePlaySourceConfigVO.java

@@ -49,4 +49,9 @@ public class FsCoursePlaySourceConfigVO {
     @ApiModelProperty("修改时间")
     @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
     private LocalDateTime updateTime;
+
+    /**
+     * 是否是互医/商城小程序
+     */
+    private Integer isMall;
 }

+ 1 - 0
fs-service/src/main/java/com/fs/his/domain/FsPackage.java

@@ -103,4 +103,5 @@ public class FsPackage extends BaseEntity
     private String description;
     /** 节气 */
     private Long solarTerm;
+    private String appIds;
 }

+ 7 - 0
fs-service/src/main/java/com/fs/his/mapper/FsPackageMapper.java

@@ -83,6 +83,7 @@ public interface FsPackageMapper
             "            <if test=\"maps.diseaseType != null \"> and disease_type = #{maps.diseaseType}</if>\n" +
             "            <if test=\"maps.isShow != null \"> and is_show = #{maps.isShow}</if>\n" +
             "            <if test=\"maps.solarTerm != null \"> and solar_term = #{maps.solarTerm}</if>\n" +
+            "            <if test=\"maps.appId != null and maps.appId != ''\"> and (FIND_IN_SET(#{maps.appId}, app_ids) > 0) or app_ids is null or app_ids = ''</if>\n" +
             "        order by sort,package_id desc"+
             "</script>"})
 
@@ -124,6 +125,12 @@ public interface FsPackageMapper
             "<if test = 'maps.isShow != null '> " +
             "and p.is_show = #{maps.isShow} " +
             "</if>" +
+            "<if test = 'maps.appId != null and maps.appId != \"\"'> " +
+            "and (FIND_IN_SET(#{maps.appId}, app_ids) > 0) or app_ids is null or app_ids = ''" +
+            "</if>" +
+            "<if test = 'maps.appId == null or maps.appId == \"\"'> " +
+            "and app_ids is null or app_ids = ''" +
+            "</if>" +
             " order by p.sort desc,package_id  "+
             "</script>"})
     List<FsPackageListUVO> selectFsPackageListUVO(@Param("maps") FsPackageListUParam param);

+ 1 - 0
fs-service/src/main/java/com/fs/his/param/FsPackageListUParam.java

@@ -10,6 +10,7 @@ public class FsPackageListUParam  implements Serializable {
     private Integer diseaseType;
     private Integer privateType;
     private Integer isShow;
+    private String appId;
     private String keyword;
     @ApiModelProperty(value = "页码,默认为1")
     private Integer pageNum =1;

+ 1 - 0
fs-service/src/main/java/com/fs/his/param/FsPackageParam.java

@@ -25,4 +25,5 @@ public class FsPackageParam implements Serializable {
     private Long packageId;
     private Integer isShow;
     private Long solarTerm;
+    private String appId; //所属小程序
 }

+ 1 - 0
fs-service/src/main/java/com/fs/his/vo/FsPackageVO.java

@@ -123,4 +123,5 @@ public class FsPackageVO {
     private String description;
 
     private Long solarTerm;
+    private String appIds;
 }

+ 3 - 0
fs-service/src/main/resources/mapper/course/FsCoursePlaySourceConfigMapper.xml

@@ -24,6 +24,9 @@
         <if test="params.deptId != null">
             and fcpsc.create_dept_id = #{params.deptId}
         </if>
+        <if test="params.isMall != null">
+            and fcpsc.is_mall = #{params.isMall}
+        </if>
         order by fcpsc.id desc
     </select>
 </mapper>

+ 5 - 1
fs-service/src/main/resources/mapper/his/FsPackageMapper.xml

@@ -48,10 +48,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="icdCode"    column="icd_code"    />
         <result property="description"    column="description"    />
         <result property="solarTerm"    column="solar_term"    />
+        <result property="appIds"    column="app_ids"    />
     </resultMap>
 
     <sql id="selectFsPackageVo">
-        select package_id,description,usage_per_use_count,icd_code,images,doctor_remark,second_name,follow_temp_id,product_cost_price,inquiry_cost_price,total_cost_price,follow_num,`explain`,indication,store_id,private_type,recipe_type,counts,usage_frequency_unit, package_name,img_url,is_show,total_price,cycle,duration,`desc`,product_type,price,tags,sales,disease_type,num,package_sub_type,describe_json,pay_type,package_type, sort, product_json, status, create_time, update_time, is_del,solar_term from fs_package
+        select package_id,description,usage_per_use_count,icd_code,images,doctor_remark,second_name,follow_temp_id,product_cost_price,inquiry_cost_price,total_cost_price,follow_num,`explain`,indication,store_id,private_type,recipe_type,counts,usage_frequency_unit, package_name,img_url,is_show,total_price,cycle,duration,`desc`,product_type,price,tags,sales,disease_type,num,package_sub_type,describe_json,pay_type,package_type, sort, product_json, status, create_time, update_time, is_del,solar_term,app_ids from fs_package
     </sql>
 
     <select id="selectFsPackageList" parameterType="FsPackage" resultMap="FsPackageResult">
@@ -122,6 +123,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="icdCode != null">icd_code,</if>
             <if test="description != null">description,</if>
             <if test="solarTerm != null">solar_term,</if>
+            <if test="appIds != null">app_ids,</if>
         </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="packageName != null">#{packageName},</if>
@@ -166,6 +168,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="icdCode != null">#{icdCode},</if>
             <if test="description != null">#{description},</if>
             <if test="solarTerm != null">#{solarTerm},</if>
+            <if test="appIds != null">#{appIds},</if>
         </trim>
     </insert>
 
@@ -214,6 +217,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="icdCode != null">icd_code = #{icdCode},</if>
             <if test="description != null">description = #{description},</if>
             <if test="solarTerm != null">solar_term = #{solarTerm},</if>
+            <if test="appIds != null ">app_ids = #{appIds},</if>
         </trim>
         where package_id = #{packageId}
     </update>