Commit c749c365 by guojuxing

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

parents cc10c8bc cb0a9ff7
package com.gic.auth.service.impl;
import com.gic.auth.dao.mapper.TabAuditorAuditedGroupRelMapper;
import com.gic.auth.dao.mapper.TabAuditorMapper;
import com.gic.auth.dto.AuditorAuditedGroupRelDTO;
import com.gic.auth.dto.AuditorDTO;
import com.gic.auth.entity.TabAuditor;
import com.gic.auth.entity.TabAuditorAuditedGroupRel;
import com.gic.auth.qo.AuditorListQO;
import com.gic.auth.service.AuditorService;
import com.gic.commons.util.GlobalInfo;
import com.github.pagehelper.Page;
import com.github.pagehelper.PageHelper;
import org.apache.commons.collections.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Date;
import java.util.List;
import java.util.stream.Collectors;
/**
*
......@@ -25,6 +30,8 @@ public class AuditorServiceImpl implements AuditorService {
@Autowired
private TabAuditorMapper tabAuditorMapper;
@Autowired
private TabAuditorAuditedGroupRelMapper auditorAuditedGroupRelMapper;
@Override
public boolean validAuditorNameIsRepeat(Integer enterpriseId, String auditorName, Integer auditorId) {
......@@ -99,6 +106,17 @@ public class AuditorServiceImpl implements AuditorService {
@Override
public Page<TabAuditor> pageAuditor(AuditorListQO auditorListQO) {
if (auditorListQO.getAuditedGroupId() != null) {
AuditorAuditedGroupRelDTO auditedGroupRelDTO = new AuditorAuditedGroupRelDTO();
auditedGroupRelDTO.setAuditedGroupId(auditorListQO.getAuditedGroupId());
List<TabAuditorAuditedGroupRel> relList = auditorAuditedGroupRelMapper.listRel(auditedGroupRelDTO);
if (CollectionUtils.isEmpty(relList)) {
return new Page<>();
} else {
List<Integer> auditorIdList = relList.stream().map(TabAuditorAuditedGroupRel::getAuditorId).collect(Collectors.toList());
auditorListQO.setAuditorIdList(auditorIdList);
}
}
PageHelper.startPage(auditorListQO.getCurrentPage(), auditorListQO.getPageSize());
return tabAuditorMapper.listAuditor(auditorListQO);
}
......
......@@ -91,7 +91,7 @@ public class UnionEnterpriseApiServiceImpl implements UnionEnterpriseApiService
@Override
public ServiceResponse<Void> updateStoreAuthorizationStatus(int authOrizationStatus, Integer enterpriseId, String ...message) {
String authOrizationMessage = null;
if(message != null){
if(message != null && message.length != 0){
authOrizationMessage = message[0];
}
this.unionEnterpriseResourceService.updateAuthorizationStatus(authOrizationStatus, enterpriseId, ResourceTypeEnum.STORE_RESOURCE.getCode(), authOrizationMessage);
......
......@@ -39,5 +39,7 @@
<dubbo:reference interface="com.gic.wechat.business.api.service.fwh.WeixinBaseFunService" id="weixinBaseFunService" timeout="6000" />
<!--会员模块-->
<dubbo:reference interface="com.gic.member.api.service.ServiceUserApiService" id="serviceUserApiService" timeout="6000" />
<dubbo:reference interface="com.gic.store.service.StoreAuthorizationApiService" id="storeAuthorizationApiService" timeout="6000" />
<dubbo:reference interface="com.gic.store.service.StoreAuthorizationApiService" id="storeAuthorizationApiService" timeout="6000">
<dubbo:method name="authStore" async="true"/>
</dubbo:reference>
</beans>
......@@ -174,6 +174,9 @@
<if test="auditorId != null ">
and auditor_id = #{auditorId}
</if>
<if test="auditedGroupId != null ">
and audited_group_id = #{auditedGroupId}
</if>
<if test="null != auditorIdList">
and auditor_id in
<foreach collection="auditorIdList" index="index" item="item" open="(" separator="," close=")">
......
......@@ -189,9 +189,6 @@
<if test="auditorName != null and auditorName != '' ">
and auditor_name like concat('%', #{auditorName}, '%')
</if>
<if test="auditedGroupId != null ">
and audited_group_id = #{auditedGroupId}
</if>
<if test="isUse != null ">
and is_use = #{isUse}
</if>
......
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