解决用户账单不显示用户名,会员任务不显示任务名称
This commit is contained in:
@ -36,7 +36,7 @@ public interface YxUserBillService extends BaseService<YxUserBill>{
|
||||
* @param criteria 条件参数
|
||||
* @return List<YxUserBillDto>
|
||||
*/
|
||||
List<Map<String,Object>> queryAll(YxUserBillQueryCriteria criteria);
|
||||
List<YxUserBillDto> queryAll(YxUserBillQueryCriteria criteria);
|
||||
|
||||
/**
|
||||
* 导出数据
|
||||
|
@ -54,4 +54,6 @@ public class YxUserBillDto implements Serializable {
|
||||
|
||||
/** 0 = 带确定 1 = 有效 -1 = 无效 */
|
||||
private Integer status;
|
||||
|
||||
private String nickname;
|
||||
}
|
||||
|
@ -52,7 +52,7 @@ public class YxUserBillServiceImpl extends BaseServiceImpl<UserBillMapper, YxUse
|
||||
//@Cacheable
|
||||
public Map<String, Object> queryAll(YxUserBillQueryCriteria criteria, Pageable pageable) {
|
||||
getPage(pageable);
|
||||
PageInfo<Map<String,Object>> page = new PageInfo<>(queryAll(criteria));
|
||||
PageInfo<YxUserBillDto> page = new PageInfo<>(queryAll(criteria));
|
||||
Map<String, Object> map = new LinkedHashMap<>(2);
|
||||
map.put("content", page.getList());
|
||||
map.put("totalElements", page.getTotal());
|
||||
@ -62,7 +62,7 @@ public class YxUserBillServiceImpl extends BaseServiceImpl<UserBillMapper, YxUse
|
||||
|
||||
@Override
|
||||
//@Cacheable
|
||||
public List<Map<String,Object>> queryAll(YxUserBillQueryCriteria criteria){
|
||||
public List<YxUserBillDto> queryAll(YxUserBillQueryCriteria criteria){
|
||||
|
||||
return baseMapper.findAllByQueryCriteria(criteria.getCategory(),criteria.getType(),criteria.getNickname());
|
||||
}
|
||||
|
@ -29,9 +29,10 @@ import java.util.Map;
|
||||
@Mapper
|
||||
public interface UserBillMapper extends CoreMapper<YxUserBill> {
|
||||
|
||||
@ResultType(Map.class)
|
||||
@Select("select b.title,b.pm,b.category,b.type,b.number,b.add_time as addTime,u.nickname " +
|
||||
"from yx_user_bill b left join yx_user u on u.uid=b.uid where if(#{category} !='',b.category=#{category},1=1) " +
|
||||
"and if(#{type} !='',b.type=#{type},1=1) and if(#{nickname} !='',u.nickname LIKE CONCAT('%',#{nickname},'%'),1=1) ")
|
||||
List<Map<String, Object>> findAllByQueryCriteria(@Param("category") String category, @Param("type") String type, @Param("nickname") String nickname);
|
||||
@Select("<script> select b.title,b.pm,b.category,b.type,b.number,b.add_time ,u.nickname " +
|
||||
"from yx_user_bill b left join yx_user u on u.uid=b.uid where 1=1 " +
|
||||
"<if test =\"category !=''\">and b.category=#{category}</if> " +
|
||||
"<if test =\"type !=''\">and b.type=#{type}</if> " +
|
||||
"<if test =\"nickname !=''\">and u.nickname= LIKE CONCAT('%',#{nickname},'%')</if> </script> ")
|
||||
List<YxUserBillDto> findAllByQueryCriteria(@Param("category") String category, @Param("type") String type, @Param("nickname") String nickname);
|
||||
}
|
||||
|
Reference in New Issue
Block a user