Browse Source

新增角色类型下的分配详情

master
xyiege 3 years ago
parent
commit
909f5e3b1f
  1. 16
      src/main/java/cn/chjyj/szwh/service/AccountRatioDetailService.java
  2. 19
      src/main/java/cn/chjyj/szwh/service/impl/AccountRatioDetailServiceImpl.java
  3. 9
      src/main/resources/mapper/szwh/AccountRatioDetailMapper.xml

16
src/main/java/cn/chjyj/szwh/service/AccountRatioDetailService.java

@ -0,0 +1,16 @@
package cn.chjyj.szwh.service;
import cn.chjyj.szwh.bean.AccountRatioDetail;
/**
* 资金分配细节
*/
public interface AccountRatioDetailService {
/**
* 查询具体的分配比例
* @param id
* @return
*/
AccountRatioDetail getAccRatioDetailUnderRole(Integer id,Integer roleid);
}

19
src/main/java/cn/chjyj/szwh/service/impl/AccountRatioDetailServiceImpl.java

@ -0,0 +1,19 @@
package cn.chjyj.szwh.service.impl;
import cn.chjyj.szwh.bean.AccountRatioDetail;
import cn.chjyj.szwh.mapper.AccountRatioDetailMapper;
import cn.chjyj.szwh.service.AccountRatioDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@Service
public class AccountRatioDetailServiceImpl implements AccountRatioDetailService {
@Autowired
private AccountRatioDetailMapper accountRatioDetailMapper;
@Override
public AccountRatioDetail getAccRatioDetailUnderRole(Integer id, Integer roleid) {
return accountRatioDetailMapper.getAccRatioDetailByIdRole(id,2);
}
}

9
src/main/resources/mapper/szwh/AccountRatioDetailMapper.xml

@ -17,7 +17,14 @@
)SELECT * FROM mm ORDER BY id DESC;
</select>
<!-- 主键查询用户信息 -->
<!-- 查询设置下的角色分配详情 -->
<select id="getAccRatioDetailByIdRole" resultType="cn.chjyj.szwh.bean.AccountRatioDetail">
select <include refid="column"/>
from <include refid="tbName"/>
where setting_id=#{settid} and role_type=#{roleid}
</select>
<!-- 主键查询信息 -->
<select id="getAccountRationDetailById" parameterType="java.lang.Integer" resultType="cn.chjyj.szwh.bean.AccountRatioDetail">
select <include refid="column"/>
from <include refid="tbName"/>

Loading…
Cancel
Save