Forráskód Böngészése

update:广告位添加小程序跳转原始id,以及复制套餐包区分复制名称

ct 2 napja
szülő
commit
a67c854d61

+ 3 - 0
fs-service/src/main/java/com/fs/his/domain/FsAdv.java

@@ -58,4 +58,7 @@ public class FsAdv extends BaseEntity
     /** 宣传活动ID **/
     private Long activeId;
 
+    /** 跳转小程序原始id **/
+    private String originalId;
+
 }

+ 0 - 1
fs-service/src/main/java/com/fs/his/mapper/FsAdvMapper.java

@@ -62,7 +62,6 @@ public interface FsAdvMapper
 
     public int deleteFsAdvByAdvIds(String[] advIds);
 
-    @Select("select * from fs_adv where status = 1 and adv_type = 11 and show_type = 4 ")
     List<FsAdv> selectFsAppAdvList();
     @Select({"<script> " +
             "select * from fs_adv "+

+ 3 - 0
fs-service/src/main/java/com/fs/his/service/impl/FsPackageServiceImpl.java

@@ -336,6 +336,9 @@ public class FsPackageServiceImpl implements IFsPackageService {
         if(list != null && !list.isEmpty()){
             try {
                 for (FsPackage fsPackage : list) {
+                    //重命名
+                    fsPackage.setPackageName(fsPackage.getPackageName() + " - 副本");
+                    fsPackage.setSecondName(fsPackage.getSecondName() + " - 副本");
                     fsPackageMapper.insertFsPackage(fsPackage);
                 }
             } catch (Exception e) {

+ 10 - 1
fs-service/src/main/resources/mapper/his/FsAdvMapper.xml

@@ -18,10 +18,12 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <result property="advType"    column="adv_type"    />
         <result property="showType"    column="show_type"    />
         <result property="activeId"    column="active_id"    />
+        <result property="originalId"    column="original_id"    />
     </resultMap>
 
     <sql id="selectFsAdvVo">
-        select adv_id, adv_title, image_url, adv_url,app_adv_url, content, create_time, update_time, status, sort, adv_type, show_type, active_id from fs_adv
+        select adv_id, adv_title, image_url, adv_url,app_adv_url, content, create_time, update_time, status, sort,
+               adv_type, show_type, active_id,original_id from fs_adv
     </sql>
 
     <select id="selectFsAdvList" parameterType="FsAdv" resultMap="FsAdvResult">
@@ -35,6 +37,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="sort != null  and sort != ''"> and sort = #{sort}</if>
             <if test="advType != null "> and adv_type = #{advType}</if>
             <if test="showType != null "> and show_type = #{showType}</if>
+            <if test="originalId != null and originalId != ''"> and original_id = #{originalId}</if>
         </where>
         order by status desc,sort,adv_id desc
     </select>
@@ -43,6 +46,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         <include refid="selectFsAdvVo"/>
         where adv_id = #{advId}
     </select>
+    <select id="selectFsAppAdvList" resultType="com.fs.his.domain.FsAdv">
+        select * from fs_adv where status = 1 and adv_type = 11 and show_type = 4 order by sort asc
+    </select>
 
     <insert id="insertFsAdv" parameterType="FsAdv" useGeneratedKeys="true" keyProperty="advId">
         insert into fs_adv
@@ -59,6 +65,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="advType != null">adv_type,</if>
             <if test="showType != null">show_type,</if>
             <if test="activeId != null">active_id,</if>
+            <if test="originalId != null">original_id,</if>
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="advTitle != null and advTitle != ''">#{advTitle},</if>
@@ -73,6 +80,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="advType != null">#{advType},</if>
             <if test="showType != null">#{showType},</if>
             <if test="activeId != null">#{activeId},</if>
+            <if test="originalId != null">#{originalId},</if>
          </trim>
     </insert>
 
@@ -91,6 +99,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="advType != null">adv_type = #{advType},</if>
             <if test="showType != null">show_type = #{showType},</if>
             <if test="activeId != null">active_id = #{activeId},</if>
+            <if test="originalId != null and originalId != ''">original_id = #{originalId},</if>
         </trim>
         where adv_id = #{advId}
     </update>