Commit 36abde78 by 墨竹

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

parents 4227025e bc370c76
......@@ -106,11 +106,20 @@ public class StaffClerkBindLogDetailDTO implements Serializable {
*
*/
private Date updateTime;
private String operName ;
/**
*/
private static final long serialVersionUID = 1L;
public String getOperName() {
return operName;
}
public void setOperName(String operName) {
this.operName = operName;
}
public String getClerkPhone() {
return clerkPhone;
}
......
......@@ -3,7 +3,6 @@ package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.service.entity.TabHaobanStaffClerkBindLog;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import retrofit2.http.PATCH;
import java.util.List;
......@@ -12,34 +11,14 @@ public interface StaffClerkBindLogMapper {
/**
*
*/
int deleteByPrimaryKey(Integer logId);
/**
*
*/
int insert(TabHaobanStaffClerkBindLog record);
/**
*
*/
int insertSelective(TabHaobanStaffClerkBindLog record);
/**
*
*/
TabHaobanStaffClerkBindLog selectByPrimaryKey(Integer logId);
/**
*
*/
int updateByPrimaryKeySelective(TabHaobanStaffClerkBindLog record);
/**
*
*/
int updateByPrimaryKey(TabHaobanStaffClerkBindLog record);
/**
* 列表
*
* @param clerkIds
......@@ -48,8 +27,8 @@ public interface StaffClerkBindLogMapper {
* @param optType
* @return
*/
public List<TabHaobanStaffClerkBindLog> listStaffClerkBindLog(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("clerkIds") List<String> clerkIds
, @Param("staffIds") List<String> staffIds, @Param("enterpriseIds") List<String> enterpriseIds, @Param("optType") int optType, @Param("search") String search);
public List<TabHaobanStaffClerkBindLog> listStaffClerkBindLog(@Param("wxEnterpriseId") String wxEnterpriseId,
@Param("enterpriseId") String enterpriseId, @Param("optType") int optType, @Param("search") String search);
public List<TabHaobanStaffClerkBindLog> staffClerkUnBindLog(@Param("wxEnterpriseId") String wxEnterpriseId, @Param("clerkId") String clerkIds
, @Param("enterpriseId") String enterpriseIds, @Param("optType") int optType);
......
......@@ -7,12 +7,9 @@ import org.apache.ibatis.annotations.Param;
import com.gic.haoban.manage.service.entity.TabHaobanTemplateEnterpriseRelation;
public interface TabHaobanTemplateEnterpriseRelationMapper {
int deleteByPrimaryKey(String templateEnterpriseRelationId);
int insert(TabHaobanTemplateEnterpriseRelation record);
int insertSelective(TabHaobanTemplateEnterpriseRelation record);
TabHaobanTemplateEnterpriseRelation selectByPrimaryKey(String templateEnterpriseRelationId);
int updateByPrimaryKeySelective(TabHaobanTemplateEnterpriseRelation record);
......
......@@ -87,6 +87,26 @@ public class TabHaobanStaffClerkBindLog implements Serializable {
*
*/
private Date updateTime;
private String operName ;
private String clerkName ;
public String getOperName() {
return operName;
}
public String getClerkName() {
return clerkName;
}
public void setOperName(String operName) {
this.operName = operName;
}
public void setClerkName(String clerkName) {
this.clerkName = clerkName;
}
/**
*/
......
......@@ -44,7 +44,7 @@ public interface StaffClerkBindLogService {
/**
* @return
*/
public Page<StaffClerkBindLogDetailDTO> pageBindLog(String wxEnterpriseId, List<String> clerkIds, List<String> staffIds, List<String> enterpriseIds, int optType, String search, BasePageInfo pageInfo);
public Page<StaffClerkBindLogDetailDTO> pageBindLog(String wxEnterpriseId, String enterpriseId, int optType, String search, BasePageInfo pageInfo);
public Page<StaffClerkBindLogDetailDTO> pageUnBindLog(String wxEnterpriseId, String clerkId, String enterpriseId, int optType, BasePageInfo pageInfo);
}
......@@ -40,7 +40,7 @@ public class StaffClerkBindLogServiceImpl implements StaffClerkBindLogService {
@Override
public void insert(TabHaobanStaffClerkBindLog bindLog) {
bindLog.setCreateTime(new Date());
staffClerkBindLogMapper.insertSelective(bindLog);
staffClerkBindLogMapper.insert(bindLog);
}
@Override
......@@ -85,9 +85,9 @@ public class StaffClerkBindLogServiceImpl implements StaffClerkBindLogService {
}
@Override
public Page<StaffClerkBindLogDetailDTO> pageBindLog(String wxEnterpriseId, List<String> clerkIds, List<String> staffIds, List<String> enterpriseIds, int optType, String search, BasePageInfo pageInfo) {
public Page<StaffClerkBindLogDetailDTO> pageBindLog(String wxEnterpriseId, String enterpriseId, int optType, String search, BasePageInfo pageInfo) {
PageHelper.startPage(pageInfo);
List<TabHaobanStaffClerkBindLog> clerkBindLogList = staffClerkBindLogMapper.listStaffClerkBindLog(wxEnterpriseId, clerkIds, staffIds, enterpriseIds, optType, search);
List<TabHaobanStaffClerkBindLog> clerkBindLogList = staffClerkBindLogMapper.listStaffClerkBindLog(wxEnterpriseId, enterpriseId, optType, search);
Page<StaffClerkBindLogDetailDTO> retPage = PageUtil.changePageHelperToCurrentPage(new PageInfo<>(clerkBindLogList), StaffClerkBindLogDetailDTO.class);
return retPage;
}
......
......@@ -9,7 +9,6 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.haoban.common.utils.StringUtil;
import com.gic.haoban.manage.api.dto.MemberUnionidRelatedDTO;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanTemplateApplicationRelatedMapper;
import com.gic.haoban.manage.service.entity.TabHaobanTemplateApplicationRelated;
import com.gic.haoban.manage.service.service.TemplateApplicationRelatedService;
......
......@@ -515,10 +515,9 @@ public class StaffDepartmentRelatedApiServiceImpl implements StaffDepartmentRela
if (clerkDTO == null) {
return;
}
StaffDTO staffDTO = staffApiService.selectById(staffId);
//字段
Map<String, String> params = new HashMap<String, String>();
params.put("staffName", staffDTO.getStaffName());
params.put("staffName", clerkDTO.getClerkName());
params.put("clerkCode", clerkDTO.getClerkCode());
params.put("reason", reason);
//参数
......
......@@ -20,11 +20,7 @@
from tab_haoban_template_enterprise_relation
where template_enterprise_relation_id = #{templateEnterpriseRelationId,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete
from tab_haoban_template_enterprise_relation
where template_enterprise_relation_id = #{templateEnterpriseRelationId,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabHaobanTemplateEnterpriseRelation">
insert into tab_haoban_template_enterprise_relation (template_enterprise_relation_id, wx_enterprise_id,
application_template_id, status_flag, create_time,
......@@ -34,56 +30,7 @@
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP}, #{wxEnterpriseName,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective"
parameterType="com.gic.haoban.manage.service.entity.TabHaobanTemplateEnterpriseRelation">
insert into tab_haoban_template_enterprise_relation
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="templateEnterpriseRelationId != null">
template_enterprise_relation_id,
</if>
<if test="wxEnterpriseId != null">
wx_enterprise_id,
</if>
<if test="wxEnterpriseName != null">
wx_enterprise_name,
</if>
<if test="applicationTemplateId != null">
application_template_id,
</if>
<if test="statusFlag != null">
status_flag,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="templateEnterpriseRelationId != null">
#{templateEnterpriseRelationId,jdbcType=VARCHAR},
</if>
<if test="wxEnterpriseId != null">
#{wxEnterpriseId,jdbcType=VARCHAR},
</if>
<if test="wxEnterpriseName != null">
#{wxEnterpriseName,jdbcType=VARCHAR},
</if>
<if test="applicationTemplateId != null">
#{applicationTemplateId,jdbcType=VARCHAR},
</if>
<if test="statusFlag != null">
#{statusFlag,jdbcType=INTEGER},
</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.TabHaobanTemplateEnterpriseRelation">
update tab_haoban_template_enterprise_relation
......
......@@ -22,7 +22,6 @@ import org.springframework.web.bind.annotation.RestController;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.gic.commons.util.CollectionUtil;
import com.gic.commons.util.EntityUtil;
import com.gic.haoban.base.api.common.pojo.dto.WebLoginDTO;
import com.gic.haoban.common.anno.IgnoreLogin;
......@@ -47,7 +46,6 @@ import com.gic.haoban.manage.web.config.Config;
import com.gic.haoban.manage.web.errCode.HaoBanErrCode;
import com.gic.haoban.manage.web.vo.ApplicationVO;
import com.gic.haoban.manage.web.vo.ClerkEditInfoVO;
import com.gic.redis.data.util.RedisUtil;
import com.gic.wechat.api.service.qywx.QywxSuiteApiService;
import com.gic.wechat.api.service.qywx.QywxUserApiService;
......@@ -97,15 +95,25 @@ public class ApplicationController extends WebBaseController {
}
Map<String, Object> map = new HashMap<>();
List<ApplicationDTO> list = applicationApiService.listApplicationByWxEnterpriseId(wxEnterpriseId);
Object o = RedisUtil.getCache("haobanWxEnterpriseIdAppOpen");
String wxEnterpriseIds = o == null ? "" : o.toString();
if (!wxEnterpriseIds.contains(wxEnterpriseId)) {
Iterator<ApplicationDTO> it = list.iterator();
while (it.hasNext()) {
ApplicationDTO s = it.next();
// 我的客户、营销任务、看数据、云日报、月指标、商品中心、订单评价、扫码核销、E袋洗、佣金结算
if(Arrays.asList("11111","11114","11121","11122").contains(s.getApplicationId())) {
it.remove();
Iterator<ApplicationDTO> it = list.iterator();
// 判断模板
List<String> tempIdList = null ;
List<ApplicationDTO> tempList = this.applicationApiService.listApplicationByWxEnterpriseId(wxEnterpriseId) ;
if(CollectionUtils.isNotEmpty(tempList)) {
tempIdList = tempList.stream().map(dto->dto.getApplicationId()).collect(Collectors.toList()) ;
}
while (it.hasNext()) {
ApplicationDTO s = it.next();
// 我的客户、营销任务、看数据、云日报、月指标、商品中心、订单评价、扫码核销、E袋洗、佣金结算
if(Arrays.asList("11111","11114","11121","11122").contains(s.getApplicationId())) {
it.remove();
}
// 11123E袋洗 11124佣金结算
if(CollectionUtils.isNotEmpty(tempIdList)) {
if(Arrays.asList("11123","11124").contains(s.getApplicationId())) {
if(!tempIdList.contains(s.getApplicationId())) {
it.remove();
}
}
}
}
......
......@@ -439,8 +439,11 @@ public class LoginController extends WebBaseController {
String gicEnterpriseId = jsonObject.getString("enterpriseId");
String phoneNumber = jsonObject.getString("phoneNumber");
Long timestamp = jsonObject.getLong("timestamp") ;
logger.info("选择企微列表,gicEnterpriseId={},phoneNumber={}", gicEnterpriseId, phoneNumber);
if (StringUtils.isAnyBlank(gicEnterpriseId, phoneNumber,timestamp+"")) {
if(null == timestamp) {
return this.fail("登录请求参数异常timestamp");
}
logger.info("选择企微列表,params={}", o);
if (StringUtils.isAnyBlank(gicEnterpriseId, phoneNumber)) {
return this.fail("参数异常");
}
if(timestamp+1000*60*5 < System.currentTimeMillis()) {
......
......@@ -339,12 +339,9 @@ public class StaffController extends WebBaseController {
* @return
*/
@RequestMapping("del-clerk-relation")
public HaobanResponse delStaffClerkList(String staffId, String clerkId) {
StaffDTO staff = staffApiService.selectById(staffId);
if (staff == null) {
return resultResponse(HaoBanErrCode.ERR_10007);
}
boolean b = staffClerkRelationApiService.unbindByStaffAndClerkId(staffId, clerkId);
public HaobanResponse delStaffClerkList(String clerkId) {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
boolean b = staffClerkRelationApiService.unbindByStaffAndClerkId(login.getClerkId(), clerkId);
return resultResponse(HaoBanErrCode.ERR_1, b);
}
......@@ -433,7 +430,7 @@ public class StaffController extends WebBaseController {
relationDTO.setWxUserId(staffDTO.getWxUserId());
ServiceResponse response = staffClerkRelationApiService.bindStaffClerk(relationDTO, login.getStaffId(), ChannelCodeEnum.ADMIN_BIND.getCode());
ServiceResponse response = staffClerkRelationApiService.bindStaffClerk(relationDTO, login.getClerkId(), ChannelCodeEnum.ADMIN_BIND.getCode());
logger.info("返回信息:{}", JSONObject.toJSONString(response));
if (response.getCode() == 1) {
return resultResponse(HaoBanErrCode.ERR_1);
......@@ -450,8 +447,9 @@ public class StaffController extends WebBaseController {
* @return
*/
@RequestMapping("staff-clerk-bind-log")
public HaobanResponse bindLogs(String search, String enterpriseId, @RequestParam(defaultValue = "-1") Integer optType, BasePageInfo qo) {
public HaobanResponse bindLogs(String search, @RequestParam(defaultValue = "-1") Integer optType, BasePageInfo qo) {
WebLoginDTO login = AuthWebRequestUtil.getLoginUser();
String enterpriseId = login.getEnterpriseId() ;
Page<StaffClerkBindLogDetailDTO> page = staffClerkRelationApiService.pageStaffClerkBindLog(login.getWxEnterpriseId(), search, enterpriseId, optType, qo);
return resultResponse(HaoBanErrCode.ERR_1, page);
}
......
......@@ -163,7 +163,8 @@ public class ClerkController extends WebBaseController {
} else {
WxEnterpriseRelationDetailDTO enterpriseBindInfo = wxEnterpriseRelatedApiService.getEnterpriseBindInfo(wxEnterpriseId, storeDTO.getEnterpriseId());
Map<String, Object> ret = new HashMap<>();
ret.put("clerkEditFlag", enterpriseBindInfo.getClerkEditFlag());
// 待删除
ret.put("clerkEditFlag", ClerkEditInfoVO.info(enterpriseBindInfo.getClerkEditFlag()).getEditClerkFlag());
ret.put("clerkList", resultList);
return resultResponse(HaoBanErrCode.ERR_1, ret);
}
......@@ -946,7 +947,7 @@ public class ClerkController extends WebBaseController {
staffClerkRelationApiService.delByStoreIdAndCode(storeId, clerkCode);
//加入日志
staffClerkRelationApiService.pushToBindLog(staffClerkRelation.getStaffId(), staffId, BindTypeEnum.UNBIND.getVal(), ChannelCodeEnum.SELF_UNBIND.getCode(), staffClerkRelation.getStaffClerkRelationId());
staffClerkRelationApiService.pushToBindLog(staffClerkRelation.getStaffId(), clerkId, BindTypeEnum.UNBIND.getVal(), ChannelCodeEnum.SELF_UNBIND.getCode(), staffClerkRelation.getStaffClerkRelationId());
return resultResponse(HaoBanErrCode.ERR_1);
}
......
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