Commit 4ae217e7 authored by wzp's avatar wzp

修改bug

parent ad1a6aea
......@@ -170,15 +170,22 @@ class SystemOperationLogService extends ServiceImpl<SysLogMapper, SysLog> {
//判断是哪个页面调的用户接口,返回不同日志操作对象
if (methodLog.operModule().getCode() == OperModule.USER.getCode()) {
TUser u = null;
String type = null;
if (methodLog.operType().getCode() == OperType.ADD.getCode() || methodLog.operType().getCode() == OperType.UPDATE.getCode()) {
u = (TUser) method_param[0];
type=u.getType();
} else if (methodLog.operType().getCode() == OperType.CHANGE_PASSWORD.getCode()) {
u = user;
} else {
type=u.getType();
} else if (methodLog.operType().getCode() == OperType.SELECT.getCode()) {
String s = (String) method_param[0];
type=s;
}else {
String s = (String) method_param[0];
u = userService.getById(s);
type=u.getType();
}
switch (u.getType()) {
switch (type) {
case "1":
// 设置标题
sysLog.setOperationObject(OperModule.USER.getMsg());
......
......@@ -2,6 +2,10 @@ package cn.wisenergy.chnmuseum.party.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import cn.wisenergy.chnmuseum.party.model.TInteraction;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* <pre>
......@@ -13,4 +17,5 @@ import cn.wisenergy.chnmuseum.party.model.TInteraction;
*/
public interface TInteractionMapper extends BaseMapper<TInteraction> {
List<TInteraction> selectPageList(Page<TInteraction> page, @Param("orgId") String orgId);
}
......@@ -96,4 +96,9 @@ public class TInteraction implements Serializable {
@TableField(exist = false)
@NotNull(message = "密码不能为空", groups = {Add.class})
private String password;
@ApiModelProperty("展板名称")
@TableField(exist = false)
private String boardName;
}
package cn.wisenergy.chnmuseum.party.service;
import cn.wisenergy.chnmuseum.party.model.TInteraction;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
/**
......@@ -13,4 +14,5 @@ import com.baomidou.mybatisplus.extension.service.IService;
*/
public interface TInteractionService extends IService<TInteraction> {
Page<TInteraction> selectPageList(Page<TInteraction> page, String orgId);
}
......@@ -3,6 +3,7 @@ package cn.wisenergy.chnmuseum.party.service.impl;
import cn.wisenergy.chnmuseum.party.model.TInteraction;
import cn.wisenergy.chnmuseum.party.mapper.TInteractionMapper;
import cn.wisenergy.chnmuseum.party.service.TInteractionService;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import lombok.extern.slf4j.Slf4j;
......@@ -27,4 +28,8 @@ public class TInteractionServiceImpl extends ServiceImpl<TInteractionMapper, TIn
@Resource
private TInteractionMapper tInteractionMapper;
@Override
public Page<TInteraction> selectPageList(Page<TInteraction> page, String orgId) {
return page.setRecords(tInteractionMapper.selectPageList(page,orgId));
}
}
......@@ -159,7 +159,7 @@ public class TInteractionController extends BaseController {
public Map<String, Object> getTInteractionPageList(String orgId) {
Page<TInteraction> list = null;
try {
list = tInteractionService.page(getPage(),new UpdateWrapper<TInteraction>().eq("organ_id", orgId).orderByDesc("create_time"));
list = tInteractionService.selectPageList(getPage(),orgId);
return getResult(list);
} catch (Exception e) {
e.printStackTrace();
......
......@@ -81,7 +81,7 @@ public class TUserController extends BaseController {
@RequestMapping(value = "/getPageList", method = RequestMethod.GET)
@RequiresPermissions("/user/getPageList")
@MethodLog(operModule = OperModule.USER, operType = OperType.SELECT)
public Map<String, Object> getPageList(String userName, String status, String type, String orgId, String areaId) {
public Map<String, Object> getPageList( String type,String userName,String status, String orgId, String areaId) {
TUser user1 = getcurUser();
TUser user = new TUser();
if (StringUtils.isNotBlank(userName)) {
......@@ -164,7 +164,7 @@ public class TUserController extends BaseController {
@ApiOperation(value = "获取用户详情", notes = "获取用户详情")
@GetMapping("/getById")
@RequiresPermissions("/user/getById")
@MethodLog(operModule = OperModule.USER, operType = OperType.SELECT)
@MethodLog(operModule = OperModule.USER, operType = OperType.DETAILS)
public Map<String, Object> getById(String id) {
try {
TUser tUser = userService.selectById(id);
......
......@@ -5,6 +5,7 @@
<!-- 通用查询映射结果 -->
<resultMap id="BaseResultMap" type="cn.wisenergy.chnmuseum.party.model.TInteraction">
<id column="id" property="id"/>
<result column="board_name" property="boardName"/>
<result column="organ_id" property="organId"/>
<result column="username" property="username"/>
<result column="board_id" property="boardId"/>
......@@ -20,4 +21,11 @@
id, organ_id, username, board_id, study_time, num, content, images, create_time
</sql>
<select id="selectPageList" resultMap="BaseResultMap">
SELECT i.*,e.`name` board_name
FROM t_interaction i
left join exhibition_board e on e.id = i.board_id
where i.organ_id =#{orgId}
</select>
</mapper>
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