Commit 25959804 by 陶光胜

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

parents cff5f593 7513023d
package com.gic.haoban.manage.api.dto;
import java.io.Serializable;
import java.util.Date;
public class MemberUnionidRelatedDTO implements Serializable{
private String memberUnionidRelatedId;
private String memberId;
private String unionid;
private String wxEnterpriseId;
private Integer statusFlag;
private String externalUserid;
private String wxUserId;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
public String getMemberUnionidRelatedId() {
return memberUnionidRelatedId;
}
public void setMemberUnionidRelatedId(String memberUnionidRelatedId) {
this.memberUnionidRelatedId = memberUnionidRelatedId == null ? null : memberUnionidRelatedId.trim();
}
public String getMemberId() {
return memberId;
}
public void setMemberId(String memberId) {
this.memberId = memberId == null ? null : memberId.trim();
}
public String getUnionid() {
return unionid;
}
public void setUnionid(String unionid) {
this.unionid = unionid == null ? null : unionid.trim();
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId == null ? null : wxEnterpriseId.trim();
}
public Integer getStatusFlag() {
return statusFlag;
}
public void setStatusFlag(Integer statusFlag) {
this.statusFlag = statusFlag;
}
public String getExternalUserid() {
return externalUserid;
}
public void setExternalUserid(String externalUserid) {
this.externalUserid = externalUserid == null ? null : externalUserid.trim();
}
public String getWxUserId() {
return wxUserId;
}
public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId == null ? null : wxUserId.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
...@@ -55,6 +55,8 @@ public class WxEnterpriseDTO implements Serializable { ...@@ -55,6 +55,8 @@ public class WxEnterpriseDTO implements Serializable {
private Integer statusFlag; private Integer statusFlag;
private Integer contactFlag;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
...@@ -277,4 +279,13 @@ public class WxEnterpriseDTO implements Serializable { ...@@ -277,4 +279,13 @@ public class WxEnterpriseDTO implements Serializable {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
public Integer getContactFlag() {
return contactFlag;
}
public void setContactFlag(Integer contactFlag) {
this.contactFlag = contactFlag;
}
} }
...@@ -17,7 +17,7 @@ public class YwWxEnterpriseDTO implements Serializable { ...@@ -17,7 +17,7 @@ public class YwWxEnterpriseDTO implements Serializable {
private Integer statusFlag; private Integer statusFlag;
//gic通讯录助手 //gic通讯录助手
private String gicContactHelper; private String contactFlag;
//订购状态 //订购状态
private String buyStatus; private String buyStatus;
//订购时间 //订购时间
...@@ -75,12 +75,13 @@ public class YwWxEnterpriseDTO implements Serializable { ...@@ -75,12 +75,13 @@ public class YwWxEnterpriseDTO implements Serializable {
this.statusFlag = statusFlag; this.statusFlag = statusFlag;
} }
public String getGicContactHelper() {
return gicContactHelper; public String getContactFlag() {
return contactFlag;
} }
public void setGicContactHelper(String gicContactHelper) { public void setContactFlag(String contactFlag) {
this.gicContactHelper = gicContactHelper; this.contactFlag = contactFlag;
} }
public String getBuyStatus() { public String getBuyStatus() {
......
...@@ -29,7 +29,7 @@ public interface DepartmentApiService { ...@@ -29,7 +29,7 @@ public interface DepartmentApiService {
* @return * @return
*/ */
Page<DepartmentDTO> pageFullStoreByWxEnterpriseId( Page<DepartmentDTO> pageFullStoreByWxEnterpriseId(
String wxEnterpriseId, String search,int count,BasePageInfo pageInfo); String wxEnterpriseId, String search,List<String> storeId,int count,BasePageInfo pageInfo);
/** /**
* 根据部门id查询部门 * 根据部门id查询部门
* @param departmentId * @param departmentId
...@@ -115,4 +115,10 @@ public interface DepartmentApiService { ...@@ -115,4 +115,10 @@ public interface DepartmentApiService {
void initwxDepartment(String corpid, String suiteid, String wxEnterpriseId); void initwxDepartment(String corpid, String suiteid, String wxEnterpriseId);
/**
* 回收站的数量
* @param wxEnterpriseId
* @return
*/
Integer departmentRecycleCount(String wxEnterpriseId);
} }
package com.gic.haoban.manage.api.service;
import com.gic.haoban.manage.api.dto.MemberUnionidRelatedDTO;
public interface MemberUnionidRelatedApiService {
MemberUnionidRelatedDTO getByUnionId(String staffId, String memberId);
String addMemberUnionidRelated(MemberUnionidRelatedDTO dto);
void delMemberUnionidRelated(MemberUnionidRelatedDTO dto);
}
...@@ -19,7 +19,7 @@ public interface WxEnterpriseApiService { ...@@ -19,7 +19,7 @@ public interface WxEnterpriseApiService {
* 运维后台获取微信企业id列表 * 运维后台获取微信企业id列表
* @return * @return
*/ */
com.gic.api.base.commons.Page<YwWxEnterpriseDTO> list(BasePageInfo pageInfo,String keyword,String gicContactFlag,String version); com.gic.api.base.commons.Page<YwWxEnterpriseDTO> list(BasePageInfo pageInfo,String keyword,Integer gicContactFlag,String version);
/** /**
* 获取一个 * 获取一个
* @param wxEnterpriseId * @param wxEnterpriseId
...@@ -28,4 +28,9 @@ public interface WxEnterpriseApiService { ...@@ -28,4 +28,9 @@ public interface WxEnterpriseApiService {
WxEnterpriseDTO getOne(String wxEnterpriseId); WxEnterpriseDTO getOne(String wxEnterpriseId);
WxEnterpriseDTO getEnterpriseBycorpId(String corpId); WxEnterpriseDTO getEnterpriseBycorpId(String corpId);
/**
* 更新企业
* @param enterpriseDTO
*/
void update(WxEnterpriseDTO enterpriseDTO);
} }
...@@ -31,8 +31,8 @@ public class EnterpriseController extends WebBaseController{ ...@@ -31,8 +31,8 @@ public class EnterpriseController extends WebBaseController{
private WxEnterpriseApiService wxEnterpriseApiService; private WxEnterpriseApiService wxEnterpriseApiService;
//企业列表 //企业列表
@RequestMapping("wx-enterprise-list") @RequestMapping("wx-enterprise-list")
public HaobanResponse wxEnterpriseList(BasePageInfo pageInfo,String keyword,String gicContactHelper,String version) { public HaobanResponse wxEnterpriseList(BasePageInfo pageInfo,String keyword,Integer contactFlag,String version) {
Page<YwWxEnterpriseDTO> page = wxEnterpriseApiService.list(pageInfo,keyword,gicContactHelper,version); Page<YwWxEnterpriseDTO> page = wxEnterpriseApiService.list(pageInfo,keyword,contactFlag,version);
PageResult<YwWxEnterpriseDTO> pageVo = new PageResult<>(); PageResult<YwWxEnterpriseDTO> pageVo = new PageResult<>();
pageVo.setList(EntityUtil.changeEntityListByJSON(YwWxEnterpriseDTO.class, page.getResult())); pageVo.setList(EntityUtil.changeEntityListByJSON(YwWxEnterpriseDTO.class, page.getResult()));
pageVo.setPageNum(page.getCurrentPage()); pageVo.setPageNum(page.getCurrentPage());
......
...@@ -91,6 +91,19 @@ ...@@ -91,6 +91,19 @@
<artifactId>gic-wechat-api</artifactId> <artifactId>gic-wechat-api</artifactId>
<version>${gic-wechat-api}</version> <version>${gic-wechat-api}</version>
</dependency> </dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-clerk-api</artifactId>
<version>${gic-clerk-api}</version>
</dependency>
<dependency>
<groupId>com.gic</groupId>
<artifactId>gic-member-api</artifactId>
<version>3.0-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
</dependencies> </dependencies>
<build> <build>
......
...@@ -38,11 +38,13 @@ public interface DepartmentMapper { ...@@ -38,11 +38,13 @@ public interface DepartmentMapper {
TabHaobanDepartment getRootByEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId); TabHaobanDepartment getRootByEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId);
Page<TabHaobanDepartment> pageFullStoreByWxEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId,@Param("search")String search,@Param("minCount")int minCount); Page<TabHaobanDepartment> pageFullStoreByWxEnterpriseId(@Param("wxEnterpriseId")String wxEnterpriseId,@Param("search")String search,@Param("storeIds")List<String> storeIds,@Param("minCount")int minCount);
TabHaobanDepartment getByRelatedId(@Param("relatedId")String relatedId); TabHaobanDepartment getByRelatedId(@Param("relatedId")String relatedId);
Page<TabHaobanDepartment> pageByParentId(@Param("parentId")String parentId, @Param("keyword")String keyword); Page<TabHaobanDepartment> pageByParentId(@Param("parentId")String parentId, @Param("keyword")String keyword);
List<TabHaobanDepartment> listByChainId(@Param("chainId")String chainId, @Param("wxEnterpriseId")String wxEnterpriseId); List<TabHaobanDepartment> listByChainId(@Param("chainId")String chainId, @Param("wxEnterpriseId")String wxEnterpriseId);
Integer departmentRecycleCount(@Param("wxEnterpriseId")String wxEnterpriseId);
} }
\ No newline at end of file
package com.gic.haoban.manage.service.dao.mapper;
import org.apache.ibatis.annotations.Param;
import com.gic.haoban.manage.api.dto.MemberUnionidRelatedDTO;
import com.gic.haoban.manage.service.entity.MemberUnionidRelated;
public interface MemberUnionidRelatedMapper {
int deleteByPrimaryKey(String memberUnionidRelatedId);
int insert(MemberUnionidRelated record);
int insertSelective(MemberUnionidRelated record);
MemberUnionidRelated selectByPrimaryKey(String memberUnionidRelatedId);
int updateByPrimaryKeySelective(MemberUnionidRelated record);
int updateByPrimaryKey(MemberUnionidRelated record);
MemberUnionidRelatedDTO getByUnionId(@Param("wxUserId")String wxUserId, @Param("unionid")String unionid);
void deleteByUnionidAndUserId(@Param("unionid")String unionid,@Param("wxUserId") String wxUserId);
}
\ No newline at end of file
...@@ -21,7 +21,7 @@ public interface WxEnterpriseMapper { ...@@ -21,7 +21,7 @@ public interface WxEnterpriseMapper {
int updateByPrimaryKey(TabHaobanWxEnterprise record); int updateByPrimaryKey(TabHaobanWxEnterprise record);
Page<TabHaobanWxEnterprise> list(@Param("keyword") String keyword,@Param("gicContactFlag") String gicContactFlag,@Param("version") String version); Page<TabHaobanWxEnterprise> list(@Param("keyword") String keyword,@Param("gicContactFlag") Integer gicContactFlag,@Param("version") String version);
List<TabHaobanWxEnterprise> listBycorpId(@Param("corpId") String corpId); List<TabHaobanWxEnterprise> listBycorpId(@Param("corpId") String corpId);
} }
\ No newline at end of file
package com.gic.haoban.manage.service.entity;
import java.io.Serializable;
import java.util.Date;
public class MemberUnionidRelated implements Serializable {
private String memberUnionidRelatedId;
private String memberId;
private String unionid;
private String wxEnterpriseId;
private Integer statusFlag;
private String externalUserid;
private String wxUserId;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
public String getMemberUnionidRelatedId() {
return memberUnionidRelatedId;
}
public void setMemberUnionidRelatedId(String memberUnionidRelatedId) {
this.memberUnionidRelatedId = memberUnionidRelatedId == null ? null : memberUnionidRelatedId.trim();
}
public String getMemberId() {
return memberId;
}
public void setMemberId(String memberId) {
this.memberId = memberId == null ? null : memberId.trim();
}
public String getUnionid() {
return unionid;
}
public void setUnionid(String unionid) {
this.unionid = unionid == null ? null : unionid.trim();
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId == null ? null : wxEnterpriseId.trim();
}
public Integer getStatusFlag() {
return statusFlag;
}
public void setStatusFlag(Integer statusFlag) {
this.statusFlag = statusFlag;
}
public String getExternalUserid() {
return externalUserid;
}
public void setExternalUserid(String externalUserid) {
this.externalUserid = externalUserid == null ? null : externalUserid.trim();
}
public String getWxUserId() {
return wxUserId;
}
public void setWxUserId(String wxUserId) {
this.wxUserId = wxUserId == null ? null : wxUserId.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
}
\ No newline at end of file
...@@ -54,6 +54,8 @@ public class TabHaobanWxEnterprise implements Serializable { ...@@ -54,6 +54,8 @@ public class TabHaobanWxEnterprise implements Serializable {
private Integer statusFlag; private Integer statusFlag;
private Integer contactFlag;
private Date createTime; private Date createTime;
private Date updateTime; private Date updateTime;
...@@ -275,4 +277,14 @@ public class TabHaobanWxEnterprise implements Serializable { ...@@ -275,4 +277,14 @@ public class TabHaobanWxEnterprise implements Serializable {
public void setUpdateTime(Date updateTime) { public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime; this.updateTime = updateTime;
} }
public Integer getContactFlag() {
return contactFlag;
}
public void setContactFlag(Integer contactFlag) {
this.contactFlag = contactFlag;
}
} }
\ No newline at end of file
...@@ -36,4 +36,6 @@ public interface DepartmentService { ...@@ -36,4 +36,6 @@ public interface DepartmentService {
List<TabHaobanDepartment> listByChainId(String chainId, String wxEnterpriseId); List<TabHaobanDepartment> listByChainId(String chainId, String wxEnterpriseId);
Integer departmentRecycleCount(String wxEnterpriseId);
} }
package com.gic.haoban.manage.service.service;
import com.gic.haoban.manage.api.dto.MemberUnionidRelatedDTO;
public interface MemberUnionRelatedService {
MemberUnionidRelatedDTO getByUnionId(String wxUserId, String unionid);
String addMemberUnionidRelated(MemberUnionidRelatedDTO dto);
void delMemberUnionidRelated(MemberUnionidRelatedDTO dto);
}
...@@ -16,4 +16,6 @@ public interface WxEnterpriseService { ...@@ -16,4 +16,6 @@ public interface WxEnterpriseService {
*/ */
TabHaobanWxEnterprise getEnterpriseBycorpId(String corpId); TabHaobanWxEnterprise getEnterpriseBycorpId(String corpId);
void update(WxEnterpriseDTO enterpriseDTO);
} }
...@@ -136,4 +136,9 @@ public class DepartmentServiceImpl implements DepartmentService { ...@@ -136,4 +136,9 @@ public class DepartmentServiceImpl implements DepartmentService {
return mapper.listByChainId(chainId,wxEnterpriseId); return mapper.listByChainId(chainId,wxEnterpriseId);
} }
@Override
public Integer departmentRecycleCount(String wxEnterpriseId) {
return mapper.departmentRecycleCount(wxEnterpriseId);
}
} }
package com.gic.haoban.manage.service.service.impl;
import java.util.Date;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.commons.util.EntityUtil;
import com.gic.haoban.common.utils.StringUtil;
import com.gic.haoban.manage.api.dto.MemberUnionidRelatedDTO;
import com.gic.haoban.manage.service.dao.mapper.MemberUnionidRelatedMapper;
import com.gic.haoban.manage.service.entity.MemberUnionidRelated;
import com.gic.haoban.manage.service.service.MemberUnionRelatedService;
@Service
public class MemberUnionRelatedServiceImpl implements MemberUnionRelatedService {
@Autowired
private MemberUnionidRelatedMapper mapper;
@Override
public MemberUnionidRelatedDTO getByUnionId(String wxUserId, String unionid) {
return mapper.getByUnionId(wxUserId,unionid);
}
@Override
public String addMemberUnionidRelated(MemberUnionidRelatedDTO dto) {
dto.setStatusFlag(1);
dto.setCreateTime(new Date());
dto.setUpdateTime(new Date());
dto.setMemberUnionidRelatedId(StringUtil.randomUUID());
mapper.insert(EntityUtil.changeEntityByJSON(MemberUnionidRelated.class, dto));
return dto.getMemberUnionidRelatedId();
}
@Override
public void delMemberUnionidRelated(MemberUnionidRelatedDTO dto) {
mapper.deleteByUnionidAndUserId(dto.getUnionid(),dto.getWxUserId());
}
}
...@@ -46,4 +46,11 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService { ...@@ -46,4 +46,11 @@ public class WxEnterpriseServiceImpl implements WxEnterpriseService {
return null; return null;
} }
@Override
public void update(WxEnterpriseDTO enterpriseDTO) {
enterpriseDTO.setUpdateTime(new Date());
mapper.updateByPrimaryKeySelective(EntityUtil.changeEntityByJSON(TabHaobanWxEnterprise.class, enterpriseDTO));
}
} }
...@@ -122,6 +122,7 @@ public class DepartmentApiServiceImpl implements DepartmentApiService { ...@@ -122,6 +122,7 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
hr.setErrorCode(1); hr.setErrorCode(1);
//调微信的修改接口 //调微信的修改接口
TabHaobanDepartment tab = departmentService.selectById(department.getDepartmentId()); TabHaobanDepartment tab = departmentService.selectById(department.getDepartmentId());
logger.info("【部门修改】tab={}",JSON.toJSONString(tab));
WxEnterpriseDTO enterpriseDTO = wxEnterpriseService.selectById(tab.getWxEnterpriseId()); WxEnterpriseDTO enterpriseDTO = wxEnterpriseService.selectById(tab.getWxEnterpriseId());
TabHaobanWxApplication application = wxApplicationService.selectByWxEnterpriseIdAndApplicationType(tab.getWxEnterpriseId(),1); TabHaobanWxApplication application = wxApplicationService.selectByWxEnterpriseIdAndApplicationType(tab.getWxEnterpriseId(),1);
if(enterpriseDTO != null) { if(enterpriseDTO != null) {
...@@ -132,7 +133,9 @@ public class DepartmentApiServiceImpl implements DepartmentApiService { ...@@ -132,7 +133,9 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
dto.setOrder(department.getSort()); dto.setOrder(department.getSort());
TabHaobanDepartment parent = departmentService.selectById(department.getParentDepartmentId()); TabHaobanDepartment parent = departmentService.selectById(department.getParentDepartmentId());
dto.setParentid(Integer.valueOf(parent.getWxDepartmentId())); dto.setParentid(Integer.valueOf(parent.getWxDepartmentId()));
dto.setId(Integer.valueOf(tab.getWxDepartmentId()));
JSONResponse jp = qywxDepartmentApiService.updateDepartment(enterpriseDTO.getCorpid(), application.getSiteId(), dto); JSONResponse jp = qywxDepartmentApiService.updateDepartment(enterpriseDTO.getCorpid(), application.getSiteId(), dto);
logger.info("【部门修改】jp={}",JSON.toJSONString(jp));
if(jp.getErrorCode() != 0) { if(jp.getErrorCode() != 0) {
hr.setErrorCode(0); hr.setErrorCode(0);
hr.setMessage("微信修改部门失败"); hr.setMessage("微信修改部门失败");
...@@ -236,9 +239,9 @@ public class DepartmentApiServiceImpl implements DepartmentApiService { ...@@ -236,9 +239,9 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
@Override @Override
public Page<DepartmentDTO> pageFullStoreByWxEnterpriseId( public Page<DepartmentDTO> pageFullStoreByWxEnterpriseId(
String wxEnterpriseId,String search, int count,BasePageInfo pageInfo) { String wxEnterpriseId,String search,List<String> storeIds, int count,BasePageInfo pageInfo) {
PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize()); PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize());
return PageUtil.changePageHelperToCurrentPage( departmentMapper.pageFullStoreByWxEnterpriseId(wxEnterpriseId,search,count),DepartmentDTO.class); return PageUtil.changePageHelperToCurrentPage( departmentMapper.pageFullStoreByWxEnterpriseId(wxEnterpriseId,search, storeIds,count),DepartmentDTO.class);
} }
@Override @Override
...@@ -360,4 +363,9 @@ public class DepartmentApiServiceImpl implements DepartmentApiService { ...@@ -360,4 +363,9 @@ public class DepartmentApiServiceImpl implements DepartmentApiService {
} }
} }
} }
@Override
public Integer departmentRecycleCount(String wxEnterpriseId) {
return departmentService.departmentRecycleCount(wxEnterpriseId);
}
} }
package com.gic.haoban.manage.service.service.out.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.haoban.manage.api.dto.MemberUnionidRelatedDTO;
import com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService;
import com.gic.haoban.manage.service.entity.TabHaobanStaff;
import com.gic.haoban.manage.service.service.MemberUnionRelatedService;
import com.gic.haoban.manage.service.service.StaffService;
@Service
public class MemberUnionidRelatedApiServiceImpl implements MemberUnionidRelatedApiService{
@Autowired
private MemberUnionRelatedService memberUnionRelatedService;
@Autowired
private StaffService staffService;
@Autowired
private com.gic.enterprise.api.service.StoreGroupService gicDepartmentService;
@Override
public MemberUnionidRelatedDTO getByUnionId(String staffId, String unionid) {
TabHaobanStaff staff = staffService.selectById(staffId);
if(staff == null){
return null;
}
return memberUnionRelatedService.getByUnionId(staff.getWxUserId(),unionid);
}
@Override
public String addMemberUnionidRelated(MemberUnionidRelatedDTO dto) {
return memberUnionRelatedService.addMemberUnionidRelated(dto);
}
@Override
public void delMemberUnionidRelated(MemberUnionidRelatedDTO dto) {
memberUnionRelatedService.delMemberUnionidRelated(dto);
}
}
...@@ -217,7 +217,8 @@ public class MessageApiServiceImpl implements MessageApiService { ...@@ -217,7 +217,8 @@ public class MessageApiServiceImpl implements MessageApiService {
related.setClerkCode(qywxCallBackDTO.getUserid()); related.setClerkCode(qywxCallBackDTO.getUserid());
related.setDepartmentId(department.getDepartmentId()); related.setDepartmentId(department.getDepartmentId());
related.setPhoneNumber(qywxCallBackDTO.getMobile()); related.setPhoneNumber(qywxCallBackDTO.getMobile());
related.setStaffDepartmentRelatedId(staffId); //related.setStaffDepartmentRelatedId(staffId);
related.setStaffId(staffId);
related.setStatusFlag(1); related.setStatusFlag(1);
String add1 = this.staffDepartmentRelatedService.add(related); String add1 = this.staffDepartmentRelatedService.add(related);
log.info("新增用户部门关联关系:{}", add1); log.info("新增用户部门关联关系:{}", add1);
......
...@@ -18,6 +18,8 @@ import cn.hutool.core.collection.CollectionUtil; ...@@ -18,6 +18,8 @@ import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.gic.api.base.commons.JSONResponse; import com.gic.api.base.commons.JSONResponse;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.service.ClerkService;
import com.gic.commons.util.EntityUtil; import com.gic.commons.util.EntityUtil;
import com.gic.haoban.base.api.common.BasePageInfo; import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
...@@ -64,6 +66,10 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -64,6 +66,10 @@ public class StaffApiServiceImpl implements StaffApiService {
private WxApplicationService wxApplicationService; private WxApplicationService wxApplicationService;
@Autowired @Autowired
private DepartmentService departmentService; private DepartmentService departmentService;
@Autowired
private ClerkService clerkService;
@Autowired
private com.gic.enterprise.api.service.DepartmentService gicDepartmentService;
@Override @Override
public StaffDTO selectById(String staffId) { public StaffDTO selectById(String staffId) {
...@@ -299,7 +305,12 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -299,7 +305,12 @@ public class StaffApiServiceImpl implements StaffApiService {
if(org.apache.commons.lang3.StringUtils.isNoneBlank(related.getClerkCode())){ if(org.apache.commons.lang3.StringUtils.isNoneBlank(related.getClerkCode())){
if(!staffDTO.getPhoneNumber().equals(related.getPhoneNumber())||!staffDTO.getStaffName().equals(oldStaff.getStaffName())){ if(!staffDTO.getPhoneNumber().equals(related.getPhoneNumber())||!staffDTO.getStaffName().equals(oldStaff.getStaffName())){
//TODO 通知gic同步修改姓名和手机号 TabHaobanDepartment department = departmentService.selectById(addId);
com.gic.enterprise.api.dto.DepartmentDTO dto = gicDepartmentService.getDeptment(department.getRelatedId());
ClerkDTO clerkDTO= clerkService.getClerkByCodeNoStatus(dto.getEnterpriseId(),related.getClerkCode());
clerkDTO.setClerkName(staffDTO.getStaffName());
clerkDTO.setPhoneNumber(staffDTO.getPhoneNumber());
clerkService.updateClerk(clerkDTO);
} }
} }
...@@ -315,10 +326,10 @@ public class StaffApiServiceImpl implements StaffApiService { ...@@ -315,10 +326,10 @@ public class StaffApiServiceImpl implements StaffApiService {
if(!departmentIds.contains(tab1.getDepartmentId())){ if(!departmentIds.contains(tab1.getDepartmentId())){
StaffDepartmentRelatedDTO related = EntityUtil.changeEntityByJSON(StaffDepartmentRelatedDTO.class, tab1); StaffDepartmentRelatedDTO related = EntityUtil.changeEntityByJSON(StaffDepartmentRelatedDTO.class, tab1);
staffDepartmentRelatedService.del(related); staffDepartmentRelatedService.del(related);
if(org.apache.commons.lang3.StringUtils.isNoneBlank(tab1.getClerkCode())){ // if(org.apache.commons.lang3.StringUtils.isNoneBlank(tab1.getClerkCode())){
//TODO 通知gic解绑 // //TODO 通知gic解绑
//
} // }
} }
} }
......
...@@ -88,7 +88,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService { ...@@ -88,7 +88,7 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
} }
@Override @Override
public com.gic.api.base.commons.Page<YwWxEnterpriseDTO> list(BasePageInfo pageInfo,String keyword,String gicContactFlag,String version) { public com.gic.api.base.commons.Page<YwWxEnterpriseDTO> list(BasePageInfo pageInfo,String keyword,Integer gicContactFlag,String version) {
PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize()); PageHelper.startPage(pageInfo.getPageNum(), pageInfo.getPageSize());
Page<TabHaobanWxEnterprise> page = wxEnterpriseMapper.list(keyword,gicContactFlag,version); Page<TabHaobanWxEnterprise> page = wxEnterpriseMapper.list(keyword,gicContactFlag,version);
return PageUtil.changePageHelperToCurrentPage(page, YwWxEnterpriseDTO.class); return PageUtil.changePageHelperToCurrentPage(page, YwWxEnterpriseDTO.class);
...@@ -106,4 +106,10 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService { ...@@ -106,4 +106,10 @@ public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
TabHaobanWxEnterprise enterprise = this.wxEnterpriseService.getEnterpriseBycorpId(corpId); TabHaobanWxEnterprise enterprise = this.wxEnterpriseService.getEnterpriseBycorpId(corpId);
return EntityUtil.changeEntityByJSON(WxEnterpriseDTO.class, enterprise); return EntityUtil.changeEntityByJSON(WxEnterpriseDTO.class, enterprise);
} }
@Override
public void update(WxEnterpriseDTO enterpriseDTO) {
wxEnterpriseService.update(enterpriseDTO);
}
} }
...@@ -30,9 +30,17 @@ ...@@ -30,9 +30,17 @@
<dubbo:service interface="com.gic.haoban.manage.api.service.WxEnterpriseApiService" ref="wxEnterpriseApiServiceImpl" timeout="10000" /> <dubbo:service interface="com.gic.haoban.manage.api.service.WxEnterpriseApiService" ref="wxEnterpriseApiServiceImpl" timeout="10000" />
<dubbo:service interface="com.gic.haoban.manage.api.service.MessageApiService" ref="messageApiService" timeout="10000" /> <dubbo:service interface="com.gic.haoban.manage.api.service.MessageApiService" ref="messageApiService" timeout="10000" />
<dubbo:service interface="com.gic.haoban.manage.api.service.WxApplicationApiService" ref="wxApplicationApiService" timeout="10000" /> <dubbo:service interface="com.gic.haoban.manage.api.service.WxApplicationApiService" ref="wxApplicationApiService" timeout="10000" />
<dubbo:service interface="com.gic.haoban.manage.api.service.MemberUnionidRelatedApiService" ref="memberUnionidRelatedApiServiceImpl" timeout="10000"/>
<dubbo:reference interface="com.gic.enterprise.api.service.DepartmentService" id="gicDepartmentService"/> <dubbo:reference interface="com.gic.enterprise.api.service.DepartmentService" id="gicDepartmentService"/>
<dubbo:reference interface="com.gic.wechat.api.service.qywx.QywxDepartmentApiService" id="qywxDepartmentApiService"/> <dubbo:reference interface="com.gic.wechat.api.service.qywx.QywxDepartmentApiService" id="qywxDepartmentApiService"/>
<dubbo:reference interface="com.gic.wechat.api.service.qywx.QywxUserApiService" id="qywxUserApiService"/> <dubbo:reference interface="com.gic.wechat.api.service.qywx.QywxUserApiService" id="qywxUserApiService"/>
<dubbo:reference interface="com.gic.enterprise.api.service.StoreGroupService" id="storeGroupService"/> <dubbo:reference interface="com.gic.enterprise.api.service.StoreGroupService" id="storeGroupService"/>
<dubbo:reference interface="com.gic.clerk.api.service.ClerkService" id="clerkService"/>
<dubbo:reference interface="com.gic.member.api.service.MemberService" id="memberService"/>
</beans> </beans>
\ No newline at end of file
...@@ -207,6 +207,7 @@ ...@@ -207,6 +207,7 @@
from tab_haoban_department from tab_haoban_department
where parent_department_id = #{parentId,jdbcType=VARCHAR} where parent_department_id = #{parentId,jdbcType=VARCHAR}
and status_flag = 1 and status_flag = 1
order by sort asc
</select> </select>
<select id="selectMaxSort" resultType="java.lang.Integer" parameterType="java.lang.String" > <select id="selectMaxSort" resultType="java.lang.Integer" parameterType="java.lang.String" >
...@@ -300,7 +301,13 @@ ...@@ -300,7 +301,13 @@
and is_store = 1 and is_store = 1
and wx_enterprise_id = #{wxEnterpriseId} and wx_enterprise_id = #{wxEnterpriseId}
<if test="search != null and search != ''"> <if test="search != null and search != ''">
and department_name like CONCAT('%',#{search},'%') and wx_department_id like CONCAT('%',#{search},'%')
</if>
<if test="storeIds != null and storeIds.size != 0">
and related_id IN
<foreach collection="storeIds" item="id" index="index" open="(" close=")" separator=",">
#{id,jdbcType=VARCHAR}
</foreach>
</if> </if>
order by create_time order by create_time
) t WHERE t.rownum > #{minCount} ) t WHERE t.rownum > #{minCount}
...@@ -325,7 +332,7 @@ ...@@ -325,7 +332,7 @@
and parent_department_id = #{parentId} and parent_department_id = #{parentId}
</if> </if>
<if test="keyword != null and keyword != ''"> <if test="keyword != null and keyword != ''">
and (department_name like CONCAT('%',#{keyWord},'%') or department_id like CONCAT('%',#{keyWord},'%')) and (department_name like CONCAT('%',#{keyword},'%') or department_id like CONCAT('%',#{keyword},'%'))
</if> </if>
</select> </select>
...@@ -340,4 +347,13 @@ ...@@ -340,4 +347,13 @@
and status_flag = 1 and status_flag = 1
</select> </select>
<select id="departmentRecycleCount" resultType="java.lang.Integer" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tab_haoban_department
where wx_enterprise_id = #{wxEnterpriseId}
and status_flag = 1
and recycle_flag = 1
</select>
</mapper> </mapper>
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
<mapper namespace="com.gic.haoban.manage.service.dao.mapper.MemberUnionidRelatedMapper" >
<resultMap id="BaseResultMap" type="com.gic.haoban.manage.service.entity.MemberUnionidRelated" >
<id column="member_unionid_related_id" property="memberUnionidRelatedId" jdbcType="VARCHAR" />
<result column="member_id" property="memberId" jdbcType="VARCHAR" />
<result column="unionid" property="unionid" jdbcType="VARCHAR" />
<result column="wx_enterprise_id" property="wxEnterpriseId" jdbcType="VARCHAR" />
<result column="status_flag" property="statusFlag" jdbcType="INTEGER" />
<result column="external_userid" property="externalUserid" jdbcType="VARCHAR" />
<result column="wx_user_id" property="wxUserId" jdbcType="VARCHAR" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
<result column="update_time" property="updateTime" jdbcType="TIMESTAMP" />
</resultMap>
<sql id="Base_Column_List" >
member_unionid_related_id, member_id, unionid, wx_enterprise_id, status_flag, external_userid,
wx_user_id, create_time, update_time
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tab_haoban_member_unionid_related
where member_unionid_related_id = #{memberUnionidRelatedId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tab_haoban_member_unionid_related
where member_unionid_related_id = #{memberUnionidRelatedId,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.MemberUnionidRelated" >
insert into tab_haoban_member_unionid_related (member_unionid_related_id, member_id,
unionid, wx_enterprise_id, status_flag,
external_userid, wx_user_id, create_time,
update_time)
values (#{memberUnionidRelatedId,jdbcType=VARCHAR}, #{memberId,jdbcType=VARCHAR},
#{unionid,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{statusFlag,jdbcType=INTEGER},
#{externalUserid,jdbcType=VARCHAR}, #{wxUserId,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
</insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.MemberUnionidRelated" >
insert into tab_haoban_member_unionid_related
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="memberUnionidRelatedId != null" >
member_unionid_related_id,
</if>
<if test="memberId != null" >
member_id,
</if>
<if test="unionid != null" >
unionid,
</if>
<if test="wxEnterpriseId != null" >
wx_enterprise_id,
</if>
<if test="statusFlag != null" >
status_flag,
</if>
<if test="externalUserid != null" >
external_userid,
</if>
<if test="wxUserId != null" >
wx_user_id,
</if>
<if test="createTime != null" >
create_time,
</if>
<if test="updateTime != null" >
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="memberUnionidRelatedId != null" >
#{memberUnionidRelatedId,jdbcType=VARCHAR},
</if>
<if test="memberId != null" >
#{memberId,jdbcType=VARCHAR},
</if>
<if test="unionid != null" >
#{unionid,jdbcType=VARCHAR},
</if>
<if test="wxEnterpriseId != null" >
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if test="statusFlag != null" >
#{statusFlag,jdbcType=INTEGER},
</if>
<if test="externalUserid != null" >
#{externalUserid,jdbcType=VARCHAR},
</if>
<if test="wxUserId != null" >
#{wxUserId,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null" >
#{updateTime,jdbcType=TIMESTAMP},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.MemberUnionidRelated" >
update tab_haoban_member_unionid_related
<set >
<if test="memberId != null" >
member_id = #{memberId,jdbcType=VARCHAR},
</if>
<if test="unionid != null" >
unionid = #{unionid,jdbcType=VARCHAR},
</if>
<if test="wxEnterpriseId != null" >
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if test="statusFlag != null" >
status_flag = #{statusFlag,jdbcType=INTEGER},
</if>
<if test="externalUserid != null" >
external_userid = #{externalUserid,jdbcType=VARCHAR},
</if>
<if test="wxUserId != null" >
wx_user_id = #{wxUserId,jdbcType=VARCHAR},
</if>
<if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="updateTime != null" >
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
</set>
where member_unionid_related_id = #{memberUnionidRelatedId,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.gic.haoban.manage.service.entity.MemberUnionidRelated" >
update tab_haoban_member_unionid_related
set member_id = #{memberId,jdbcType=VARCHAR},
unionid = #{unionid,jdbcType=VARCHAR},
wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR},
status_flag = #{statusFlag,jdbcType=INTEGER},
external_userid = #{externalUserid,jdbcType=VARCHAR},
wx_user_id = #{wxUserId,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP}
where member_unionid_related_id = #{memberUnionidRelatedId,jdbcType=VARCHAR}
</update>
<select id="getByUnionId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tab_haoban_member_unionid_related
where wx_user_id = #{wxUserId}
and status_flag = 1
and unionid = #{unionid}
</select>
<update id="deleteByUnionidAndUserId" parameterType="com.gic.haoban.manage.service.entity.MemberUnionidRelated" >
update tab_haoban_member_unionid_related
set status_flag = 0
where unionid_id = #{unionid,jdbcType=VARCHAR}
and wx_user_id = #{wxUserId}
</update>
</mapper>
\ No newline at end of file
...@@ -257,7 +257,7 @@ ...@@ -257,7 +257,7 @@
from tab_haoban_staff from tab_haoban_staff
where status_flag = 1 where status_flag = 1
<if test="keyword != null and keyword != ''"> <if test="keyword != null and keyword != ''">
and staff_name like CONCAT('%',#{keyWord},'%') and (staff_name like CONCAT('%',#{keyWord},'%') or phone_number like CONCAT('%',#{keyWord},'%'))
</if> </if>
<if test="activeFlag != null"> <if test="activeFlag != null">
and active_flag = #{activeFlag} and active_flag = #{activeFlag}
......
...@@ -25,6 +25,7 @@ ...@@ -25,6 +25,7 @@
<result column="square_logo_url" property="squareLogoUrl" jdbcType="VARCHAR" /> <result column="square_logo_url" property="squareLogoUrl" jdbcType="VARCHAR" />
<result column="round_logo_url" property="roundLogoUrl" jdbcType="VARCHAR" /> <result column="round_logo_url" property="roundLogoUrl" jdbcType="VARCHAR" />
<result column="level" property="level" jdbcType="INTEGER" /> <result column="level" property="level" jdbcType="INTEGER" />
<result column="contact_flag" property="contactFlag" jdbcType="INTEGER" />
<result column="bind_flag" property="bindFlag" jdbcType="INTEGER" /> <result column="bind_flag" property="bindFlag" jdbcType="INTEGER" />
<result column="status_flag" property="statusFlag" jdbcType="INTEGER" /> <result column="status_flag" property="statusFlag" jdbcType="INTEGER" />
<result column="create_time" property="createTime" jdbcType="TIMESTAMP" /> <result column="create_time" property="createTime" jdbcType="TIMESTAMP" />
...@@ -34,7 +35,7 @@ ...@@ -34,7 +35,7 @@
wx_enterprise_id, corpid, permanent_code, corp_name, corp_type, corp_square_logo_url, wx_enterprise_id, corpid, permanent_code, corp_name, corp_type, corp_square_logo_url,
corp_user_max, corp_full_name, subject_type, verified_end_time, corp_wxqrcode, corp_scale, corp_user_max, corp_full_name, subject_type, verified_end_time, corp_wxqrcode, corp_scale,
corp_industry, corp_sub_industry, location, auth_info, agent, agentid, appid, name, corp_industry, corp_sub_industry, location, auth_info, agent, agentid, appid, name,
square_logo_url, round_logo_url, level, bind_flag, status_flag, create_time, update_time square_logo_url, round_logo_url, level, bind_flag, status_flag, create_time, update_time,contact_flag
</sql> </sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
...@@ -55,7 +56,7 @@ ...@@ -55,7 +56,7 @@
auth_info, agent, agentid, auth_info, agent, agentid,
appid, name, square_logo_url, appid, name, square_logo_url,
round_logo_url, level, bind_flag, round_logo_url, level, bind_flag,
status_flag, create_time, update_time status_flag, create_time, update_time,contact_flag
) )
values (#{wxEnterpriseId,jdbcType=VARCHAR}, #{corpid,jdbcType=VARCHAR}, #{permanentCode,jdbcType=VARCHAR}, values (#{wxEnterpriseId,jdbcType=VARCHAR}, #{corpid,jdbcType=VARCHAR}, #{permanentCode,jdbcType=VARCHAR},
#{corpName,jdbcType=VARCHAR}, #{corpType,jdbcType=VARCHAR}, #{corpSquareLogoUrl,jdbcType=VARCHAR}, #{corpName,jdbcType=VARCHAR}, #{corpType,jdbcType=VARCHAR}, #{corpSquareLogoUrl,jdbcType=VARCHAR},
...@@ -65,7 +66,7 @@ ...@@ -65,7 +66,7 @@
#{authInfo,jdbcType=VARCHAR}, #{agent,jdbcType=VARCHAR}, #{agentid,jdbcType=VARCHAR}, #{authInfo,jdbcType=VARCHAR}, #{agent,jdbcType=VARCHAR}, #{agentid,jdbcType=VARCHAR},
#{appid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{squareLogoUrl,jdbcType=VARCHAR}, #{appid,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{squareLogoUrl,jdbcType=VARCHAR},
#{roundLogoUrl,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{bindFlag,jdbcType=INTEGER}, #{roundLogoUrl,jdbcType=VARCHAR}, #{level,jdbcType=INTEGER}, #{bindFlag,jdbcType=INTEGER},
#{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP} #{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},#{contactFlag}
) )
</insert> </insert>
<insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise" > <insert id="insertSelective" parameterType="com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise" >
...@@ -146,6 +147,9 @@ ...@@ -146,6 +147,9 @@
<if test="statusFlag != null" > <if test="statusFlag != null" >
status_flag, status_flag,
</if> </if>
<if test="contactFlag != null" >
contact_flag,
</if>
<if test="createTime != null" > <if test="createTime != null" >
create_time, create_time,
</if> </if>
...@@ -229,6 +233,9 @@ ...@@ -229,6 +233,9 @@
<if test="statusFlag != null" > <if test="statusFlag != null" >
#{statusFlag,jdbcType=INTEGER}, #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="contactFlag != null" >
#{contactFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null" > <if test="createTime != null" >
#{createTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -312,6 +319,9 @@ ...@@ -312,6 +319,9 @@
<if test="statusFlag != null" > <if test="statusFlag != null" >
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
</if> </if>
<if test="contactFlag != null" >
contact_flag = #{contactFlag,jdbcType=INTEGER},
</if>
<if test="createTime != null" > <if test="createTime != null" >
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
</if> </if>
...@@ -347,16 +357,23 @@ ...@@ -347,16 +357,23 @@
level = #{level,jdbcType=INTEGER}, level = #{level,jdbcType=INTEGER},
bind_flag = #{bindFlag,jdbcType=INTEGER}, bind_flag = #{bindFlag,jdbcType=INTEGER},
status_flag = #{statusFlag,jdbcType=INTEGER}, status_flag = #{statusFlag,jdbcType=INTEGER},
contact_flag = #{contactFlag,jdbcType=INTEGER},
create_time = #{createTime,jdbcType=TIMESTAMP}, create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP} update_time = #{updateTime,jdbcType=TIMESTAMP}
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR} where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
</update> </update>
<select id="list" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="list" resultMap="BaseResultMap" >
select select
<include refid="Base_Column_List" /> <include refid="Base_Column_List" />
from tab_haoban_wx_enterprise from tab_haoban_wx_enterprise
where status_flag = 1 where status_flag = 1
<if test="keyword != null and keyword != ''">
and corp_name like CONCAT('%',#{keyword},'%')
</if>
<if test="gicContactFlag != null">
and contact_flag = #{gicContactFlag,jdbcType=INTEGER}
</if>
</select> </select>
<select id="listBycorpId" resultMap="BaseResultMap" parameterType="java.lang.String" > <select id="listBycorpId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select select
......
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService;
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(locations = {"classpath:applicationContext-conf.xml"})
public class ServiceTest {
@Autowired
private WxEnterpriseRelatedApiService wxEnterpriseRelatedApiService;
@Test
public void test() {
wxEnterpriseRelatedApiService.listEnterpriseByWxEnterpriseId("073e89a37eb14acabf258e59a57359b6");
}
}
...@@ -75,6 +75,8 @@ public class ApplicationController extends WebBaseController{ ...@@ -75,6 +75,8 @@ public class ApplicationController extends WebBaseController{
applicationDTO.setSiteId(dto.getSuiteId()); applicationDTO.setSiteId(dto.getSuiteId());
wxApplicationApiService.addSuite(applicationDTO); wxApplicationApiService.addSuite(applicationDTO);
this.departmentApiService.initwxDepartment(dto.getCorpid(), suiteId, enterpriseDTO.getWxEnterpriseId()); this.departmentApiService.initwxDepartment(dto.getCorpid(), suiteId, enterpriseDTO.getWxEnterpriseId());
enterpriseDTO.setContactFlag(1);
wxEnterpriseApiService.update(enterpriseDTO);
return resultResponse(HaoBanErrCode.ERR_1, result); return resultResponse(HaoBanErrCode.ERR_1, result);
} }
return resultResponse(HaoBanErrCode.ERR_0, dto); return resultResponse(HaoBanErrCode.ERR_0, dto);
......
...@@ -16,7 +16,9 @@ import com.gic.clerk.api.dto.ClerkDTO; ...@@ -16,7 +16,9 @@ import com.gic.clerk.api.dto.ClerkDTO;
import com.gic.clerk.api.service.ClerkService; import com.gic.clerk.api.service.ClerkService;
import com.gic.commons.util.EntityUtil; import com.gic.commons.util.EntityUtil;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.DepartmentDTO;
import com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO; import com.gic.haoban.manage.api.dto.StaffDepartmentRelatedDTO;
import com.gic.haoban.manage.api.service.DepartmentApiService;
import com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService; import com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode; import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.vo.ClerkVo; import com.gic.haoban.manage.web.vo.ClerkVo;
...@@ -26,15 +28,25 @@ public class ClerkController extends WebBaseController{ ...@@ -26,15 +28,25 @@ public class ClerkController extends WebBaseController{
@Autowired @Autowired
private ClerkService clerkService; private ClerkService clerkService;
@Autowired @Autowired
private DepartmentApiService departmentApiService;
@Autowired
private StaffDepartmentRelatedApiService staffDepartmentRelatedApiService; private StaffDepartmentRelatedApiService staffDepartmentRelatedApiService;
//未绑定的clerkCode列表 //未绑定的clerkCode列表
@RequestMapping("/clerk-code-list") @RequestMapping("/clerk-code-list")
public HaobanResponse clerkCodeList(String storeId,String departmentId) { public HaobanResponse clerkCodeList(String departmentId) {
List<StaffDepartmentRelatedDTO> list = staffDepartmentRelatedApiService.listByDepartmentId(departmentId); List<StaffDepartmentRelatedDTO> list = staffDepartmentRelatedApiService.listByDepartmentId(departmentId);
List<ClerkVo> result = new ArrayList<ClerkVo>(); List<ClerkVo> result = new ArrayList<ClerkVo>();
if(StringUtils.isAnyBlank(storeId,departmentId)){ if(StringUtils.isAnyBlank(departmentId)){
return resultResponse(HaoBanErrCode.ERR_2); return resultResponse(HaoBanErrCode.ERR_2);
} }
DepartmentDTO departmentDTO = departmentApiService.selectById(departmentId);
if(departmentDTO == null){
return resultResponse(HaoBanErrCode.ERR_10009);
}
String storeId = departmentDTO.getRelatedId();
if(StringUtils.isAnyBlank(departmentId)){
return resultResponse(HaoBanErrCode.ERR_10009);
}
String bindFlag = "0"; String bindFlag = "0";
//绑定的clerk //绑定的clerk
if("1".equals(bindFlag)){ if("1".equals(bindFlag)){
......
...@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray; import com.alibaba.fastjson.JSONArray;
import com.gic.api.base.commons.Page; import com.gic.api.base.commons.Page;
import com.gic.enterprise.api.dto.GicTreeDTO; import com.gic.enterprise.api.dto.GicTreeDTO;
...@@ -49,7 +49,7 @@ public class DepartmentContoller extends WebBaseController{ ...@@ -49,7 +49,7 @@ public class DepartmentContoller extends WebBaseController{
@Autowired @Autowired
private StaffApiService staffApiService; private StaffApiService staffApiService;
@RequestMapping("department-list") @RequestMapping("department-list")
public HaobanResponse departmentList(String parentId,BasePageInfo pageInfo,String keyword) { public HaobanResponse departmentList(String parentId,BasePageInfo pageInfo,String keyWord) {
LoginVO login = (LoginVO) AuthRequestUtil.getSessionUser(); LoginVO login = (LoginVO) AuthRequestUtil.getSessionUser();
String wxEnterpriseId = login.getWxEnterpriseId(); String wxEnterpriseId = login.getWxEnterpriseId();
logger.info("【部门列表】wxEnterpriseId={}",wxEnterpriseId); logger.info("【部门列表】wxEnterpriseId={}",wxEnterpriseId);
...@@ -57,7 +57,7 @@ public class DepartmentContoller extends WebBaseController{ ...@@ -57,7 +57,7 @@ public class DepartmentContoller extends WebBaseController{
Page<DepartmentDTO> page = new Page<DepartmentDTO>(); Page<DepartmentDTO> page = new Page<DepartmentDTO>();
List<DepartmentDTO> list = new ArrayList<DepartmentDTO>(); List<DepartmentDTO> list = new ArrayList<DepartmentDTO>();
if(StringUtils.isNotBlank(parentId)) { if(StringUtils.isNotBlank(parentId)) {
page = departmentApiService.pageByParentId(parentId,keyword,pageInfo); page = departmentApiService.pageByParentId(parentId,keyWord,pageInfo);
}else { }else {
DepartmentDTO dto = departmentApiService.getRootByEnterpriseId(wxEnterpriseId); DepartmentDTO dto = departmentApiService.getRootByEnterpriseId(wxEnterpriseId);
list.add(dto); list.add(dto);
...@@ -148,6 +148,16 @@ public class DepartmentContoller extends WebBaseController{ ...@@ -148,6 +148,16 @@ public class DepartmentContoller extends WebBaseController{
} }
@RequestMapping("department-recycle-count")
public HaobanResponse departmentRecycleCount() {
LoginVO login = (LoginVO) AuthRequestUtil.getSessionUser();
String wxEnterpriseId = login.getWxEnterpriseId();
Integer count = departmentApiService.departmentRecycleCount(wxEnterpriseId);
return resultResponse(HaoBanErrCode.ERR_1,count);
}
@RequestMapping("department-del") @RequestMapping("department-del")
public HaobanResponse departmentDel(String departmentId) { public HaobanResponse departmentDel(String departmentId) {
DepartmentDTO dto = departmentApiService.selectById(departmentId); DepartmentDTO dto = departmentApiService.selectById(departmentId);
...@@ -183,13 +193,15 @@ public class DepartmentContoller extends WebBaseController{ ...@@ -183,13 +193,15 @@ public class DepartmentContoller extends WebBaseController{
} }
DepartmentDTO department = new DepartmentDTO(); DepartmentDTO department = new DepartmentDTO();
department.setParentDepartmentId(parentId); department.setParentDepartmentId(parentId);
department.setWxDepartmentId(dto.getWxDepartmentId()); //department.setWxDepartmentId(dto.getWxDepartmentId());
department.setWxEnterpriseId(dto.getWxEnterpriseId());
department.setDepartmentName(departmentAddQO.getDepartmentName()); department.setDepartmentName(departmentAddQO.getDepartmentName());
department.setChainId(dto.getChainId() + Constant.ID_SEPARATOR + dto.getDepartmentId()); department.setChainId(dto.getChainId() + Constant.ID_SEPARATOR + dto.getDepartmentId());
department.setChainName(dto.getChainName() + Constant.NAME_SEPARATOR + dto.getDepartmentName()); department.setChainName(dto.getChainName() + Constant.NAME_SEPARATOR + dto.getDepartmentName());
department.setIsStore(0); department.setIsStore(0);
department.setIsStore(departmentAddQO.getStoreFlag()); department.setIsStore(departmentAddQO.getStoreFlag());
department.setLevel(dto.getLevel() + 1); department.setLevel(dto.getLevel() + 1);
department.setRelatedId(departmentAddQO.getRelatedId());
HaobanResponse hr = departmentApiService.add(department); HaobanResponse hr = departmentApiService.add(department);
if(hr.getErrorCode() != 1) { if(hr.getErrorCode() != 1) {
continue; continue;
...@@ -202,21 +214,25 @@ public class DepartmentContoller extends WebBaseController{ ...@@ -202,21 +214,25 @@ public class DepartmentContoller extends WebBaseController{
} }
} }
logger.info("【部门修改】editDepartment={}",editDepartment);
if(StringUtils.isNotBlank(editDepartment)) { if(StringUtils.isNotBlank(editDepartment)) {
List<DepartmentEditQO> list = JSONArray.parseArray(editDepartment, DepartmentEditQO.class); List<DepartmentEditQO> list = JSONArray.parseArray(editDepartment, DepartmentEditQO.class);
logger.info("【部门修改】list={}",JSON.toJSONString(list));
for (DepartmentEditQO departmentQO : list) { for (DepartmentEditQO departmentQO : list) {
String parentId = departmentQO.getCurrDepartment(); String parentId = departmentQO.getParentId();
DepartmentDTO parent = departmentApiService.selectById(parentId); DepartmentDTO parent = departmentApiService.selectById(parentId);
if(parent == null || parent.getStatusFlag() == 0) { if(parent == null || parent.getStatusFlag() == 0) {
continue; continue;
} }
DepartmentDTO department = departmentApiService.selectById(parentId); DepartmentDTO department = departmentApiService.selectById(departmentQO.getDepartmentId());
department.setParentDepartmentId(parentId); department.setParentDepartmentId(parentId);
department.setWxEnterpriseId(department.getWxEnterpriseId());
department.setDepartmentName(departmentQO.getDepartmentName()); department.setDepartmentName(departmentQO.getDepartmentName());
department.setChainId(parent.getChainId() + Constant.ID_SEPARATOR + parent.getDepartmentId()); department.setChainId(parent.getChainId() + Constant.ID_SEPARATOR + parent.getDepartmentId());
department.setChainName(parent.getChainName() + Constant.NAME_SEPARATOR + parent.getDepartmentName()); department.setChainName(parent.getChainName() + Constant.NAME_SEPARATOR + parent.getDepartmentName());
department.setLevel(parent.getLevel() + 1); department.setLevel(parent.getLevel() + 1);
department.setSort(departmentQO.getSort());
logger.info("【部门修改】department={}",JSON.toJSONString(department));
handerSonDepartment(departmentQO.getCurrDepartment()); handerSonDepartment(departmentQO.getCurrDepartment());
HaobanResponse hr = departmentApiService.edit(department); HaobanResponse hr = departmentApiService.edit(department);
...@@ -280,7 +296,7 @@ public class DepartmentContoller extends WebBaseController{ ...@@ -280,7 +296,7 @@ public class DepartmentContoller extends WebBaseController{
} }
unBindDTO.setDepartmentName(departmentDTO.getName()); unBindDTO.setDepartmentName(departmentDTO.getName());
unBindDTO.setDepartmentId(departmentDTO.getId()); unBindDTO.setDepartmentId(departmentDTO.getId());
unBindDTO.setType(type); unBindDTO.setType(departmentDTO.getType());
unBindDTO.setLevel(departmentDTO.getLevel()); unBindDTO.setLevel(departmentDTO.getLevel());
dtoList.add(unBindDTO); dtoList.add(unBindDTO);
} }
...@@ -383,65 +399,5 @@ public class DepartmentContoller extends WebBaseController{ ...@@ -383,65 +399,5 @@ public class DepartmentContoller extends WebBaseController{
} }
} }
//溢出门店列表
@IgnoreLogin
@RequestMapping("store-full-list")
public HaobanResponse storeFullList(BasePageInfo basePageInfo,String search) {
// LoginVO login = (LoginVO) AuthRequestUtil.getSessionUser();
// String wxEnterpriseId = login.getWxEnterpriseId();
String wxEnterpriseId = "1";
int maxVersionCount = 0;
Page<DepartmentDTO> page = departmentApiService.pageFullStoreByWxEnterpriseId(wxEnterpriseId, search,maxVersionCount, basePageInfo);
List<DepartmentDTO> list = page.getResult();
List<StoreVo> resultList = EntityUtil.changeEntityListByJSON(StoreVo.class,list);
List<String> storeIds = list.stream().map(s->s.getRelatedId()).collect(Collectors.toList());
String [] storeIdArr = storeIds.toArray(new String[storeIds.size()]);
List<StoreDTO> storeList = storeService.getStores(storeIdArr);
Map<String,StoreDTO> map = com.gic.commons.util.CollectionUtil.toMap(storeList, "storeId");
for(StoreVo vo:resultList){
if(map.get(vo.getRelatedId())!=null){
vo.setStoreCode(map.get(vo.getDepartmentId()).getStoreCode());
vo.setStoreId(map.get(vo.getDepartmentId()).getStoreId());
}
}
Page resultPage = new Page<>();
resultPage.setCurrentPage(page.getCurrentPage());
resultPage.setPageSize(page.getPageSize());
resultPage.setTotalCount(page.getTotalCount());
resultPage.setResult(resultList);
return resultResponse(HaoBanErrCode.ERR_1,resultPage);
/*int pageNum = basePageInfo.getPageNum();
int pageSize = basePageInfo.getPageSize();
Page<DepartmentDTO> page = new Page<>(pageNum, pageSize, 0);
//TODO 获取版本容量
int maxSize = 0;
List<DepartmentDTO> list = departmentApiService.listStoreByWxEnterpriseId(wxEnterpriseId);
if(list == null||list.size()==0){
return resultResponse(HaoBanErrCode.ERR_1,new Page<>());
}
page.setTotalCount(list.size());
if(maxSize != 0){
if(list.size() <= maxSize){
//小于版本容量(无溢出门店)
return resultResponse(HaoBanErrCode.ERR_1,new Page<>());
}else{
//大于版本容量(有溢出门店)
list = list.subList(maxSize,list.size()-1);
}
}
List resultList = ListUtils.Pager(pageSize, pageNum, list);
return resultResponse(HaoBanErrCode.ERR_1,resultList);*/
}
} }
...@@ -85,6 +85,7 @@ public class StaffController extends WebBaseController{ ...@@ -85,6 +85,7 @@ public class StaffController extends WebBaseController{
logger.info("【成员列表】related={}",JSON.toJSONString(related)); logger.info("【成员列表】related={}",JSON.toJSONString(related));
if(related != null) { if(related != null) {
staffDTO.setStaffDepartmentRelatedId(related.getStaffDepartmentRelatedId()); staffDTO.setStaffDepartmentRelatedId(related.getStaffDepartmentRelatedId());
staffDTO.setClerkCode(related.getClerkCode());
} }
} }
} }
......
package com.gic.haoban.manage.web.controller; package com.gic.haoban.manage.web.controller;
import java.util.ArrayList;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.stream.Collector; import java.util.stream.Collector;
...@@ -12,12 +13,19 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -12,12 +13,19 @@ import org.springframework.web.bind.annotation.RestController;
import cn.hutool.core.collection.CollectionUtil; import cn.hutool.core.collection.CollectionUtil;
import com.alibaba.druid.util.StringUtils; import com.alibaba.druid.util.StringUtils;
import com.gic.api.base.commons.Page;
import com.gic.enterprise.api.dto.EnterpriseAndUserDTO; import com.gic.enterprise.api.dto.EnterpriseAndUserDTO;
import com.gic.enterprise.api.dto.EnterpriseDTO; import com.gic.enterprise.api.dto.EnterpriseDTO;
import com.gic.enterprise.api.dto.StoreDTO;
import com.gic.enterprise.api.service.EnterpriseService; import com.gic.enterprise.api.service.EnterpriseService;
import com.gic.enterprise.api.service.StoreService;
import com.gic.haoban.base.api.common.BasePageInfo;
import com.gic.haoban.common.utils.EntityUtil;
import com.gic.haoban.common.utils.HaobanResponse; import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.DepartmentDTO;
import com.gic.haoban.manage.api.dto.EnterpriseDetailDTO; import com.gic.haoban.manage.api.dto.EnterpriseDetailDTO;
import com.gic.haoban.manage.api.dto.YwWxEnterpriseDTO; import com.gic.haoban.manage.api.dto.YwWxEnterpriseDTO;
import com.gic.haoban.manage.api.service.DepartmentApiService;
import com.gic.haoban.manage.api.service.WxEnterpriseApiService; import com.gic.haoban.manage.api.service.WxEnterpriseApiService;
import com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService; import com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService;
import com.gic.haoban.manage.web.anno.HttpLimit; import com.gic.haoban.manage.web.anno.HttpLimit;
...@@ -25,6 +33,7 @@ import com.gic.haoban.manage.web.anno.IgnoreLogin; ...@@ -25,6 +33,7 @@ import com.gic.haoban.manage.web.anno.IgnoreLogin;
import com.gic.haoban.manage.web.auth.AuthRequestUtil; import com.gic.haoban.manage.web.auth.AuthRequestUtil;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode; import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.vo.LoginVO; import com.gic.haoban.manage.web.vo.LoginVO;
import com.gic.haoban.manage.web.vo.StoreVo;
@RestController @RestController
public class WxEnterpriseController extends WebBaseController{ public class WxEnterpriseController extends WebBaseController{
...@@ -34,6 +43,10 @@ public class WxEnterpriseController extends WebBaseController{ ...@@ -34,6 +43,10 @@ public class WxEnterpriseController extends WebBaseController{
private EnterpriseService enterpriseService; private EnterpriseService enterpriseService;
@Autowired @Autowired
private WxEnterpriseApiService wxEnterpriseApiService; private WxEnterpriseApiService wxEnterpriseApiService;
@Autowired
private DepartmentApiService departmentApiService;
@Autowired
private StoreService storeService;
//授权企业列表 //授权企业列表
@HttpLimit @HttpLimit
...@@ -88,6 +101,49 @@ public class WxEnterpriseController extends WebBaseController{ ...@@ -88,6 +101,49 @@ public class WxEnterpriseController extends WebBaseController{
return resultResponse(HaoBanErrCode.ERR_1); return resultResponse(HaoBanErrCode.ERR_1);
} }
//溢出门店列表
@IgnoreLogin
@RequestMapping("store-full-list")
public HaobanResponse storeFullList(BasePageInfo basePageInfo,String search) {
// LoginVO login = (LoginVO) AuthRequestUtil.getSessionUser();
// String wxEnterpriseId = login.getWxEnterpriseId();
String wxEnterpriseId = "1";
int maxVersionCount = 0;
List<String> storeIds = new ArrayList<String>();
List<EnterpriseDetailDTO> enterpriseList = wxEnterpriseRelatedApiService.listEnterpriseByWxEnterpriseId(wxEnterpriseId);
if(CollectionUtil.isEmpty(enterpriseList)){
return resultResponse(HaoBanErrCode.ERR_10010);
}
List<String> enterpriseIds = enterpriseList.stream().map(s->s.getEnterpriseId()).collect(Collectors.toList());
//TODO 调陶接口,获取store列表
Page<DepartmentDTO> page = departmentApiService.pageFullStoreByWxEnterpriseId(wxEnterpriseId, search,storeIds,maxVersionCount, basePageInfo);
List<DepartmentDTO> list = page.getResult();
List<StoreVo> resultList = EntityUtil.changeEntityListByJSON(StoreVo.class,list);
List<String> t_storeIds = list.stream().map(s->s.getRelatedId()).collect(Collectors.toList());
String [] storeIdArr = t_storeIds.toArray(new String[t_storeIds.size()]);
List<StoreDTO> storeList = storeService.getStores(storeIdArr);
Map<String,StoreDTO> map = com.gic.commons.util.CollectionUtil.toMap(storeList, "storeId");
for(StoreVo vo:resultList){
if(map.get(vo.getRelatedId())!=null){
vo.setStoreCode(map.get(vo.getDepartmentId()).getStoreCode());
vo.setStoreId(map.get(vo.getDepartmentId()).getStoreId());
vo.setStoreName(map.get(vo.getDepartmentId()).getStoreName());
}
}
Page resultPage = new Page<>();
resultPage.setCurrentPage(page.getCurrentPage());
resultPage.setPageSize(page.getPageSize());
resultPage.setTotalCount(page.getTotalCount());
resultPage.setResult(resultList);
return resultResponse(HaoBanErrCode.ERR_1,resultPage);
}
} }
...@@ -77,6 +77,8 @@ public enum HaoBanErrCode { ...@@ -77,6 +77,8 @@ public enum HaoBanErrCode {
ERR_10007(10007,"成员不存在"), ERR_10007(10007,"成员不存在"),
ERR_10008(10008,"请不要过于频繁点击"), ERR_10008(10008,"请不要过于频繁点击"),
ERR_10009(10009,"门店不存在"),
ERR_10010(10010,"企业微信无关联的gic企业"),
ERR_DEFINE(-888, "自定义错误"), ERR_DEFINE(-888, "自定义错误"),
ERR_OTHER(-999, "未知错误code"); ERR_OTHER(-999, "未知错误code");
......
...@@ -10,6 +10,8 @@ public class DepartmentAddQO implements Serializable { ...@@ -10,6 +10,8 @@ public class DepartmentAddQO implements Serializable {
private String parentId; private String parentId;
private String parentDepartmentId;
private String sonDepartment; private String sonDepartment;
private Integer storeFlag; private Integer storeFlag;
...@@ -64,6 +66,14 @@ public class DepartmentAddQO implements Serializable { ...@@ -64,6 +66,14 @@ public class DepartmentAddQO implements Serializable {
this.relatedId = relatedId; this.relatedId = relatedId;
} }
public String getParentDepartmentId() {
return parentId;
}
public void setParentDepartmentId(String parentDepartmentId) {
this.parentDepartmentId = parentDepartmentId;
}
} }
...@@ -13,7 +13,7 @@ public class StoreVo implements Serializable { ...@@ -13,7 +13,7 @@ public class StoreVo implements Serializable {
*/ */
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
private String departmentId; private String departmentId;
private String departmentName; private String storeName;
private String storeId; private String storeId;
private String storeCode; private String storeCode;
private String relatedId; private String relatedId;
...@@ -30,11 +30,12 @@ public class StoreVo implements Serializable { ...@@ -30,11 +30,12 @@ public class StoreVo implements Serializable {
public void setDepartmentId(String departmentId) { public void setDepartmentId(String departmentId) {
this.departmentId = departmentId; this.departmentId = departmentId;
} }
public String getDepartmentName() {
return departmentName; public String getStoreName() {
return storeName;
} }
public void setDepartmentName(String departmentName) { public void setStoreName(String storeName) {
this.departmentName = departmentName; this.storeName = storeName;
} }
public String getStoreId() { public String getStoreId() {
return storeId; return storeId;
......
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