Commit c41ff68c authored by EDY's avatar EDY

优化

parent 325225c0
package com.ruoyi.web.controller.business; package com.ruoyi.web.controller.business;
import java.util.Date;
import java.util.List; import java.util.List;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
...@@ -78,7 +79,7 @@ public class BaseCustomFollowRecordController extends BaseController ...@@ -78,7 +79,7 @@ public class BaseCustomFollowRecordController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody BaseCustomFollowRecord baseCustomFollowRecord) public AjaxResult add(@RequestBody BaseCustomFollowRecord baseCustomFollowRecord)
{ {
baseCustomFollowRecord.setGjr(getUsername()); baseCustomFollowRecord.setGjr(getLoginUser().getUser().getNickName());
return toAjax(baseCustomFollowRecordService.insertBaseCustomFollowRecord(baseCustomFollowRecord)); return toAjax(baseCustomFollowRecordService.insertBaseCustomFollowRecord(baseCustomFollowRecord));
} }
...@@ -90,6 +91,8 @@ public class BaseCustomFollowRecordController extends BaseController ...@@ -90,6 +91,8 @@ public class BaseCustomFollowRecordController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody BaseCustomFollowRecord baseCustomFollowRecord) public AjaxResult edit(@RequestBody BaseCustomFollowRecord baseCustomFollowRecord)
{ {
baseCustomFollowRecord.setUpdateTime(new Date());
baseCustomFollowRecord.setUpdateBy(getLoginUser().getUser().getNickName());
return toAjax(baseCustomFollowRecordService.updateBaseCustomFollowRecord(baseCustomFollowRecord)); return toAjax(baseCustomFollowRecordService.updateBaseCustomFollowRecord(baseCustomFollowRecord));
} }
......
...@@ -79,7 +79,7 @@ public class BaseCustomInfoController extends BaseController ...@@ -79,7 +79,7 @@ public class BaseCustomInfoController extends BaseController
@PostMapping @PostMapping
public AjaxResult add(@RequestBody BaseCustomInfo baseCustomInfo) public AjaxResult add(@RequestBody BaseCustomInfo baseCustomInfo)
{ {
baseCustomInfo.setFzr(getUsername()); baseCustomInfo.setFzr(getLoginUser().getUser().getNickName());
baseCustomInfo.setCreateTime(new Date()); baseCustomInfo.setCreateTime(new Date());
baseCustomInfo.setCreateBy(getUsername()); baseCustomInfo.setCreateBy(getUsername());
return toAjax(baseCustomInfoService.insertBaseCustomInfo(baseCustomInfo)); return toAjax(baseCustomInfoService.insertBaseCustomInfo(baseCustomInfo));
...@@ -93,6 +93,8 @@ public class BaseCustomInfoController extends BaseController ...@@ -93,6 +93,8 @@ public class BaseCustomInfoController extends BaseController
@PutMapping @PutMapping
public AjaxResult edit(@RequestBody BaseCustomInfo baseCustomInfo) public AjaxResult edit(@RequestBody BaseCustomInfo baseCustomInfo)
{ {
baseCustomInfo.setUpdateTime(new Date());
baseCustomInfo.setUpdateBy(getLoginUser().getUser().getNickName());
return toAjax(baseCustomInfoService.updateBaseCustomInfo(baseCustomInfo)); return toAjax(baseCustomInfoService.updateBaseCustomInfo(baseCustomInfo));
} }
......
...@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -34,6 +34,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bz != null and bz != ''"> and bz = #{bz}</if> <if test="bz != null and bz != ''"> and bz = #{bz}</if>
<if test="deleteFlag != null "> and delete_flag = #{deleteFlag}</if> <if test="deleteFlag != null "> and delete_flag = #{deleteFlag}</if>
</where> </where>
order by id desc
</select> </select>
<select id="selectBaseCustomFollowRecordById" parameterType="Long" resultMap="BaseCustomFollowRecordResult"> <select id="selectBaseCustomFollowRecordById" parameterType="Long" resultMap="BaseCustomFollowRecordResult">
......
...@@ -82,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" ...@@ -82,6 +82,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="rubbishFlag != null and rubbishFlag == 1"> and khzt = 7</if> <if test="rubbishFlag != null and rubbishFlag == 1"> and khzt = 7</if>
<if test="rubbishFlag != null and rubbishFlag == 0"> and khzt not in (7)</if> <if test="rubbishFlag != null and rubbishFlag == 0"> and khzt not in (7)</if>
</where> </where>
order by id desc
</select> </select>
<select id="selectBaseCustomInfoById" parameterType="Long" resultMap="BaseCustomInfoResult"> <select id="selectBaseCustomInfoById" parameterType="Long" resultMap="BaseCustomInfoResult">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment