...
This commit is contained in:
parent
ac9fb347b4
commit
3e830afcce
@ -12,8 +12,10 @@ import com.nbclass.szxgl.mapper.ListTypeMapper;
|
||||
import com.nbclass.szxgl.model.ListType;
|
||||
import com.nbclass.szxgl.model.ProjectTask;
|
||||
import com.nbclass.szxgl.model.ProjectTaskJournal;
|
||||
import com.nbclass.szxgl.model.SyUsers;
|
||||
import com.nbclass.szxgl.service.ProjectService;
|
||||
import com.nbclass.szxgl.service.ProjectTaskService;
|
||||
import com.nbclass.szxgl.service.SyUsersService;
|
||||
import com.nbclass.util.PageUtil;
|
||||
import com.nbclass.util.ResultUtil;
|
||||
import com.nbclass.vo.base.ResponseVo;
|
||||
@ -48,6 +50,9 @@ public class ProjectTaskController extends BaseController {
|
||||
@Resource
|
||||
private ListTypeMapper listTypeMapper;
|
||||
|
||||
@Resource
|
||||
private SyUsersService syUsersService;
|
||||
|
||||
@InitBinder
|
||||
public void initBinder(WebDataBinder binder) {
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm");
|
||||
@ -92,12 +97,47 @@ public class ProjectTaskController extends BaseController {
|
||||
@RequestMapping("/journal/getList")
|
||||
@ResponseBody
|
||||
public ResponseVo selectProjectTaskJournalList(String taskId) {
|
||||
User user = (User) SecurityUtils.getSubject().getPrincipal();
|
||||
SyUsers syUsers = syUsersService.selectByUsername(user.getUserId());
|
||||
//根据部门id上级领导
|
||||
String name = syUsersService.getByIsLeader(syUsers.getDeptId());
|
||||
boolean result = false;
|
||||
//判断用户是否上级领导
|
||||
if(user.getUsername().equals(name)){
|
||||
result = true;
|
||||
}
|
||||
List<ProjectTaskJournal> list = service.getTaskJournalList(taskId);
|
||||
JSONObject obj = new JSONObject();
|
||||
obj.put("rows", list);
|
||||
obj.put("result", result);
|
||||
return ResultUtil.success("success", obj);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新任务评分分数和点评内容
|
||||
* @param taskId 任务id
|
||||
* @param score 评分分数
|
||||
* @param comment 点评内容
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/journal/update")
|
||||
@ResponseBody
|
||||
public ResponseVo updateProjectTaskJournal(String taskId,Double score,String comment) {
|
||||
// User user = (User) SecurityUtils.getSubject().getPrincipal();
|
||||
// if(user==null && SpringContextHolder.isProd()) {
|
||||
// throw new ParameterException("登录失效,请重新登录!");
|
||||
// }
|
||||
ProjectTaskJournal projectTaskJournal = new ProjectTaskJournal();
|
||||
projectTaskJournal.setScore(score);
|
||||
projectTaskJournal.setComment(comment);
|
||||
projectTaskJournal.setId(taskId);
|
||||
//projectTaskJournal.setCommentId(user.getUserId());
|
||||
projectTaskJournal.setCommentId("85cde14893fc4c2d805a1876c0718106");
|
||||
projectTaskJournal.setStatus(1);
|
||||
service.updateTaskJournal(projectTaskJournal);
|
||||
return ResultUtil.success("success");
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除任务
|
||||
*
|
||||
@ -185,17 +225,18 @@ public class ProjectTaskController extends BaseController {
|
||||
* 添加任务进度日志
|
||||
*
|
||||
* @param j
|
||||
* @param listType json数组
|
||||
* @param errors
|
||||
* @param speed
|
||||
*/
|
||||
@RequestMapping("/myTask/addJournal")
|
||||
@ResponseBody
|
||||
public ResponseVo addJournal(@Valid ProjectTaskJournal j,Errors errors,short speed) {
|
||||
public ResponseVo addJournal(@Valid ProjectTaskJournal j,String listType,Errors errors,short speed) {
|
||||
|
||||
if (errors.hasErrors()) {
|
||||
return ResultUtil.error("参数验证失败");
|
||||
}
|
||||
projectTaskService.addProjectTaskJournal(j, speed);
|
||||
projectTaskService.addProjectTaskJournal(j,listType, speed);
|
||||
return ResultUtil.success("success");
|
||||
}
|
||||
|
||||
@ -210,4 +251,16 @@ public class ProjectTaskController extends BaseController {
|
||||
return ResultUtil.success(listTypes);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取字体类型列表
|
||||
* @param name 字体类型名称名称
|
||||
* @return
|
||||
*/
|
||||
@RequestMapping("/myTask/getFontType")
|
||||
@ResponseBody
|
||||
public ResponseVo getFontType(String name){
|
||||
List<ListType> listTypes = listTypeMapper.getFontType(name);
|
||||
return ResultUtil.success(listTypes);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -17,4 +17,6 @@ public interface ListTypeMapper extends MyMapper<ListType> {
|
||||
public String getAreaIdByName(@Param("areaName")String areaName);
|
||||
|
||||
List<ListType> getComboBox();
|
||||
|
||||
List<ListType> getFontType(String name);
|
||||
}
|
||||
|
||||
@ -3,10 +3,12 @@ package com.nbclass.szxgl.mapper;
|
||||
import java.util.List;
|
||||
|
||||
import com.nbclass.szxgl.model.ProjectTaskJournal;
|
||||
import com.nbclass.szxgl.model.ProjectTaskJournalFontType;
|
||||
import com.nbclass.util.MyMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface ProjectTaskJournalMapper extends MyMapper<ProjectTaskJournal> {
|
||||
|
||||
|
||||
/**
|
||||
* 根据任务id获取任务日志进度列表
|
||||
* @param taskId
|
||||
@ -15,4 +17,24 @@ public interface ProjectTaskJournalMapper extends MyMapper<ProjectTaskJournal> {
|
||||
public List<ProjectTaskJournal> getList(String taskId);
|
||||
|
||||
public void deleteByTaskId(String projectTaskId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新任务评分分数和点评内容
|
||||
* @return
|
||||
*/
|
||||
void updateTaskJournal(ProjectTaskJournal projectTaskJournal);
|
||||
|
||||
/**
|
||||
* 点评人id获取用户姓名
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
String getUserName(String id);
|
||||
|
||||
|
||||
/**
|
||||
* 更新日志字体类型信息
|
||||
*/
|
||||
void addTaskFontType(ProjectTaskJournalFontType fontType);
|
||||
|
||||
}
|
||||
|
||||
@ -8,14 +8,14 @@ import com.nbclass.util.MyMapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
public interface QywxUserMapper extends MyMapper<QywxUser> {
|
||||
|
||||
|
||||
|
||||
|
||||
List<Map<String, Object>> findByUserId(String userId);
|
||||
|
||||
|
||||
List<Map<String, Object>> findAllByDepartment(String depId);
|
||||
|
||||
|
||||
List<Map<String, Object>> findByDepartment(String depId);
|
||||
|
||||
|
||||
List<Map<String, Object>> findSuperiorLeadersByDepartment(String depId);
|
||||
|
||||
/**
|
||||
@ -25,4 +25,4 @@ public interface QywxUserMapper extends MyMapper<QywxUser> {
|
||||
*/
|
||||
List<Map<String, Object>> getUserInfoByUserIds(@Param("userIds") List<String> userIds);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -7,8 +7,15 @@ import com.nbclass.szxgl.model.SyUsers;
|
||||
import com.nbclass.util.MyMapper;
|
||||
|
||||
public interface SyUsersMapper extends MyMapper<SyUsers> {
|
||||
|
||||
|
||||
public SyUsers findByUserName(String userName);
|
||||
|
||||
|
||||
public List<String> findIdByDeptId(String deptId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据部门id上级领导
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
String getByIsLeader(String deptId);
|
||||
}
|
||||
|
||||
@ -54,6 +54,30 @@ public class ProjectTaskJournal {
|
||||
@Column(name = "_risk")
|
||||
private Integer risk;
|
||||
|
||||
/**
|
||||
* 评分分数
|
||||
*/
|
||||
@Column(name = "_score")
|
||||
private Double score;
|
||||
|
||||
/**
|
||||
* 任务点评
|
||||
*/
|
||||
@Column(name = "_comment")
|
||||
private String comment;
|
||||
|
||||
/**
|
||||
* 点评人id
|
||||
*/
|
||||
@Column(name = "_comment_id")
|
||||
private String commentId;
|
||||
|
||||
/**
|
||||
* 点评状态(1、已点评 2、未点评)
|
||||
*/
|
||||
@Column(name = "_status")
|
||||
private Integer status;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
@ -249,4 +273,36 @@ public class ProjectTaskJournal {
|
||||
public void setRisk(Integer risk) {
|
||||
this.risk = risk;
|
||||
}
|
||||
|
||||
public double getScore() {
|
||||
return score;
|
||||
}
|
||||
|
||||
public void setScore(Double score) {
|
||||
this.score = score;
|
||||
}
|
||||
|
||||
public String getComment() {
|
||||
return comment;
|
||||
}
|
||||
|
||||
public void setComment(String comment) {
|
||||
this.comment = comment;
|
||||
}
|
||||
|
||||
public String getCommentId() {
|
||||
return commentId;
|
||||
}
|
||||
|
||||
public void setCommentId(String commentId) {
|
||||
this.commentId = commentId;
|
||||
}
|
||||
|
||||
public Integer getStatus() {
|
||||
return status;
|
||||
}
|
||||
|
||||
public void setStatus(Integer status) {
|
||||
this.status = status;
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,29 @@
|
||||
package com.nbclass.szxgl.model;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
public class ProjectTaskJournalFontType {
|
||||
|
||||
private String id;
|
||||
|
||||
/**
|
||||
* 字典值id
|
||||
*/
|
||||
private String listValuesId;
|
||||
|
||||
/**
|
||||
* 任务id
|
||||
*/
|
||||
private String projectTaskJournalId;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createdTime;
|
||||
|
||||
private String listValue;
|
||||
|
||||
}
|
||||
@ -13,7 +13,7 @@ import com.nbclass.szxgl.model.ProjectTask;
|
||||
import com.nbclass.szxgl.model.ProjectTaskJournal;
|
||||
|
||||
/**
|
||||
*
|
||||
*
|
||||
* @author Leon
|
||||
* @datetime 2019年4月24日 下午4:24:11
|
||||
*/
|
||||
@ -26,7 +26,7 @@ public interface ProjectService {
|
||||
* @return
|
||||
*/
|
||||
public boolean hasUpdateProject(String pid);
|
||||
|
||||
|
||||
/**
|
||||
* 拥有对项目文档的权限
|
||||
* 管理员、项目创建者、项目负责人、项目任务执行人 才有修改权限
|
||||
@ -34,7 +34,7 @@ public interface ProjectService {
|
||||
* @return
|
||||
*/
|
||||
public boolean hasPowerForFile(String pid);
|
||||
|
||||
|
||||
/**
|
||||
* 是否有 添加 修改 删除 项目任务的权限
|
||||
* 只有项目创建者或项目负责人才有此权限
|
||||
@ -42,7 +42,7 @@ public interface ProjectService {
|
||||
* @return
|
||||
*/
|
||||
public boolean hasPowerForTask(String pid);
|
||||
|
||||
|
||||
/**
|
||||
* 根据条件查询项目列表
|
||||
* @param project
|
||||
@ -56,7 +56,7 @@ public interface ProjectService {
|
||||
* @return 用户id列表
|
||||
*/
|
||||
public List<String> selectUserIdsByDeptId(String deptId);
|
||||
|
||||
|
||||
/**
|
||||
* 根据主键id查询
|
||||
* @param pid
|
||||
@ -70,14 +70,14 @@ public interface ProjectService {
|
||||
* @return
|
||||
*/
|
||||
public List<ProjectFiles> getFileList(String pid);
|
||||
|
||||
|
||||
/**
|
||||
* 项目任务列表
|
||||
* @param pid
|
||||
* @return
|
||||
*/
|
||||
public List<ProjectTask> getTaskList(String pid);
|
||||
|
||||
|
||||
/**
|
||||
* 项目任务进度日志列表
|
||||
* @param taskId
|
||||
@ -90,7 +90,7 @@ public interface ProjectService {
|
||||
* @return
|
||||
*/
|
||||
public List<ListType> getListValues(String listType);
|
||||
|
||||
|
||||
/**
|
||||
* 添加项目
|
||||
* @param p
|
||||
@ -152,5 +152,11 @@ public interface ProjectService {
|
||||
* @return
|
||||
*/
|
||||
public void updateProjectStatus(String id, String contractno, String status);
|
||||
|
||||
|
||||
/**
|
||||
* 更新任务评分分数和点评内容
|
||||
* @return
|
||||
*/
|
||||
void updateTaskJournal(ProjectTaskJournal projectTaskJournal);
|
||||
|
||||
}
|
||||
|
||||
@ -50,7 +50,7 @@ public interface ProjectTaskService {
|
||||
* @param j
|
||||
* @return
|
||||
*/
|
||||
public void addProjectTaskJournal(ProjectTaskJournal j, short speed);
|
||||
public void addProjectTaskJournal(ProjectTaskJournal j,String listType, short speed);
|
||||
|
||||
/**
|
||||
* //判断当前用户是否是任务的执行人
|
||||
|
||||
@ -15,6 +15,11 @@ public interface SyUsersService {
|
||||
*/
|
||||
public SyUsers selectByUsername(String username);
|
||||
|
||||
|
||||
/**
|
||||
* 根据部门id上级领导
|
||||
* @param deptId
|
||||
* @return
|
||||
*/
|
||||
String getByIsLeader(String deptId);
|
||||
|
||||
}
|
||||
|
||||
@ -991,6 +991,11 @@ public class ProjectServiceImpl implements ProjectService {
|
||||
mapper.updateProjectStatus(setuptime, id, contractno, Integer.parseInt(status),updatetime);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateTaskJournal(ProjectTaskJournal projectTaskJournal) {
|
||||
journalMapper.updateTaskJournal(projectTaskJournal);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<Map<String, Object>> selectZxrUserObj(String userIds) {
|
||||
List<Map<String, Object>> resultMap = new ArrayList<>();
|
||||
|
||||
@ -53,6 +53,9 @@ public class ProjectTaskServiceImpl implements ProjectTaskService {
|
||||
@Resource
|
||||
private ProjectTaskTermMapper projectTaskTermMapper;
|
||||
|
||||
@Resource
|
||||
private QywxUserMapper qywxUserMapper;
|
||||
|
||||
|
||||
@Override
|
||||
public boolean deleteProjectTask(String projectId, String[] ids) {
|
||||
@ -277,7 +280,7 @@ public class ProjectTaskServiceImpl implements ProjectTaskService {
|
||||
|
||||
|
||||
@Override
|
||||
public void addProjectTaskJournal(ProjectTaskJournal j, short speed) {
|
||||
public void addProjectTaskJournal(ProjectTaskJournal j,String listType,short speed) {
|
||||
ProjectTask t = projectTaskMapper.findById(j.getProjectTaskId());
|
||||
if(t==null){
|
||||
throw new ParameterException("任务不存在,可能已被删除!");
|
||||
@ -312,6 +315,24 @@ public class ProjectTaskServiceImpl implements ProjectTaskService {
|
||||
j.setId(UUIDUtil.uuid());
|
||||
j.setCreateTime(DateUtil.currentTimestamp());
|
||||
int insert = projectTaskJournalMapper.insert(j);
|
||||
|
||||
StringBuilder fontTypeNames = new StringBuilder();
|
||||
//更新日志字体类型信息
|
||||
if(StringUtils.isNoneBlank(listType)){
|
||||
JSONArray jsonArray = JSONObject.parseArray(listType);
|
||||
for (int i = 0; i < jsonArray.size(); i++) {
|
||||
ProjectTaskJournalFontType fontType = jsonArray.getObject(i, ProjectTaskJournalFontType.class);
|
||||
fontType.setId(UUIDUtil.uuid());
|
||||
fontType.setProjectTaskJournalId(j.getId());
|
||||
projectTaskJournalMapper.addTaskFontType(fontType);
|
||||
//该步即不会第一位有、,也防止最后一位拼接、
|
||||
if(fontTypeNames.length() > 0){
|
||||
fontTypeNames.append("、");
|
||||
}
|
||||
fontTypeNames.append(fontType.getListValue());
|
||||
}
|
||||
|
||||
}
|
||||
if(insert>0){
|
||||
//更新任务进度
|
||||
projectTaskMapper.updateTaskSpeed(t.getId(), speed);
|
||||
@ -344,13 +365,21 @@ public class ProjectTaskServiceImpl implements ProjectTaskService {
|
||||
if(fzIds!=null && fzIds.size()>0)touser += (StringUtils.isBlank(touser)?"":"|") + StringUtils.join(fzIds, "|");
|
||||
if(userIds!=null && userIds.size()>0)touser += (StringUtils.isBlank(touser)?"":"|") + StringUtils.join(userIds, "|");
|
||||
|
||||
//点评人id获取用户姓名
|
||||
String name = projectTaskJournalMapper.getUserName(j.getId());
|
||||
|
||||
String description =
|
||||
"<div class=\"gray\">"+DateUtil.date2String(new Date(), "yyyy年MM月dd日 HH:mm")+"</div><br><br>"
|
||||
+ "项目名称:"+projectName+"<br>"
|
||||
+ "任务名称:"+taskName
|
||||
+ "<div class=\"highlight\">"+j.getJournal()+"</div><br>"
|
||||
// + "操作用户:"+user.getUsername()+"<br>"
|
||||
+ "进度说明:"+j.getContent();
|
||||
+ "已使用字体:"+fontTypeNames+"<br>"
|
||||
+ "素材是否有侵权风险?:"+""+((j.getRisk() == 1) ? "无风险":"有风险")+""
|
||||
+ "进度说明:"+j.getContent()+"<br>"
|
||||
+ name+" "
|
||||
+ ""+((j.getStatus() == 1) ? "已点评":"未点评")+""+"<br>"
|
||||
+ "点评内容:"+""+((j.getComment() == null) ? "暂无评论":""+j.getComment()+"")+"";
|
||||
if(StringUtils.isNotBlank(touser)){
|
||||
SendMsgUtil.sendWxMsgByNewTask(touser, t.getProjectId(), description);
|
||||
}
|
||||
|
||||
@ -26,4 +26,9 @@ public class SyUsersServiceImpl implements SyUsersService {
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getByIsLeader(String deptId) {
|
||||
return mapper.getByIsLeader(deptId);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -32,4 +32,8 @@
|
||||
select * from list_values WHERE parent_id = #{id} and parent_id !='' and parent_id is not null
|
||||
</select>
|
||||
|
||||
<select id="getFontType" resultType="com.nbclass.szxgl.model.ListType">
|
||||
select id,list_value from list_values where list_value like CONCAT('%',#{name},'%') and list_type = 360
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -15,17 +15,55 @@
|
||||
<result column="_create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="_update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="getList" resultType="com.nbclass.szxgl.model.ProjectTaskJournal">
|
||||
select j.*, sy_users.true_name as createUserName
|
||||
from project_task_journal j
|
||||
left join sy_users ON j._create_user_id = sy_users.id
|
||||
where j._project_task_id = #{taskId}
|
||||
order by j._create_time desc
|
||||
select j.*, sy_users.true_name as createUserName
|
||||
from project_task_journal j
|
||||
left join sy_users ON j._create_user_id = sy_users.id
|
||||
where j._project_task_id = #{taskId}
|
||||
order by j._create_time desc
|
||||
</select>
|
||||
|
||||
<delete id="deleteByTaskId" parameterType="java.lang.String">
|
||||
delete from project_task_journal where _project_task_id = #{projectTaskId}
|
||||
</delete>
|
||||
|
||||
</mapper>
|
||||
|
||||
<update id="updateTaskJournal">
|
||||
update project_task_journal set
|
||||
<if test="score!=null">
|
||||
_score = #{score},
|
||||
</if>
|
||||
<if test="comment!=null and comment!=''">
|
||||
_comment = #{comment},
|
||||
</if>
|
||||
<if test="commentId!=null and commentId!=''">
|
||||
_comment_id = #{commentId},
|
||||
</if>
|
||||
<if test="status!=null">
|
||||
_status = #{status}
|
||||
</if>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<select id="getUserName" resultType="java.lang.String">
|
||||
select su.true_name from project_task_journal j LEFT JOIN sy_users su ON j._comment_id = su.id where j.id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="addTaskFontType" useGeneratedKeys="true" keyProperty="id" keyColumn="id">
|
||||
insert into project_task_journal_font_type
|
||||
(
|
||||
id,
|
||||
list_values_id,
|
||||
project_task_journal_id,
|
||||
created_time
|
||||
)
|
||||
values
|
||||
(
|
||||
#{id},
|
||||
#{listValuesId},
|
||||
#{projectTaskJournalId},
|
||||
now()
|
||||
)
|
||||
</insert>
|
||||
|
||||
</mapper>
|
||||
|
||||
@ -22,21 +22,21 @@
|
||||
<result column="Telephone" jdbcType="VARCHAR" property="telephone" />
|
||||
<result column="ExtAttr" jdbcType="VARCHAR" property="extattr" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
<select id="findByUserId" parameterType="java.lang.String" resultType="map">
|
||||
SELECT Department, IsLeader, Avatar FROM qywx_user WHERE UserID = #{userId}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findAllByDepartment" parameterType="java.lang.String" resultType="map">
|
||||
SELECT UserID, NAME, Avatar FROM qywx_user WHERE IsLeader = 1 AND Department IN (SELECT ParentId FROM qywx_party WHERE Id IN ( #{depId} ))
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findByDepartment" parameterType="java.lang.String" resultType="map">
|
||||
<!--SELECT UserID, NAME, Avatar FROM qywx_user WHERE IsLeader = 1 AND Department IN (#{depId})-->
|
||||
<!--用户有多个部门的情况,存储形式逗号分隔,FIND_IN_SET精准匹配某一个-->
|
||||
SELECT UserID, NAME, Avatar FROM qywx_user WHERE IsLeader = 1 AND FIND_IN_SET(#{depId}, Department)
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findSuperiorLeadersByDepartment" parameterType="java.lang.String" resultType="map">
|
||||
SELECT UserID, NAME, Avatar FROM qywx_user WHERE IsLeader = 1 AND Department IN (SELECT ParentId FROM qywx_party WHERE Id IN (#{depId}) )
|
||||
</select>
|
||||
@ -51,4 +51,3 @@
|
||||
|
||||
</mapper>
|
||||
|
||||
|
||||
@ -22,14 +22,18 @@
|
||||
<result column="mobile_phone_number" jdbcType="CHAR" property="mobilePhoneNumber" />
|
||||
<result column="isleader" jdbcType="BIT" property="isleader" />
|
||||
</resultMap>
|
||||
|
||||
|
||||
|
||||
|
||||
<select id="findByUserName" parameterType="java.lang.String" resultType="com.nbclass.szxgl.model.SyUsers">
|
||||
SELECT * from sy_users where user_name =#{userName}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="findIdByDeptId" parameterType="java.lang.String" resultType="string">
|
||||
select id from SyUsers where deptId=#{deptId}
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
<select id="getByIsLeader" resultType="java.lang.String">
|
||||
select user_name from sy_users where deptId=#{deptId} and isleader = 1
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user