修改用户账单sql
This commit is contained in:
@ -274,13 +274,13 @@ public class YxUserBillServiceImpl extends BaseServiceImpl<UserBillMapper, YxUse
|
|||||||
@Override
|
@Override
|
||||||
public List<YxUserBillDto> queryAll(YxUserBillQueryCriteria criteria){
|
public List<YxUserBillDto> queryAll(YxUserBillQueryCriteria criteria){
|
||||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
|
||||||
Integer date =null;
|
String date =null;
|
||||||
Integer date1 = null;
|
String date1 = null;
|
||||||
if(StringUtils.isNotEmpty(criteria.getStartTime())){
|
if(StringUtils.isNotEmpty(criteria.getStartTime())){
|
||||||
try {
|
try {
|
||||||
date = OrderUtil.dateToTimestamp(sdf.parse(criteria.getStartTime()));
|
date = sdf.parse(criteria.getStartTime())+ " 00:00:00";
|
||||||
if(StringUtils.isNotEmpty(criteria.getEndTime())){
|
if(StringUtils.isNotEmpty(criteria.getEndTime())){
|
||||||
date1 = OrderUtil.dateToTimestamp(sdf.parse(criteria.getEndTime()))+24*60*60;
|
date1 =sdf.parse(criteria.getEndTime())+ " 23:59:59";
|
||||||
}
|
}
|
||||||
} catch (ParseException e) {
|
} catch (ParseException e) {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
|
@ -84,8 +84,8 @@ public interface UserBillMapper extends CoreMapper<YxUserBill> {
|
|||||||
"<if test =\"type !=''\">and b.type=#{type}</if> " +
|
"<if test =\"type !=''\">and b.type=#{type}</if> " +
|
||||||
"<if test =\"title !=''\">and b.title=#{title}</if> " +
|
"<if test =\"title !=''\">and b.title=#{title}</if> " +
|
||||||
"<if test =\"pm !=null\">and b.pm=#{pm}</if> " +
|
"<if test =\"pm !=null\">and b.pm=#{pm}</if> " +
|
||||||
"<if test =\"date !=null\">and b.add_time >= ${date}</if> " +
|
"<if test =\"date !=null\">and b.create_time >= STR_TO_DATE(#{date},'%Y-%m-%d %H:%i:%s')</if> " +
|
||||||
"<if test =\"date1 !=null\">and b.add_time <= ${date1}</if> " +
|
"<if test =\"date1 !=null\">and b.create_time <=STR_TO_DATE(#{date1},'%Y-%m-%d %H:%i:%s')</if> " +
|
||||||
"<if test =\"nickname !=''\">and u.nickname LIKE CONCAT('%',#{nickname},'%')</if> </script> ")
|
"<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, @Param("pm") Integer pm, @Param("date")Integer date, @Param("date1")Integer date1,@Param("title")String title);
|
List<YxUserBillDto> findAllByQueryCriteria(@Param("category") String category, @Param("type") String type, @Param("nickname") String nickname, @Param("pm") Integer pm, @Param("date")String date, @Param("date1")String date1,@Param("title")String title);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user