Ver código fonte

小程序-使用指南和优惠详情

LIVE_YE 2 anos atrás
pai
commit
e5fa568506

+ 0 - 3
ruoyi-admin/src/main/java/com/ruoyi/web/controller/business/UseGuideController.java

@@ -69,7 +69,6 @@ public class UseGuideController extends BaseController
     /**
      * 新增使用指南
      */
-    @PreAuthorize("@ss.hasPermi('system:use:add')")
     @Log(title = "使用指南", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody UseGuide useGuide)
@@ -80,7 +79,6 @@ public class UseGuideController extends BaseController
     /**
      * 修改使用指南
      */
-    @PreAuthorize("@ss.hasPermi('system:use:edit')")
     @Log(title = "使用指南", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody UseGuide useGuide)
@@ -91,7 +89,6 @@ public class UseGuideController extends BaseController
     /**
      * 删除使用指南
      */
-    @PreAuthorize("@ss.hasPermi('system:use:remove')")
     @Log(title = "使用指南", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)

+ 0 - 6
ruoyi-admin/src/main/java/com/ruoyi/web/controller/business/WelfareGuideController.java

@@ -37,7 +37,6 @@ public class WelfareGuideController extends BaseController
     /**
      * 查询小程序党建福利信息列表
      */
-    @PreAuthorize("@ss.hasPermi('system:welfare:list')")
     @GetMapping("/list")
     public TableDataInfo list(WelfareGuide welfareGuide)
     {
@@ -49,7 +48,6 @@ public class WelfareGuideController extends BaseController
     /**
      * 导出小程序党建福利信息列表
      */
-    @PreAuthorize("@ss.hasPermi('system:welfare:export')")
     @Log(title = "小程序党建福利信息", businessType = BusinessType.EXPORT)
     @PostMapping("/export")
     public void export(HttpServletResponse response, WelfareGuide welfareGuide)
@@ -62,7 +60,6 @@ public class WelfareGuideController extends BaseController
     /**
      * 获取小程序党建福利信息详细信息
      */
-    @PreAuthorize("@ss.hasPermi('system:welfare:query')")
     @GetMapping(value = "/{id}")
     public AjaxResult getInfo(@PathVariable("id") Long id)
     {
@@ -72,7 +69,6 @@ public class WelfareGuideController extends BaseController
     /**
      * 新增小程序党建福利信息
      */
-    @PreAuthorize("@ss.hasPermi('system:welfare:add')")
     @Log(title = "小程序党建福利信息", businessType = BusinessType.INSERT)
     @PostMapping
     public AjaxResult add(@RequestBody WelfareGuide welfareGuide)
@@ -83,7 +79,6 @@ public class WelfareGuideController extends BaseController
     /**
      * 修改小程序党建福利信息
      */
-    @PreAuthorize("@ss.hasPermi('system:welfare:edit')")
     @Log(title = "小程序党建福利信息", businessType = BusinessType.UPDATE)
     @PutMapping
     public AjaxResult edit(@RequestBody WelfareGuide welfareGuide)
@@ -94,7 +89,6 @@ public class WelfareGuideController extends BaseController
     /**
      * 删除小程序党建福利信息
      */
-    @PreAuthorize("@ss.hasPermi('system:welfare:remove')")
     @Log(title = "小程序党建福利信息", businessType = BusinessType.DELETE)
 	@DeleteMapping("/{ids}")
     public AjaxResult remove(@PathVariable Long[] ids)

+ 23 - 12
ruoyi-system/src/main/java/com/ruoyi/system/domain/WelfareGuide.java

@@ -29,6 +29,9 @@ public class WelfareGuide extends BaseEntity
     /** 福利内容 */
     private String welfareContent;
 
+    /** 图片地址 */
+    private String photoPath;
+
     /** 状态(0正常 1关闭) */
     @Excel(name = "状态", readConverterExp = "0=正常,1=关闭")
     private String status;
@@ -79,19 +82,27 @@ public class WelfareGuide extends BaseEntity
         return status;
     }
 
+    public static long getSerialVersionUID() {
+        return serialVersionUID;
+    }
+
+    public void setPhotoPath(String photoPath) {
+        this.photoPath = photoPath;
+    }
+
+    public String getPhotoPath() {
+        return photoPath;
+    }
+
     @Override
     public String toString() {
-        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
-            .append("id", getId())
-            .append("welfareTitle", getWelfareTitle())
-            .append("welfareProfile", getWelfareProfile())
-            .append("welfareContent", getWelfareContent())
-            .append("status", getStatus())
-            .append("createBy", getCreateBy())
-            .append("createTime", getCreateTime())
-            .append("updateBy", getUpdateBy())
-            .append("updateTime", getUpdateTime())
-            .append("remark", getRemark())
-            .toString();
+        return "WelfareGuide{" +
+                "id=" + id +
+                ", welfareTitle='" + welfareTitle + '\'' +
+                ", welfareProfile='" + welfareProfile + '\'' +
+                ", welfareContent='" + welfareContent + '\'' +
+                ", photoPath='" + photoPath + '\'' +
+                ", status='" + status + '\'' +
+                '}';
     }
 }

+ 2 - 4
ruoyi-system/src/main/resources/mapper/system/UseGuideMapper.xml

@@ -49,10 +49,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="useVersion != null">use_version,</if>
             <if test="status != null">status,</if>
             <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
+            create_time,update_time
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
             <if test="useTitle != null">#{useTitle},</if>
@@ -61,10 +60,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="useVersion != null">#{useVersion},</if>
             <if test="status != null">#{status},</if>
             <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
+            sysdate(),sysdate()
          </trim>
     </insert>
 

+ 7 - 5
ruoyi-system/src/main/resources/mapper/system/WelfareGuideMapper.xml

@@ -6,6 +6,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     
     <resultMap type="WelfareGuide" id="WelfareGuideResult">
         <result property="id"    column="id"    />
+        <result property="photoPath"    column="photo_path"    />
         <result property="welfareTitle"    column="welfare_title"    />
         <result property="welfareProfile"    column="welfare_profile"    />
         <result property="welfareContent"    column="welfare_content"    />
@@ -18,7 +19,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectWelfareGuideVo">
-        select id, welfare_title, welfare_profile, welfare_content, status, create_by, create_time, update_by, update_time, remark from welfare_guide
+        select id,photo_path, welfare_title, welfare_profile, welfare_content, status, create_by, create_time, update_by, update_time, remark from welfare_guide
     </sql>
 
     <select id="selectWelfareGuideList" parameterType="WelfareGuide" resultMap="WelfareGuideResult">
@@ -42,32 +43,33 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <insert id="insertWelfareGuide" parameterType="WelfareGuide" useGeneratedKeys="true" keyProperty="id">
         insert into welfare_guide
         <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="photoPath != null">photo_path,</if>
             <if test="welfareTitle != null">welfare_title,</if>
             <if test="welfareProfile != null">welfare_profile,</if>
             <if test="welfareContent != null">welfare_content,</if>
             <if test="status != null">status,</if>
             <if test="createBy != null">create_by,</if>
-            <if test="createTime != null">create_time,</if>
             <if test="updateBy != null">update_by,</if>
-            <if test="updateTime != null">update_time,</if>
             <if test="remark != null">remark,</if>
+            create_time,update_time
          </trim>
         <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="photoPath != null">#{photoPath},</if>
             <if test="welfareTitle != null">#{welfareTitle},</if>
             <if test="welfareProfile != null">#{welfareProfile},</if>
             <if test="welfareContent != null">#{welfareContent},</if>
             <if test="status != null">#{status},</if>
             <if test="createBy != null">#{createBy},</if>
-            <if test="createTime != null">#{createTime},</if>
             <if test="updateBy != null">#{updateBy},</if>
-            <if test="updateTime != null">#{updateTime},</if>
             <if test="remark != null">#{remark},</if>
+            sysdate(),sysdate()
          </trim>
     </insert>
 
     <update id="updateWelfareGuide" parameterType="WelfareGuide">
         update welfare_guide
         <trim prefix="SET" suffixOverrides=",">
+            <if test="photoPath != null">photo_path = #{photoPath},</if>
             <if test="welfareTitle != null">welfare_title = #{welfareTitle},</if>
             <if test="welfareProfile != null">welfare_profile = #{welfareProfile},</if>
             <if test="welfareContent != null">welfare_content = #{welfareContent},</if>