修复删除方法bug

master
星期八 6 years ago
parent a9d2da6c2b
commit 2188777892
  1. 12
      src/main/java/com/lq/cms/web/wechat/WechatMessageController.java
  2. 6
      src/main/resources/mybatis/mapping/SysFileDao.xml
  3. 6
      src/main/resources/mybatis/mapping/SysLogDao.xml
  4. 9
      src/main/resources/mybatis/mapping/SysResourceDao.xml
  5. 7
      src/main/resources/mybatis/mapping/SysRoleDao.xml
  6. 5
      src/main/resources/mybatis/mapping/SysRoleResourcePermissionDao.xml
  7. 7
      src/main/resources/mybatis/mapping/SysUserDao.xml
  8. 6
      src/main/resources/mybatis/mapping/WechatAccesstokenDao.xml
  9. 7
      src/main/resources/mybatis/mapping/WechatInfoDao.xml
  10. 2
      src/main/resources/mybatis/mapping/WechatRuleDao.xml
  11. 2
      src/main/resources/mybatis/mapping/WechatUserDao.xml

@ -10,6 +10,7 @@ import com.lq.cms.web.AdminBaseController;
import com.lq.code.entity.AjaxResult;
import com.lq.code.util.Constant;
import com.lq.code.util.FileUtil;
import com.lq.code.util.StringUtil;
import com.lq.entity.SysUser;
import com.lq.entity.WechatMessage;
import org.apache.shiro.authz.annotation.RequiresPermissions;
@ -24,6 +25,7 @@ import org.springframework.web.multipart.MultipartFile;
import java.io.File;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.UUID;
@ -77,7 +79,10 @@ public class WechatMessageController {
AjaxResult ajaxResult = new AjaxResult();
try {
String filePath = upLoadFile(file);
vo.setImageUrl(filePath);
if(StringUtil.isNotNull(filePath)) {
vo.setImageUrl(filePath);
}
vo.setUpdateTime(new Date());
wechatMessageService.save(vo);
} catch (IllegalAccessException e) {
e.printStackTrace();
@ -93,7 +98,10 @@ public class WechatMessageController {
public Object update(WechatMessageVo vo,@RequestParam(value = "file",required = false) MultipartFile file){
AjaxResult ajaxResult = new AjaxResult();
String filePath = upLoadFile(file);
vo.setImageUrl(filePath);
if (StringUtil.isNotNull(filePath)) {
vo.setImageUrl(filePath);
}
vo.setUpdateTime(new Date());
wechatMessageService.update(vo);
return ajaxResult;
}

@ -45,8 +45,10 @@
</update>
<delete id="delete" parameterType="Long">
DELETE
FROM sys_file
UPDATE
sys_file
SET
status = 0
WHERE
id=#{id}
</delete>

@ -49,8 +49,10 @@
</update>
<delete id="delete" parameterType="Long">
DELETE
FROM sys_log
UPDATE
sys_log
SET
status = 0
WHERE id=#{id}
</delete>

@ -70,9 +70,12 @@
</update>
<update id="delete" parameterType="Long">
UPDATE sys_resource
SET status = 0
WHERE id=#{id}
UPDATE
sys_resource
SET
status = 0
WHERE
id=#{id}
</update>

@ -59,7 +59,12 @@
</update>
<update id="delete" parameterType="Long">
UPDATE sys_role SET status = 0 WHERE id=#{id}
UPDATE
sys_role
SET
status = 0
WHERE
id=#{id}
</update>
<select id="count" resultType="Int" parameterType="SysRoleVo">

@ -71,9 +71,10 @@
<update id="delete" parameterType="Long">
UPDATE
sys_role_resource_permission
SET status = 0
SET
status = 0
WHERE
id=#{id}
id=#{id}
</update>

@ -79,10 +79,11 @@
<update id="delete" parameterType="Long">
UPDATE
sys_user
SET status = 0
sys_user
SET
status = 0
WHERE
id=#{id}
id=#{id}
</update>
</mapper>

@ -51,8 +51,10 @@
</update>
<delete id="delete" parameterType="Long">
DELETE
wechat_accesstoken
UPDATE
wechat_accesstoken
SET
status = 0
WHERE
id=#{id}
</delete>

@ -56,12 +56,13 @@
</update>
<delete id="delete" parameterType="Long">
DELETE
UPDATE
wechat_info
SET
status = 0
WHERE
id=#{id}
AND
status = 1
</delete>
<select id="count" resultType="int" parameterType="com.lq.cms.vo.WechatInfoVo">

@ -63,7 +63,7 @@
<update id="delete" parameterType="Long">
UPDATE
FROM wechat_rule
wechat_rule
SET
status = 0
WHERE

@ -72,7 +72,7 @@
<update id="delete" parameterType="Long">
UPDATE
FROM wechat_user
wechat_user
SET
status = 0
WHERE

Loading…
Cancel
Save