Commit 1812837a by 墨竹

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

parents 31b602e4 e50bb843
package com.gic.haoban.manage.api.enums;
/**
* 待办模板
* Created by hua on 2021/12/16.
*/
public enum PendingTaskTypeEnum {
NORMAL(-1, "全部", "全部"),
PERFORMANCE(0, "月指标", "请完善{}月份指标"),
TEL_TASK(1, "话务任务", "您收到了新的话务任务【{}】,赶紧去执行吧~"),
GROUP_TASK(3, "群发任务", "您收到了新的企微群发任务【{}】,赶紧到企业微信-消息-客户联系中执行吧~"),
ACTIVITY(4, "活动", "您报名的{}活动已经开始啦,快去转发赚佣金吧~"),;
GROUP_TASK(3, "群发任务", "您收到了新的企微群发任务【{}】,赶紧到企业微信-消息-群发助手中执行吧~"),
ACTIVITY(4, "活动", "您报名的{}活动已经开始啦,快去转发赚佣金吧~"),
;
private int type;
private String name;
private String description;
......
......@@ -158,6 +158,17 @@ public interface StaffApiService {
/**
* 让员工隐私员工id
*
* @param userId 用户id
* @return {@link StaffPrivacyUseLogDTO }
* @author mozhu
* @date 2022-04-14 14:31:39
*/
StaffPrivacyUseLogDTO getStaffPrivacyByUserId(String userId);
/**
* 用户id wx企业id列表
*
* @param wxEnterpriseId wx企业标识
......
......@@ -33,7 +33,7 @@ public interface StaffPrivacyUseLogMapper {
int update(TabStaffPrivacyUseLog tabStaffPrivacyUseLog);
/**
* 查询
* 通过员工id查询
*
* @param staffId 员工id
* @return {@link List<TabStaffPrivacyUseLog> }
......@@ -42,4 +42,15 @@ public interface StaffPrivacyUseLogMapper {
*/
TabStaffPrivacyUseLog getByStaffId(@Param("staffId") String staffId);
/**
* 通过用户id查询数据
*
* @param userId 用户id
* @return {@link TabStaffPrivacyUseLog }
* @author mozhu
* @date 2022-04-14 14:29:24
*/
TabStaffPrivacyUseLog getByUserId(@Param("userId") String userId);
}
......@@ -39,4 +39,15 @@ public interface StaffPrivacyUseLogService {
* @date 2021-12-15 10:51:32
*/
StaffPrivacyUseLogBO getByStaffId(String staffId);
/**
* 通过用户id
*
* @param userId 用户id
* @return {@link StaffPrivacyUseLogBO }
* @author mozhu
* @date 2022-04-14 14:30:30
*/
StaffPrivacyUseLogBO getByUserId(String userId);
}
......@@ -46,4 +46,10 @@ public class StaffPrivacyUseLogServiceImpl implements StaffPrivacyUseLogService
TabStaffPrivacyUseLog tabStaffPrivacyUseLog = staffPrivacyUseLogMapper.getByStaffId(staffId);
return EntityUtil.changeEntityByOrika(StaffPrivacyUseLogBO.class, tabStaffPrivacyUseLog);
}
@Override
public StaffPrivacyUseLogBO getByUserId(String userId) {
TabStaffPrivacyUseLog tabStaffPrivacyUseLog = staffPrivacyUseLogMapper.getByUserId(userId);
return EntityUtil.changeEntityByOrika(StaffPrivacyUseLogBO.class, tabStaffPrivacyUseLog);
}
}
......@@ -129,7 +129,7 @@ public class MessageApiServiceImpl implements MessageApiService {
log.info("【成员部门同步回调处理】dto={}", JSON.toJSONString(param));
String suiteId = dto.getSuiteId();
if (!SELF_APP.equals(suiteId)) {
log.info("通讯录只处理自建应用回调 dto={}",JSON.toJSONString(param));
log.info("通讯录只处理自建应用回调 dto={}", JSON.toJSONString(param));
return;
}
//处理部门
......@@ -192,10 +192,13 @@ public class MessageApiServiceImpl implements MessageApiService {
Map<Integer, com.gic.wechat.api.dto.qywx.DepartmentDTO> departmentIdMap = departments.stream()
.collect(Collectors.toMap(com.gic.wechat.api.dto.qywx.DepartmentDTO::getId, Function.identity(), (a, b) -> a));
com.gic.wechat.api.dto.qywx.DepartmentDTO mainDept = departmentIdMap.get(Integer.valueOf(mainDeptId));
clerkQwDTO.setStoreName(mainDept.getName());
String deptName = mainDept.getName();
clerkQwDTO.setStoreName(deptName);
clerkQwDTO.setClerkCode(dto.getUserid());
clerkQwDTO.setClerkName(staffName);
clerkQwDTO.setClerkType(dto.getIsLeaderInDept()[0]);
String position = dto.getPosition();
log.info("职务名称:position:{}", position);
clerkQwDTO.setClerkType(StringUtils.isBlank(position) ? 0 : position.contains("店长") ? 1 : 0);
clerkQwDTO.setClerkGener(dto.getGender());
clerkQwDTO.setPhoneNumber(dto.getMobile());
clerkQwDTO.setNationcode(dto.getTelephone());
......
......@@ -1181,6 +1181,11 @@ public class StaffApiServiceImpl implements StaffApiService {
}
@Override
public StaffPrivacyUseLogDTO getStaffPrivacyByUserId(String userId) {
return EntityUtil.changeEntity(StaffPrivacyUseLogDTO.class, staffPrivacyUseLogService.getByUserId(userId));
}
@Override
public Page<StaffDTO> listUserIdByWxEnterpriseId(String wxEnterpriseId, Integer pageNum, Integer pageSize) {
PageHelper.startPage(pageNum, pageSize);
List<TabHaobanStaff> tabHaobanStaffs = staffMapper.listUserIdByWxEnterpriseId(wxEnterpriseId);
......
......@@ -145,4 +145,11 @@
WHERE staff_id = #{staffId} order by create_time desc limit 1
</select>
<select id="getByUserId" resultMap="BaseResultMap">
SELECT
<include refid="Base_Column_List"/>
FROM tab_staff_privacy_use_log
WHERE wx_open_user_id = #{userId} order by create_time desc limit 1
</select>
</mapper>
\ No newline at end of file
......@@ -7,7 +7,6 @@ import com.gic.haoban.common.utils.CheckSmsCodeUtil;
import com.gic.haoban.common.utils.GooglePhoneNumberUtil;
import com.gic.haoban.common.utils.HaobanResponse;
import com.gic.haoban.communicate.api.service.valid.ValidationCodeService;
import com.gic.haoban.manage.api.service.StaffApiService;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.redis.data.util.RedisUtil;
import com.gic.reponse.SendSmsResponse;
......@@ -21,14 +20,9 @@ import org.springframework.web.bind.annotation.RestController;
@RestController
public class SendCodeController extends WebBaseController{
private static Logger logger = LoggerFactory.getLogger(SendCodeController.class);
@Autowired
private StaffApiService staffApiService;
@Autowired
private ValidationCodeService validationCodeService;
@Autowired
......@@ -66,15 +60,6 @@ public class SendCodeController extends WebBaseController{
RedisUtil.setCache(cacheKey, true, 60L);
}
//绑定
if (type == 1) {
// StaffDTO staffDTO = staffApiService.selectByNationcodeAndPhoneNumber(wxEnterpriseId, nationcode, phoneNumber);
// if (staffDTO == null) {
// logger.info("用户不存在:{}-{}", nationcode,phoneNumber);
// return resultResponse(HaoBanErrCode.ERR_8);
// }
}
String smsCode = "";
if(CheckSmsCodeUtil.getCacheSmsCode(nationcode+"-"+phoneNumber, type) != null){
smsCode = (String)CheckSmsCodeUtil.getCacheSmsCode(nationcode+"-"+phoneNumber, type);
......
......@@ -126,8 +126,13 @@ public class WxEnterpriseInfoController extends WebBaseController {
loginStaff = staffApiService.selectByUserIdAndEnterpriseId(userId, enterprise.getWxEnterpriseId());
}
}
if (loginStaff == null) {
return resultResponse(HaoBanErrCode.ERR_600001);
WellDoneLoginInfoVO wellDoneLoginInfoVo = new WellDoneLoginInfoVO();
wellDoneLoginInfoVo.setWxOpenUseId(userId);
StaffPrivacyUseLogDTO staffPrivacyUseLogDTO = staffApiService.getStaffPrivacyByUserId(userId);
wellDoneLoginInfoVo.setPrivacyUseFlag(staffPrivacyUseLogDTO == null ? 0 : 1);
return resultResponse(HaoBanErrCode.ERR_1,wellDoneLoginInfoVo);
}
if (StringUtils.isNotBlank(loginStaff.getPhoneNumber())) {
......@@ -171,11 +176,8 @@ public class WxEnterpriseInfoController extends WebBaseController {
wellDoneLoginInfoVo.setPhoneNumber(loginStaff.getPhoneNumber());
wellDoneLoginInfoVo.setNationcode(loginStaff.getNationCode());
wellDoneLoginInfoVo.setWxUserId(loginStaff.getWxUserId());
wellDoneLoginInfoVo.setPrivacyUseFlag(1);
//StaffPrivacyUseLogDTO staffPrivacyUseLogDTO = staffApiService.getStaffPrivacyByStaffId(staffId);
//if (staffPrivacyUseLogDTO != null) {
// wellDoneLoginInfoVo.setPrivacyUseFlag(staffPrivacyUseLogDTO.getPrivacyUseFlag());
//}
StaffPrivacyUseLogDTO staffPrivacyUseLogDTO = staffApiService.getStaffPrivacyByStaffId(staffId);
wellDoneLoginInfoVo.setPrivacyUseFlag(staffPrivacyUseLogDTO == null ? 0 : 1);
return resultResponse(HaoBanErrCode.ERR_1, wellDoneLoginInfoVo);
}
......
......@@ -17,6 +17,10 @@ public class WellDoneLoginInfoVO implements Serializable {
private String nationcode;
private String wxUserId;
private Integer privacyUseFlag;
/**
* 第三方用户id(好办)
*/
private String wxOpenUseId;
public String getWxUserId() {
return wxUserId;
......@@ -73,4 +77,12 @@ public class WellDoneLoginInfoVO implements Serializable {
public void setPrivacyUseFlag(Integer privacyUseFlag) {
this.privacyUseFlag = privacyUseFlag;
}
public String getWxOpenUseId() {
return wxOpenUseId;
}
public void setWxOpenUseId(String wxOpenUseId) {
this.wxOpenUseId = wxOpenUseId;
}
}
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