|
|
|
@ -22,10 +22,11 @@ import java.util.Map;
|
|
|
|
|
public interface TaskMapper extends BaseMapper<Task> {
|
|
|
|
|
@Insert("insert into task (title,subtitle,start,end) values (#{title},#{subtitle},#{start},#{end})")
|
|
|
|
|
int add(Task task);
|
|
|
|
|
|
|
|
|
|
@Select("<script>" +
|
|
|
|
|
"SELECT t1.id " +
|
|
|
|
|
"from task t1 " +
|
|
|
|
|
"WHERE t1.id "+
|
|
|
|
|
"WHERE t1.id " +
|
|
|
|
|
|
|
|
|
|
"<if test='tagIdList !=null and tagIdList.size()!=0'> " +
|
|
|
|
|
"and t1.id in (SELECT taskId from taskTag WHERE taskTag.tagId in " +
|
|
|
|
@ -39,12 +40,12 @@ public interface TaskMapper extends BaseMapper<Task> {
|
|
|
|
|
")" +
|
|
|
|
|
"</if>" +
|
|
|
|
|
|
|
|
|
|
"<if test='openid!=null'>"+
|
|
|
|
|
"<if test='openid!=null'>" +
|
|
|
|
|
"and IF((SELECT count(*)!=0 FROM taskDepartment WHERE taskId = t1.id)>0," +
|
|
|
|
|
"t1.id in (SELECT taskId from taskDepartment inner JOIN user on user.openid =#{openid} " +
|
|
|
|
|
"and user.main_department = taskDepartment.departmentId), " +
|
|
|
|
|
" 1=1)"+
|
|
|
|
|
"</if>"+
|
|
|
|
|
" 1=1)" +
|
|
|
|
|
"</if>" +
|
|
|
|
|
|
|
|
|
|
"<if test='ew != null'>" +
|
|
|
|
|
"<if test='ew.nonEmptyOfWhere'>" +
|
|
|
|
@ -55,9 +56,11 @@ public interface TaskMapper extends BaseMapper<Task> {
|
|
|
|
|
|
|
|
|
|
"ORDER BY t1.updateAt DESC,t1.creatAt DESC" +
|
|
|
|
|
"</script>")
|
|
|
|
|
IPage<Integer> idList(IPage iPage,String openid, List<Integer> tagIdList, List<Integer> brandIdList, @Param("ew") Wrapper<Reference> queryWrapper);
|
|
|
|
|
List<Map> list(String openid,List<Integer> list, List<Integer> tagIdList, List<Integer> brandIdList, @Param("ew") Wrapper<Reference> queryWrapper);
|
|
|
|
|
Task detailById(String openid,int id);
|
|
|
|
|
IPage<Integer> idList(IPage iPage, String openid, List<Integer> tagIdList, List<Integer> brandIdList, @Param("ew") Wrapper<Reference> queryWrapper);
|
|
|
|
|
|
|
|
|
|
List<Map> list(String openid, List<Integer> list, List<Integer> tagIdList, List<Integer> brandIdList, @Param("ew") Wrapper<Reference> queryWrapper);
|
|
|
|
|
|
|
|
|
|
Task detailById(String openid, int id);
|
|
|
|
|
|
|
|
|
|
@Select("SELECT SUM(t1.playNum) as playNumSum,SUM(t1.commendNum) as commendNumSum,\n" +
|
|
|
|
|
"SUM(t1.collectionNum) as collectionNumSum,SUM(t1.commentNum) as commentNumSum,\n" +
|
|
|
|
@ -67,6 +70,7 @@ public interface TaskMapper extends BaseMapper<Task> {
|
|
|
|
|
"LEFT JOIN qywxDepartment as t4 on t3.main_department = t4.departmentId " +
|
|
|
|
|
"${ew.customSqlSegment}")
|
|
|
|
|
JSONObject taskEffect(@Param("ew") Wrapper<Task> queryWrapper);
|
|
|
|
|
|
|
|
|
|
@Select("SELECT SUM(t1.playNum) as playNumSum,SUM(t1.commendNum) as commendNumSum,\n" +
|
|
|
|
|
"SUM(t1.collectionNum) as collectionNumSum,SUM(t1.commentNum) as commentNumSum,\n" +
|
|
|
|
|
"SUM(t1.reSendNum) as reSendNumSum,SUM(t1.recommendNum) as recommendNumSum,SUM(t1.effectResult) as effectResultSum,t1.userId,\n" +
|
|
|
|
@ -75,4 +79,7 @@ public interface TaskMapper extends BaseMapper<Task> {
|
|
|
|
|
"LEFT JOIN qywxDepartment as t4 on t3.main_department = t4.departmentId " +
|
|
|
|
|
"${ew.customSqlSegment}")
|
|
|
|
|
List<Map> taskEffectData(@Param("ew") Wrapper<Task> queryWrapper);
|
|
|
|
|
|
|
|
|
|
@Select("select t1.departmentId,t2.name as departmentName from taskDepartment t1 left join qywxDepartment t2 on t1.departmentId = t2.departmentId")
|
|
|
|
|
List<Map> taskDepartment(int taskId);
|
|
|
|
|
}
|
|
|
|
|