This commit is contained in:
parent
c674c22da1
commit
a0d2db2702
|
|
@ -21,26 +21,7 @@
|
|||
</page>
|
||||
</module>
|
||||
|
||||
<!-- <module name="<22>괏르적" key="myBill2">-->
|
||||
<!-- <page name="<22>괏르적렘갭" key="myBill">-->
|
||||
<!-- <auth name="꿴璂" key="query"/>-->
|
||||
<!-- <auth name="劤藤" key="add"/>-->
|
||||
<!-- <auth name="긍서" key="edit"/>-->
|
||||
<!-- <auth name="<22>뇜" key="del"/>-->
|
||||
<!-- </page>-->
|
||||
<!-- <page name="<22>괏르적도갭" key="myBill">-->
|
||||
<!-- <auth name="꿴璂" key="query"/>-->
|
||||
<!-- <auth name="劤藤" key="add"/>-->
|
||||
<!-- <auth name="긍서" key="edit"/>-->
|
||||
<!-- <auth name="<22>뇜" key="del"/>-->
|
||||
<!-- </page>-->
|
||||
<!-- <page name="<22>괏르적憩瑯" key="myBill">-->
|
||||
<!-- <auth name="꿴璂" key="query"/>-->
|
||||
<!-- <auth name="劤藤" key="add"/>-->
|
||||
<!-- <auth name="긍서" key="edit"/>-->
|
||||
<!-- <auth name="<22>뇜" key="del"/>-->
|
||||
<!-- </page>-->
|
||||
<!-- </module>-->
|
||||
|
||||
|
||||
|
||||
</config>
|
||||
|
|
|
|||
|
|
@ -14,6 +14,6 @@ import java.util.List;
|
|||
public class AuthDTO {
|
||||
private Long taxAgentId;
|
||||
|
||||
private List<EmpOpt> empOpts;
|
||||
private List<EmpOpt> emps;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ import java.util.List;
|
|||
@AllArgsConstructor
|
||||
public class EmpOpt {
|
||||
private Long employeeId;
|
||||
|
||||
private List<String> opt;
|
||||
private List<Opt> opts;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
package com.engine.salary.entity.auth.dto;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class Opt {
|
||||
// private Long id;
|
||||
// private String page;
|
||||
private String opt;
|
||||
}
|
||||
|
||||
|
|
@ -23,6 +23,10 @@ public class AuthRoleSaveParam {
|
|||
@DataCheck(require = true, max = 40, message = "名称不允许为空,名称不能超过40个字符")
|
||||
private String name;
|
||||
|
||||
//
|
||||
// @DataCheck(require = true, max = 400, message = "名称不允许为空,名称不能超过400个字符")
|
||||
// private String description;
|
||||
|
||||
/**
|
||||
* 扣缴义务人id
|
||||
*/
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
package com.engine.salary.mapper.auth;
|
||||
|
||||
import com.engine.salary.entity.auth.dto.AuthDTO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface AuthMapper {
|
||||
|
||||
List<AuthDTO> getAuth();
|
||||
List<AuthDTO> getAuth(@Param("uid") Long uid, @Param("page") String page);
|
||||
}
|
||||
|
|
@ -2,21 +2,25 @@
|
|||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||
<mapper namespace="com.engine.salary.mapper.auth.AuthMapper">
|
||||
<resultMap id="BaseResultMap" type="com.engine.salary.entity.auth.dto.AuthDTO">
|
||||
<result column="tax_agent_id" property="taxAgentId"/>
|
||||
<collection property="empOpts" ofType="com.engine.salary.entity.auth.dto.EmpOpt">
|
||||
<result column="employee_id" property="employeeId"/>
|
||||
<collection ofType="java.lang.String" property="opt" />
|
||||
<id column="tax_agent_id" property="taxAgentId"/>
|
||||
<collection property="emps" ofType="com.engine.salary.entity.auth.dto.EmpOpt">
|
||||
<id column="employee_id" property="employeeId"/>
|
||||
<collection property="opts" ofType="com.engine.salary.entity.auth.dto.Opt">
|
||||
<!-- <id column="optId" property="id"/>-->
|
||||
<!-- <result column="page" property="page"/>-->
|
||||
<result column="opt" property="opt"/>
|
||||
</collection>
|
||||
</collection>
|
||||
</resultMap>
|
||||
|
||||
<select id="getAuth" resultMap="BaseResultMap">
|
||||
select role.tax_agent_id, d.employee_id, o.opt
|
||||
select role.tax_agent_id, d.employee_id, o.id as optId,o.page,o.opt
|
||||
from
|
||||
hrsa_auth_role_emp emp
|
||||
left join hrsa_auth_role role on emp.role_id = role.id
|
||||
left join hrsa_auth_role_data d on emp.role_id = d.role_id
|
||||
left join hrsa_auth_opt o on d.role_id = o.role_id
|
||||
where emp.employee_id = 92 and emp.delete_type = 0 and role.delete_type = 0 and d.delete_type = 0 and o.delete_type = 0
|
||||
where emp.employee_id = #{uid} and o.page = #{page} and emp.delete_type = 0 and role.delete_type = 0 and d.delete_type = 0 and o.delete_type = 0
|
||||
</select>
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -123,12 +123,12 @@ public class AuthController {
|
|||
return new ResponseResult<Long, AuthOptDTO>(user).run(getAuthWrapper(user)::syncData, roleId);
|
||||
}
|
||||
|
||||
@POST
|
||||
@GET
|
||||
@Path("/data/auth")
|
||||
@Produces(MediaType.APPLICATION_JSON)
|
||||
public String auth(@Context HttpServletRequest request, @Context HttpServletResponse response) {
|
||||
public String auth(@Context HttpServletRequest request, @Context HttpServletResponse response,@QueryParam(value = "page") String page) {
|
||||
User user = HrmUserVarify.getUser(request, response);
|
||||
return new ResponseResult<Long, Object>(user).run(getAuthWrapper(user)::auth);
|
||||
return new ResponseResult<String, Object>(user).run(getAuthWrapper(user)::auth,page);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -121,7 +121,8 @@ public class AuthWrapper extends Service {
|
|||
private AuthMapper getAuthMapper() {
|
||||
return MapperProxyFactory.getProxy(AuthMapper.class);
|
||||
}
|
||||
public Object auth() {
|
||||
return getAuthMapper().getAuth();
|
||||
|
||||
public Object auth(String page) {
|
||||
return getAuthMapper().getAuth((long) user.getUID(), page);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue