Commit 7085fbb6 by 徐高华

任务数

parent c543b0c6
...@@ -92,4 +92,7 @@ public interface GroupChatPlanApiService { ...@@ -92,4 +92,7 @@ public interface GroupChatPlanApiService {
* @param params * @param params
*/ */
void noticeTimer(String params) ; void noticeTimer(String params) ;
Integer getTaskNum(String wxEnterpriseId, String enterpriseId, String storeId, String clerkId, String staffId);
} }
...@@ -75,4 +75,6 @@ public interface GroupChatPlanOwnerLogMapper { ...@@ -75,4 +75,6 @@ public interface GroupChatPlanOwnerLogMapper {
int getInvalidTask(@Param("enterpriseId")String enterpriseId , @Param("clerkId")String clerkId , @Param("time")Date time ) ; int getInvalidTask(@Param("enterpriseId")String enterpriseId , @Param("clerkId")String clerkId , @Param("time")Date time ) ;
int getOverdueTask(@Param("enterpriseId")String enterpriseId , @Param("clerkId")String clerkId , @Param("time")Date time ) ; int getOverdueTask(@Param("enterpriseId")String enterpriseId , @Param("clerkId")String clerkId , @Param("time")Date time ) ;
int getTaskNum(@Param("enterpriseId")String enterpriseId, @Param("clerkId")String clerkId, @Param("storeId")String storeId, @Param("staffId")String staffId);
} }
\ No newline at end of file
...@@ -44,4 +44,6 @@ public interface GroupChatPlanService { ...@@ -44,4 +44,6 @@ public interface GroupChatPlanService {
String getQwMsgId(String staffId , Date sendTime, GroupMessageServiceImpl.GroupMsgChatType groupMsgChatType) ; String getQwMsgId(String staffId , Date sendTime, GroupMessageServiceImpl.GroupMsgChatType groupMsgChatType) ;
void noticeTimer(String params); void noticeTimer(String params);
Integer getTaskNum(String wxEnterpriseId, String enterpriseId, String storeId, String clerkId, String staffId);
} }
\ No newline at end of file
...@@ -927,4 +927,14 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService { ...@@ -927,4 +927,14 @@ public class GroupChatPlanServiceImpl implements GroupChatPlanService {
} }
} }
} }
@Override
public Integer getTaskNum(String wxEnterpriseId, String enterpriseId, String storeId, String clerkId, String staffId) {
ClerkDTO clerkDTO = this.clerkService.getclerkById(clerkId) ;
if(clerkDTO.getClerkType()==1) {
clerkId = null ;
}
int total = this.groupChatPlanOwnerLogMapper.getTaskNum(enterpriseId,clerkId,storeId,staffId) ;
return total;
}
} }
\ No newline at end of file
...@@ -186,4 +186,9 @@ public class GroupChatPlanApiServiceImpl implements GroupChatPlanApiService { ...@@ -186,4 +186,9 @@ public class GroupChatPlanApiServiceImpl implements GroupChatPlanApiService {
public void noticeTimer(String params) { public void noticeTimer(String params) {
this.groupChatPlanService.noticeTimer(params) ; this.groupChatPlanService.noticeTimer(params) ;
} }
@Override
public Integer getTaskNum(String wxEnterpriseId, String enterpriseId, String storeId, String clerkId, String staffId) {
return this.groupChatPlanService.getTaskNum(wxEnterpriseId,enterpriseId,storeId,clerkId,staffId);
}
} }
...@@ -322,5 +322,15 @@ ...@@ -322,5 +322,15 @@
where a.enterprise_id = #{enterpriseId} and b.end_time = now() where a.enterprise_id = #{enterpriseId} and b.end_time = now()
AND a.clerk_id = #{clerkId} AND a.send_status = 1 and a.delete_flag = 0 AND a.clerk_id = #{clerkId} AND a.send_status = 1 and a.delete_flag = 0
</select> </select>
<select id="getTaskNum" resultType="java.lang.Integer">
select count(1) from tab_haoban_group_chat_plan_owner_log a LEFT JOIN tab_haoban_group_chat_plan b ON a.plan_id = b.plan_id
where a.enterprise_id = #{enterpriseId}
and a.store_id = #{storeId}
<if test="null != clerkId">
AND a.clerk_id = #{clerkId}
</if>
and b.end_time <![CDATA[<=]]> now()
AND a.send_status = 1 and a.delete_flag = 0
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -15,10 +15,7 @@ import com.gic.haoban.manage.web.qo.GroupChatQO; ...@@ -15,10 +15,7 @@ import com.gic.haoban.manage.web.qo.GroupChatQO;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.LogManager;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
...@@ -236,4 +233,19 @@ public class GroupChatPlanController { ...@@ -236,4 +233,19 @@ public class GroupChatPlanController {
return RestResponse.successResult(page.getResult()); return RestResponse.successResult(page.getResult());
} }
/**
* 获取社群群发任务数
* @param wxEnterpriseId
* @param enterpriseId
* @param storeId
* @param clerkId
* @return
*/
@RequestMapping("get-task-num")
@ResponseBody
public RestResponse<Integer> getTaskNum(String wxEnterpriseId , String enterpriseId , String storeId , String clerkId , String staffId) {
return RestResponse.successResult(this.groupChatPlanApiService.getTaskNum(wxEnterpriseId,enterpriseId,storeId,clerkId,staffId)) ;
}
} }
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