Commit a3667d47 by guojuxing

商户前置资源调整

parent 53a68e13
......@@ -50,4 +50,13 @@ public interface BusinessFrontResApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.lang.String>


*/
ServiceResponse<List<BusinessFrontResDTO>> listByParams(String search, Integer resourceType);
/**
* 前置资源种类查询
* @Title: listGroupResourceCode

* @Description:

* @author guojuxing 

* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.BusinessFrontResDTO>>


*/
ServiceResponse<List<BusinessFrontResDTO>> listGroupResourceCode();
}
......@@ -57,5 +57,7 @@ public interface TabSysBusinessFrontResMapper {
List<TabSysBusinessFrontRes> listByParam(@Param("search") String search,
@Param("resourceType") Integer resourceType);
List<TabSysBusinessFrontRes> listGroupResourceCode();
List<TabSysBusinessFrontRes> listByCode(@Param("code") String code, @Param("resourceType") Integer resourceType);
}
\ No newline at end of file
......@@ -14,6 +14,8 @@ public interface BusinessFrontResService {
List<TabSysBusinessFrontRes> listByParam(String search, Integer resourceType);
List<TabSysBusinessFrontRes> listGroupResourceCode();
/**
* 根据code查询页面
* @param code
......
......@@ -48,6 +48,11 @@ public class BusinessFrontResServiceImpl implements BusinessFrontResService{
}
@Override
public List<TabSysBusinessFrontRes> listGroupResourceCode() {
return tabSysBusinessFrontResMapper.listGroupResourceCode();
}
@Override
public List<TabSysBusinessFrontRes> listByCode(String code, Integer resourceType) {
return tabSysBusinessFrontResMapper.listByCode(code, resourceType);
}
......
package com.gic.auth.service.outer.impl;
import java.util.Collections;
import java.util.List;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.dto.BusinessFrontResDTO;
import com.gic.auth.entity.TabSysBusinessFrontRes;
......@@ -7,13 +15,6 @@ import com.gic.auth.service.BusinessFrontResApiService;
import com.gic.auth.service.BusinessFrontResService;
import com.gic.commons.util.EntityUtil;
import com.gic.enterprise.error.ErrorCode;
import org.apache.commons.collections.CollectionUtils;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Collections;
import java.util.List;
@Service("businessFrontResApiService")
public class BusinessFrontResApiServiceImpl implements BusinessFrontResApiService {
......@@ -89,4 +90,13 @@ public class BusinessFrontResApiServiceImpl implements BusinessFrontResApiServic
}
return ServiceResponse.success(Collections.emptyList());
}
@Override
public ServiceResponse<List<BusinessFrontResDTO>> listGroupResourceCode() {
List<TabSysBusinessFrontRes> list = businessFrontResService.listGroupResourceCode();
if (CollectionUtils.isNotEmpty(list)) {
return ServiceResponse.success(EntityUtil.changeEntityListNew(BusinessFrontResDTO.class, list));
}
return ServiceResponse.success(Collections.emptyList());
}
}
......@@ -171,4 +171,12 @@
and resource_type = #{resourceType}
and resource_code = #{code}
</select>
<select id="listGroupResourceCode" resultMap="BaseResultMap">
SELECT <include refid="Base_Column_List"></include>
from tab_sys_business_front_res
where status = 1
GROUP by resource_code
</select>
</mapper>
\ No newline at end of file
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