数据大屏弹窗bug修改及消息未读数开发
This commit is contained in:
parent
37caac54fc
commit
77c688fd5f
|
|
@ -113,7 +113,10 @@ public class LargeScreenController {
|
|||
Integer repairingDevNum = devInfoMapper.getRepairingDevNum();
|
||||
orderData.setDevRepairingNum(repairingDevNum);
|
||||
DevInfo devInfo = devInfoMapper.getDevUsageRatio();
|
||||
orderData.setDevUsageRatio(MathUtil.calculatePercentage(devInfo.getTotalLeaseDay(), devInfo.getTotalUpDay() + devInfo.getTotalLeaseDay()));
|
||||
if(devInfo != null){
|
||||
orderData.setDevUsageRatio(MathUtil.calculatePercentage(devInfo.getTotalLeaseDay(), devInfo.getTotalUpDay() + devInfo.getTotalLeaseDay()));
|
||||
}
|
||||
|
||||
return AjaxResult.success(orderData);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ import java.util.List;
|
|||
*/
|
||||
@RestController
|
||||
@Api(value = "个人管理", tags = {"个人管理"})
|
||||
@RequestMapping("/userManage")
|
||||
@RequestMapping("/")
|
||||
public class UserController extends BaseController {
|
||||
|
||||
@Resource
|
||||
|
|
|
|||
|
|
@ -87,4 +87,7 @@ public class UserDto {
|
|||
|
||||
@ApiModelProperty(value = "是否内置用户0:内置用户,1:非内置用户")
|
||||
private String isBuiltIn;
|
||||
|
||||
@ApiModelProperty(value = "消息数")
|
||||
private String msgNum;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -448,6 +448,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
SELECT distinct(type_id)
|
||||
FROM ma_lease_details
|
||||
where type_id is not null
|
||||
group by type_id
|
||||
limit 1
|
||||
</select>
|
||||
|
||||
<select id="getTopPopularTypeName" resultType="java.lang.String">
|
||||
|
|
@ -507,4 +509,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
ORDER BY
|
||||
lease_count DESC
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</update>
|
||||
|
||||
<select id="getUserById" resultType="com.bonus.material.user.entity.UserDto">
|
||||
select * from sys_user where user_id = #{userId}
|
||||
SELECT
|
||||
su.*,
|
||||
SUM(
|
||||
IF
|
||||
( is_read = 0, 1, 0 )) AS msgNum
|
||||
FROM
|
||||
sys_user su
|
||||
LEFT JOIN bm_message bm ON su.user_id = bm.to_user
|
||||
WHERE
|
||||
su.user_id =#{userId}
|
||||
</select>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue