manage/src/main/java/com/jilongda/manage/controller/TOrderAccountingController.java
@@ -13,11 +13,8 @@ import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; import org.springframework.util.StringUtils; import org.springframework.web.bind.annotation.*; /** * <p> @@ -40,6 +37,26 @@ @ApiOperation(value = "核算订单分页列表") @PostMapping(value = "/pageList") public ApiResult<PageInfo<TOrderVO>> pageList(@RequestBody TOrderAccountingQuery query) { if (StringUtils.hasLength(query.getStartTime())){ query.setStartTime(query.getStartTime()+" 00:00:00"); query.setEndTime(query.getEndTime()+" 23:59:59"); } PageInfo<TOrderVO> res = orderAccountingService.pageList(query); return ApiResult.success(res); } @ApiOperation(value = "核算详情页面") @GetMapping(value = "/detail") public ApiResult detail(Integer id) { return ApiResult.success(); } @ApiOperation(value = "确认核算操作") @PostMapping(value = "/confirm") public ApiResult confirm(@RequestBody TOrderAccountingQuery query) { if (StringUtils.hasLength(query.getStartTime())){ query.setStartTime(query.getStartTime()+" 00:00:00"); query.setEndTime(query.getEndTime()+" 23:59:59"); } PageInfo<TOrderVO> res = orderAccountingService.pageList(query); return ApiResult.success(res); } manage/src/main/java/com/jilongda/manage/model/TOrder.java
@@ -144,7 +144,7 @@ @ApiModelProperty(value = "手动添加订单-用户姓名") @TableField("realName") private String realName; @ApiModelProperty(value = "手动添加订单-用户手机号") @ApiModelProperty(value = "用户手机号") @TableField("phone") private String phone; @ApiModelProperty(value = "手动添加订单-用户年龄") @@ -153,5 +153,8 @@ @ApiModelProperty(value = "手动添加订单-用户性别 1男2女") @TableField("gender") private Integer gender; @ApiModelProperty(value = "微信昵称") @TableField("name") private Integer name; } manage/src/main/java/com/jilongda/manage/vo/TOrderVO.java
@@ -11,8 +11,7 @@ @Data @ApiModel(value = "镜架型号VO") public class TOrderVO extends TOrder { @ApiModelProperty(value = "微信名称") private String name; @ApiModelProperty(value = "店铺名称") private String storeName; } manage/src/main/resources/mapping/TOrderAccountingMapper.xml
@@ -29,9 +29,29 @@ id, code, orderId, rLens, lLens, frame, createTime, updateTime, createBy, updateBy, isDelete, commission, rLensProfit, lLensProfit, frameProfit, payMoney, profitMoney, profitRating </sql> <select id="pageList" resultType="com.jilongda.manage.vo.TOrderVO"> select t1.* from select t1.*,t2.name as storeName from t_order t1 left join left join t_store t2 on t1.storeId = t2.id where 1=1 <if test="query.name != null and query.name != ''"> and t1.name like concat('%',#{query.name},'%') </if> <if test="query.phone != null and query.phone != ''"> and t1.phone like concat('%',#{query.phone},'%') </if> <if test="req.startTime != null and req.startTime!=''"> and (t1.createTime between #{req.startTime} and #{req.endTime}) </if> <if test="req.startMoney != null "> and (t1.payMoney between #{req.startMoney} and #{req.endMoney}) </if> <if test="req.isAccounting != null "> and t1.isAccounting = #{req.isAccounting} </if> <if test="req.storeId != null "> and t1.storeId = #{req.storeId} </if> order by t1.isAccounting desc </select> </mapper>