Commit f3611a10 by 吴博

bug: [none] fixUserCount

parent 3c998783
...@@ -3333,9 +3333,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz { ...@@ -3333,9 +3333,7 @@ public class RightsSettingBizImpl implements RightsSettingBiz {
rightsSettingDto = getByLabel(adviserDto.getTempletId(), adviserDto.getSecondTempletId(), adviserDto.getGraLabelId(), rightsSettingDto = getByLabel(adviserDto.getTempletId(), adviserDto.getSecondTempletId(), adviserDto.getGraLabelId(),
adviserDto.getSubLabelId(), adviserDto.getVolLabelId(), adviserDto.getVerLabelId(), adviserDto.getThirdTempletId()); adviserDto.getSubLabelId(), adviserDto.getVolLabelId(), adviserDto.getVerLabelId(), adviserDto.getThirdTempletId());
if (null == rightsSettingDto) { if (null == rightsSettingDto) {
RightsSetting rightsSetting = rightsSettingDAO.selectByPrimaryKey(2267L); RightsSettingDto rightsSettingDto4New = rightsSettingDAO.getDTOById(2267L);
RightsSettingDto rightsSettingDto4New = new RightsSettingDto();
BeanUtils.copyProperties(rightsSetting,rightsSettingDto4New);
return rightsSettingDto4New; return rightsSettingDto4New;
} }
Long rightsSettingId = rightsSettingDto.getId(); Long rightsSettingId = rightsSettingDto.getId();
......
...@@ -35,4 +35,6 @@ public interface RightsSettingDAO extends BaseDao<RightsSetting> { ...@@ -35,4 +35,6 @@ public interface RightsSettingDAO extends BaseDao<RightsSetting> {
Map<Long, RightsSettingDto> listByBookIds(List<Long> bookIds); Map<Long, RightsSettingDto> listByBookIds(List<Long> bookIds);
void updateUser(RightsSetting rightsSetting); void updateUser(RightsSetting rightsSetting);
RightsSettingDto getDTOById(Long id);
} }
...@@ -92,4 +92,9 @@ public class RightsSettingDAOImpl extends BaseDaoImpl<RightsSetting> implement ...@@ -92,4 +92,9 @@ public class RightsSettingDAOImpl extends BaseDaoImpl<RightsSetting> implement
public void updateUser(RightsSetting rightsSetting) { public void updateUser(RightsSetting rightsSetting) {
getSessionTemplate().update(getStatement("updateUser"), rightsSetting); getSessionTemplate().update(getStatement("updateUser"), rightsSetting);
} }
@Override
public RightsSettingDto getDTOById(Long id) {
return super.getSqlSession().selectOne(getStatement("getDTOById"),id);
}
} }
...@@ -422,4 +422,13 @@ ...@@ -422,4 +422,13 @@
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
<select id="getDTOById" parameterType="long" resultMap="DtoResultMap">
select
<include refid="Base_Column_List"/>
from
rights_setting
where
id = #{id,jdbcType=BIGINT}
</select>
</mapper> </mapper>
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