Commit ac54d8b6 by fudahua

Merge remote-tracking branch 'origin/developer' into developer

parents 6143c948 ebea1e7f
......@@ -214,7 +214,7 @@ public class StaffApiServiceImpl implements StaffApiService {
StaffDepartmentRelatedDTO related = staffDepartmentRelatedService.selectById(staffDepartmentStaffRelatedId);
if(related != null) {
List<TabHaobanStaffDepartmentRelated> relatedList = staffDepartmentRelatedService.listStaffDepartmentByStaffId(related.getStaffId());
if(relatedList != null || relatedList.isEmpty()){
if(relatedList == null || relatedList.isEmpty()){
return;
}
//只在当前门店
......
package com.gic.haoban.manage.web.controller;
import java.io.IOException;
import java.util.List;
import com.alibaba.fastjson.JSON;
......@@ -29,6 +30,8 @@ import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.service.ApplicationApiService;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import javax.servlet.http.HttpServletResponse;
@RestController
public class ApplicationController extends WebBaseController{
private static final Logger log = LogManager.getLogger(ApplicationController.class);
......@@ -65,7 +68,6 @@ public class ApplicationController extends WebBaseController{
return resultResponse(HaoBanErrCode.ERR_1);
}
@RequestMapping("has-bind-contract")
@IgnoreLogin
public HaobanResponse hasBindContract(){
LoginVO login = AuthRequestUtil.getSessionUser();
String wxEnterpriseId = login.getWxEnterpriseId();
......@@ -77,7 +79,6 @@ public class ApplicationController extends WebBaseController{
}
@RequestMapping("get-auth-url")
@IgnoreLogin
public HaobanResponse getAuthUrl(){
String suiteId = config.getSuiteId();
log.info("应用ID:{}", suiteId);
......@@ -87,8 +88,7 @@ public class ApplicationController extends WebBaseController{
}
@RequestMapping("callback")
@IgnoreLogin
public HaobanResponse callback(String auth_code){
public void callback(String auth_code, HttpServletResponse response){
String suiteId = config.getSuiteId();
String result = this.qywxSuiteApiService.corpAuth(suiteId, auth_code);
log.info("企业微信回调结果:{}. {}", auth_code, result);
......@@ -106,9 +106,14 @@ public class ApplicationController extends WebBaseController{
this.departmentApiService.initwxDepartment(dto.getCorpid(), suiteId, enterpriseDTO.getWxEnterpriseId());
enterpriseDTO.setContactFlag(1);
wxEnterpriseApiService.update(enterpriseDTO);
return resultResponse(HaoBanErrCode.ERR_1, result);
}
return resultResponse(HaoBanErrCode.ERR_0, dto);
String redirectUri = config.getHost() + "index";
redirectUri = redirectUri.replace("haoban-manage3-web", "haoban-3/#");
try {
response.sendRedirect(redirectUri);
} catch (IOException e) {
e.printStackTrace();
}
}
@RequestMapping("cancal-suite")
......
......@@ -37,7 +37,7 @@ private static Logger logger = LoggerFactory.getLogger(SendCodeController.class)
*/
@RequestMapping("/send-code")
public HaobanResponse sendCode(String phoneNumber, @RequestParam(defaultValue = "86") String nationcode,
Integer type, @RequestParam(defaultValue = "1") int isTest,String wxEnterpriseId) {
Integer type, @RequestParam(defaultValue = "0") int isTest,String wxEnterpriseId) {
if (StringUtils.isBlank(phoneNumber) || null == type) {
logger.info("没有phoneNumber!");
return resultResponse(HaoBanErrCode.ERR_5);
......
......@@ -38,7 +38,7 @@ public class SendCodeController extends WebBaseController{
*/
@RequestMapping("/send-code")
public HaobanResponse sendCode(String phoneNumber, @RequestParam(defaultValue = "86") String nationcode,
Integer type, @RequestParam(defaultValue = "1") int isTest,String wxEnterpriseId) {
Integer type, @RequestParam(defaultValue = "0") int isTest,String wxEnterpriseId) {
if (StringUtils.isBlank(phoneNumber) || null == type) {
logger.info("没有phoneNumber!");
return resultResponse(HaoBanErrCode.ERR_5);
......
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