Commit e705ed57 by songyinghui

feat: 获取小程序appId

parent e80dde7a
......@@ -16,6 +16,7 @@ import com.gic.haoban.manage.service.service.content.GroupMessageService;
import com.gic.haoban.manage.service.service.content.MaterialReportService;
import com.gic.haoban.manage.service.task.RouterConstant;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -135,6 +136,9 @@ public class QywxGroupMsgTaskApiServiceImpl implements QywxGroupMsgTaskApiServic
continue;
}
for (String staffId : staffIds) {
if (!StringUtils.equals("e608b51b267e4943b87e222a343b4f25", staffId)) {
continue;
}
MaterialReportDTO temp = new MaterialReportDTO();
temp.setStaffId(staffId);
temp.setEnterpriseId(enterpriseId);
......
......@@ -39,6 +39,6 @@ public class MaterialReportServiceTest {
@Test
public void weekReport(){
qywxGroupMsgTaskApiService.handlerMaterialWeekReport("");
qywxGroupMsgTaskApiService.handlerMaterialMonthReport("");
}
}
package com.gic.haoban.manage.web.controller;
import cn.hutool.core.collection.CollectionUtil;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.manage.api.dto.ApplicationDTO;
import com.gic.haoban.manage.api.dto.ApplicationSettingDTO;
......@@ -103,5 +104,4 @@ public class ApplicationController extends WebBaseController {
private int checkNum(int limit, int cur) {
return cur > limit ? 1 : (cur == limit ? 0 : -1);
}
}
......@@ -9,6 +9,7 @@ import java.util.stream.Collectors;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
import com.gic.haoban.manage.web.vo.EnterpriseConfigVO;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
......@@ -88,6 +89,9 @@ import com.gic.wechat.api.service.qywx.QywxUserApiService;
import cn.hutool.core.collection.CollectionUtil;
import cn.hutool.core.convert.Convert;
/**
* 企微配置
*/
@RestController
public class WxEnterpriseInfoController extends WebBaseController {
......@@ -688,4 +692,27 @@ public class WxEnterpriseInfoController extends WebBaseController {
boolean check = this.accountService.storageFeeCheck(enterpriseId) ;
return RestResponse.successResult(check) ;
}
/**
* 查询企业配置
* @param enterpriseId
* @return
*/
@RequestMapping(path = "/enterprise/config")
public RestResponse<EnterpriseConfigVO> queryEnterpriseConfig(String enterpriseId) {
if (StringUtils.isBlank(enterpriseId)) {
return RestResponse.failure("-701", "参数缺失");
}
EnterpriseDTO enterpriseInfo = enterpriseService.getEnterpriseById(enterpriseId);
if (enterpriseInfo == null) {
return RestResponse.failure("-2", "企业信息不存在");
}
EnterpriseConfigVO configVO = EnterpriseConfigVO
.builder()
.miniAppId(enterpriseInfo.getMallMiniprogramAppid())
.build();
return RestResponse.successResult(configVO);
}
}
package com.gic.haoban.manage.web.vo;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.io.Serializable;
/**
* @Author MUSI
* @Date 2023/3/28 9:07 AM
* @Description
* @Version
**/
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class EnterpriseConfigVO implements Serializable {
/**
* 小程序id
*/
private String miniAppId;
}
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