Commit 63c0081e by qwmqiuwenmin

fix

parent ff544f9a
package com.gic.haoban.manage.api.dto;
import java.io.Serializable;
import java.util.Date;
public class WxEnterpriseDTO implements Serializable {
private String wxEnterpriseId;
private String corpid;
private String permanentCode;
private String corpName;
private String corpType;
private String corpSquareLogoUrl;
private String corpUserMax;
private String corpFullName;
private String subjectType;
private Date verifiedEndTime;
private String corpWxqrcode;
private String corpScale;
private String corpIndustry;
private String corpSubIndustry;
private String location;
private String authInfo;
private String agent;
private String agentid;
private String appid;
private String name;
private String squareLogoUrl;
private String roundLogoUrl;
private Integer level;
private Integer bindFlag;
private Integer statusFlag;
private Date createTime;
private Date updateTime;
private static final long serialVersionUID = 1L;
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId == null ? null : wxEnterpriseId.trim();
}
public String getCorpid() {
return corpid;
}
public void setCorpid(String corpid) {
this.corpid = corpid == null ? null : corpid.trim();
}
public String getPermanentCode() {
return permanentCode;
}
public void setPermanentCode(String permanentCode) {
this.permanentCode = permanentCode == null ? null : permanentCode.trim();
}
public String getCorpName() {
return corpName;
}
public void setCorpName(String corpName) {
this.corpName = corpName == null ? null : corpName.trim();
}
public String getCorpType() {
return corpType;
}
public void setCorpType(String corpType) {
this.corpType = corpType == null ? null : corpType.trim();
}
public String getCorpSquareLogoUrl() {
return corpSquareLogoUrl;
}
public void setCorpSquareLogoUrl(String corpSquareLogoUrl) {
this.corpSquareLogoUrl = corpSquareLogoUrl == null ? null : corpSquareLogoUrl.trim();
}
public String getCorpUserMax() {
return corpUserMax;
}
public void setCorpUserMax(String corpUserMax) {
this.corpUserMax = corpUserMax == null ? null : corpUserMax.trim();
}
public String getCorpFullName() {
return corpFullName;
}
public void setCorpFullName(String corpFullName) {
this.corpFullName = corpFullName == null ? null : corpFullName.trim();
}
public String getSubjectType() {
return subjectType;
}
public void setSubjectType(String subjectType) {
this.subjectType = subjectType == null ? null : subjectType.trim();
}
public Date getVerifiedEndTime() {
return verifiedEndTime;
}
public void setVerifiedEndTime(Date verifiedEndTime) {
this.verifiedEndTime = verifiedEndTime;
}
public String getCorpWxqrcode() {
return corpWxqrcode;
}
public void setCorpWxqrcode(String corpWxqrcode) {
this.corpWxqrcode = corpWxqrcode == null ? null : corpWxqrcode.trim();
}
public String getCorpScale() {
return corpScale;
}
public void setCorpScale(String corpScale) {
this.corpScale = corpScale == null ? null : corpScale.trim();
}
public String getCorpIndustry() {
return corpIndustry;
}
public void setCorpIndustry(String corpIndustry) {
this.corpIndustry = corpIndustry == null ? null : corpIndustry.trim();
}
public String getCorpSubIndustry() {
return corpSubIndustry;
}
public void setCorpSubIndustry(String corpSubIndustry) {
this.corpSubIndustry = corpSubIndustry == null ? null : corpSubIndustry.trim();
}
public String getLocation() {
return location;
}
public void setLocation(String location) {
this.location = location == null ? null : location.trim();
}
public String getAuthInfo() {
return authInfo;
}
public void setAuthInfo(String authInfo) {
this.authInfo = authInfo == null ? null : authInfo.trim();
}
public String getAgent() {
return agent;
}
public void setAgent(String agent) {
this.agent = agent == null ? null : agent.trim();
}
public String getAgentid() {
return agentid;
}
public void setAgentid(String agentid) {
this.agentid = agentid == null ? null : agentid.trim();
}
public String getAppid() {
return appid;
}
public void setAppid(String appid) {
this.appid = appid == null ? null : appid.trim();
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name == null ? null : name.trim();
}
public String getSquareLogoUrl() {
return squareLogoUrl;
}
public void setSquareLogoUrl(String squareLogoUrl) {
this.squareLogoUrl = squareLogoUrl == null ? null : squareLogoUrl.trim();
}
public String getRoundLogoUrl() {
return roundLogoUrl;
}
public void setRoundLogoUrl(String roundLogoUrl) {
this.roundLogoUrl = roundLogoUrl == null ? null : roundLogoUrl.trim();
}
public Integer getLevel() {
return level;
}
public void setLevel(Integer level) {
this.level = level;
}
public Integer getBindFlag() {
return bindFlag;
}
public void setBindFlag(Integer bindFlag) {
this.bindFlag = bindFlag;
}
public Integer getStatusFlag() {
return statusFlag;
}
public void setStatusFlag(Integer statusFlag) {
this.statusFlag = statusFlag;
}
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;
}
}
......@@ -25,4 +25,6 @@ public interface StaffApiService {
public void del(String staffDepartmentStaffRelatedId);
public void wxGetAdd(String userId,String wxEnterpriseId);
}
......@@ -2,7 +2,7 @@ package com.gic.haoban.manage.api.service;
import com.gic.haoban.manage.api.dto.QywxCorpInfoSimpleDTO;
public interface WxCallbackApiService {
public interface WxEnterpriseApiService {
/**
* 接收企业回调信息
......
package com.gic.haoban.manage.service.service;
import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
public interface WxEnterpriseService {
String add(WxEnterpriseDTO wxDTO);
}
package com.gic.haoban.manage.service.service.impl;
import java.util.Date;
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.WxEnterpriseDTO;
import com.gic.haoban.manage.service.dao.mapper.WxEnterpriseMapper;
import com.gic.haoban.manage.service.entity.TabHaobanWxEnterprise;
import com.gic.haoban.manage.service.service.WxEnterpriseService;
@Service
public class WxEnterpriseServiceImpl implements WxEnterpriseService {
@Autowired
WxEnterpriseMapper mapper;
@Override
public String add(WxEnterpriseDTO wxDTO) {
Date now = new Date();
wxDTO.setWxEnterpriseId(StringUtil.randomUUID());
wxDTO.setCreateTime(now);
wxDTO.setUpdateTime(now);
mapper.insertSelective(EntityUtil.changeEntityByJSON(TabHaobanWxEnterprise.class, wxDTO));
return wxDTO.getWxEnterpriseId();
}
}
......@@ -126,4 +126,16 @@ public class StaffApiServiceImpl implements StaffApiService {
}
@Override
public void wxGetAdd(String userId,String wxEnterpriseId) {
//获取微信用户信息
TabHaobanStaff staff = new TabHaobanStaff();
staffService.add(staff);
StaffDepartmentRelatedDTO dto = new StaffDepartmentRelatedDTO();
staffDepartmentRelatedService.add(dto);
}
}
......@@ -3,15 +3,28 @@ package com.gic.haoban.manage.service.service.out.impl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.commons.util.EntityUtil;
import com.gic.haoban.manage.api.dto.QywxCorpInfoSimpleDTO;
import com.gic.haoban.manage.api.service.WxCallbackApiService;
import com.gic.haoban.manage.api.dto.WxEnterpriseDTO;
import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.api.service.WxEnterpriseApiService;
import com.gic.haoban.manage.service.service.WxEnterpriseService;
@Service
public class WxCallbackApiServiceImpl implements WxCallbackApiService {
public class WxEnterpriseApiServiceImpl implements WxEnterpriseApiService {
@Autowired
private WxEnterpriseService wxEnterpriseService;
@Autowired
private StaffApiService staffApiService;
@Override
public void callbackReviceEnterprise(QywxCorpInfoSimpleDTO dto) {
WxEnterpriseDTO wxDTO = EntityUtil.changeEntityByJSON(WxEnterpriseDTO.class, dto.getClass());
String wxEnterpriseId = wxEnterpriseService.add(wxDTO);
String userId = dto.getUserid();
String name = dto.getName();
staffApiService.wxGetAdd(userId,wxEnterpriseId);
}
......
......@@ -27,7 +27,7 @@
<dubbo:service interface="com.gic.haoban.manage.api.service.StaffApiService" ref="staffApiServiceImpl" timeout="10000" />
<dubbo:service interface="com.gic.haoban.manage.api.service.WxEnterpriseRelatedApiService" ref="wxEnterpriseRelatedApiServiceImpl" timeout="10000" />
<dubbo:service interface="com.gic.haoban.manage.api.service.StaffDepartmentRelatedApiService" ref="staffDepartmentRelatedApiServiceImpl" timeout="10000" />
<dubbo:service interface="com.gic.haoban.manage.api.service.WxCallbackApiService" ref="wxCallbackApiServiceImpl" timeout="10000" />
<dubbo:service interface="com.gic.haoban.manage.api.service.WxEnterpriseApiService" ref="wxEnterpriseApiServiceImpl" timeout="10000" />
</beans>
\ No newline at end of file
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