Commit 900cff73 by qwmqiuwenmin

Merge branch 'developer' of http://115.159.76.241/haoban3.0/haoban-manage3.0.git into developer

parents 74ea5786 651080b2
......@@ -31,10 +31,12 @@ import com.gic.haoban.manage.service.dao.mapper.StaffDepartmentRelatedMapper;
import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper;
import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseRelatedMapper;
import com.gic.haoban.manage.service.entity.TabHaobanApplication;
import com.gic.haoban.manage.service.entity.TabHaobanDepartment;
import com.gic.haoban.manage.service.entity.TabHaobanStaffDepartmentRelated;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterpriseRelated;
import com.gic.haoban.manage.service.service.ApplicationService;
import com.gic.haoban.manage.service.service.DepartmentService;
import com.gic.haoban.manage.service.service.StaffDepartmentRelatedService;
import com.gic.wechat.api.dto.qywx.ItemDTO;
import com.gic.wechat.api.dto.qywx.QywxXcxSendMessageDTO;
......@@ -59,6 +61,8 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
@Autowired
private WxEnterpriseRelatedMapper wxEnterpriseRelatedMapper;
@Autowired
private DepartmentService departmentService;
@Autowired
private Config config;
@Override
......@@ -146,12 +150,18 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
return map;
}
String wxEnterpriseId = relate.getWxEnterpriseId();
String storeId = clerkDTO.getStoreId();
TabHaobanDepartment tabDepart = departmentService.selectByRelatedId(storeId);
if(tabDepart == null){
return map;
}
String departmentId = tabDepart.getDepartmentId();
List<TabHaobanStaffDepartmentRelated> list = staffDepartmentRelatedMapper.listByWxEnterpriseIdAndClerkCode(wxEnterpriseId, clerkCode);
if(CollectionUtil.isEmpty(list)){
TabHaobanStaffDepartmentRelated tabHaobanStaffDepartmentRelated = staffDepartmentRelatedMapper.getDepartmentIdAndCode(departmentId, clerkCode);
if(tabHaobanStaffDepartmentRelated == null){
return map;
}
String wxUserId = list.get(0).getWxUserId();
String wxUserId = tabHaobanStaffDepartmentRelated.getWxUserId();
TabHaobanWxEnterprise tabHaobanWxEnterprise = wxEnterpriseMapper.selectByPrimaryKey(wxEnterpriseId);
map.put("wxUserId", wxUserId);
......
......@@ -182,7 +182,7 @@ public class LoginController extends WebBaseController{
String o = aes.decryptStr(random);
if(o == null){
logger.info("解密异常");
ModelAndView model = new ModelAndView(new RedirectView("/haoban-3/#/gic-error", false));
ModelAndView model = new ModelAndView(new RedirectView("/haoban-3/#/gic-error", false,false));
return model;
}
JSONObject jsonObject = JSONObject.parseObject(o);
......@@ -191,14 +191,14 @@ public class LoginController extends WebBaseController{
EnterpriseDetailDTO detailDTO = wxEnterpriseRelatedApiService.getByEnterpriseId(gicEnterpriseId);
if (null == detailDTO) {
logger.info("登录失败,不存在对应企业:{}",o);
ModelAndView model = new ModelAndView(new RedirectView("/haoban-3/#/gic-error", false));
ModelAndView model = new ModelAndView(new RedirectView("/haoban-3/#/gic-error", false,false));
return model;
}
//TODO 获取超级管理员账号接口
StaffDTO staff = staffApiService.selectByNationcodeAndPhoneNumber(detailDTO.getWxEnterpriseId(), "86", loginPhoneNumber);
if (null == staff) {
logger.info("登录用户手机号不存在!{}",o);
ModelAndView model = new ModelAndView(new RedirectView("/haoban-3/#/gic-error", false));
ModelAndView model = new ModelAndView(new RedirectView("/haoban-3/#/gic-error", false,false));
return model;
}
// StaffDTO staff = staffApiService.selectById("1");
......
......@@ -321,7 +321,7 @@ public class WxEnterpriseController extends WebBaseController{
}
EnterpriseDTO enterprise = enterpriseService.getEnterpriseByEid(enterpriseId);
if(enterprise == null || enterprise.getExpireTime() == null){
return resultResponse(HaoBanErrCode.ERR_1,true);
return resultResponse(HaoBanErrCode.ERR_1,false);
}
if(enterprise.getExpireTime().getTime() > System.currentTimeMillis()){
return resultResponse(HaoBanErrCode.ERR_1,false);
......
......@@ -19,7 +19,7 @@ public class DepartmentVO implements Serializable{
private Integer level;
private Integer sort;
private Long sort;
private String wxEnterpriseId;
......
......@@ -351,7 +351,7 @@ public class StoreController extends WebBaseController{
}
EnterpriseDTO enterprise = enterpriseService.getEnterpriseByEid(store.getEnterpriseId());
if(enterprise == null || enterprise.getExpireTime() == null){
return true;
return false;
}
if(enterprise.getExpireTime().getTime() > System.currentTimeMillis()){
return false;
......
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