Commit a077e601 by qwmqiuwenmin

fix

parent 7513023d
package com.gic.haoban.manage.web.controller;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.stream.Collectors;
......@@ -34,6 +35,7 @@ import com.gic.haoban.manage.web.qo.DepartmentAddQO;
import com.gic.haoban.manage.web.qo.DepartmentEditQO;
import com.gic.haoban.manage.web.vo.LoginVO;
import com.gic.haoban.manage.web.vo.StoreVo;
import com.gic.redis.data.util.RedisUtil;
@RestController
public class DepartmentContoller extends WebBaseController{
......@@ -153,7 +155,9 @@ public class DepartmentContoller extends WebBaseController{
LoginVO login = (LoginVO) AuthRequestUtil.getSessionUser();
String wxEnterpriseId = login.getWxEnterpriseId();
Integer count = departmentApiService.departmentRecycleCount(wxEnterpriseId);
Map<String,Object> map = new HashMap<String, Object>();
map.put("count", count);
map.put("syncDate", RedisUtil.getCache("haoban-sync-department-" + wxEnterpriseId));
return resultResponse(HaoBanErrCode.ERR_1,count);
}
......@@ -180,6 +184,9 @@ public class DepartmentContoller extends WebBaseController{
@RequestMapping("department-batch-sync")
public HaobanResponse departmentBatchSync(String editDepartment,String delDepartmentIds,String addDepartment) {
LoginVO login = (LoginVO) AuthRequestUtil.getSessionUser();
String wxEnterpriseId = login.getWxEnterpriseId();
RedisUtil.setCache("haoban-sync-department-" + wxEnterpriseId,System.currentTimeMillis());
if(StringUtils.isNotBlank(addDepartment)) {
List<DepartmentAddQO> list = JSONArray.parseArray(addDepartment, DepartmentAddQO.class);
for (DepartmentAddQO departmentAddQO : list) {
......
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