| | |
| | | return ApiResult.success(tAppUserVO); |
| | | } |
| | | @ApiOperation(value = "用户详情-查看优惠券") |
| | | @GetMapping(value = "/getCouponDetailById") |
| | | @PostMapping(value = "/getCouponDetailById") |
| | | public ApiResult<PageInfo<TAppUserCouponVO>> getCouponDetailById(@RequestBody TAppUserCouponQuery query) { |
| | | PageInfo<TAppUserCouponVO> appUserVOPageInfo = couponReceiveService.pageList(query); |
| | | return ApiResult.success(appUserVOPageInfo); |
| | |
| | | import com.jilongda.manage.service.TAppUserService; |
| | | import com.jilongda.manage.service.TCouponReceiveService; |
| | | import com.jilongda.manage.service.TCouponService; |
| | | import com.jilongda.manage.utils.OssUploadUtil; |
| | | import com.jilongda.manage.utils.QRCodeUtil; |
| | | import com.jilongda.manage.vo.TAppUserVO; |
| | | import com.jilongda.manage.vo.TCouponInfoVO; |
| | |
| | | String code = "{\"id\": "+dto.getId()+ "}"; |
| | | BufferedImage blueImage = QRCodeUtil.createImage(code); |
| | | MultipartFile blueFile = convert(blueImage, new Date().getTime() + UUIDUtil.getRandomCode(3) + ".PNG"); |
| | | // todo 没有云存储 |
| | | // String s = OssUploadUtil.ossUpload("img/", blueFile); |
| | | String s = OssUploadUtil.ossUpload("eyes/", blueFile); |
| | | dto.setQrCode(s); |
| | | couponService.updateById(dto); |
| | | break; |
| | | } |
| | | return ApiResult.success(); |
| | |
| | | res.setPhone(byId1.getPhone()); |
| | | } |
| | | } |
| | | res.setPhone(byId.getPhone()); |
| | | res.setAge(byId.getAge()); |
| | | res.setRealName(byId.getRealName()); |
| | | res.setGender(byId.getGender()); |
| | |
| | | import com.jilongda.manage.query.TOrderQuery; |
| | | import com.jilongda.manage.service.*; |
| | | import com.jilongda.manage.utils.LoginInfoUtil; |
| | | import com.jilongda.manage.utils.OssUploadUtil; |
| | | import com.jilongda.manage.vo.TModelVO; |
| | | import com.jilongda.manage.vo.TOptometryVO; |
| | | import com.jilongda.manage.vo.TOrderListVO; |
| | |
| | | import org.springframework.util.StringUtils; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | |
| | | private TBrandService brandService; |
| | | @Autowired |
| | | private TOptometryService optometryService; |
| | | @PostMapping("/obs-upload") |
| | | @ApiOperation(value = "文件上传",tags = "管理后台-文件上传") |
| | | public ApiResult<String> uploadOSS(@RequestPart("file") MultipartFile file) { |
| | | try { |
| | | // 上传并返回访问地址 |
| | | String fileName = file.getOriginalFilename(); |
| | | String prefix = fileName.substring(fileName.lastIndexOf(".")); |
| | | long fileSize = file.getSize(); |
| | | String url = OssUploadUtil.ossUpload("eyes/",file); |
| | | return ApiResult.success(url); |
| | | } catch (Exception e) { |
| | | System.err.println("上传文件失败"+e); |
| | | return ApiResult.failed(e.getMessage()); |
| | | } |
| | | } |
| | | @ApiOperation(value = "销售订单分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public ApiResult<PageInfo<TOrderListVO>> pageList(@RequestBody TOrderQuery query) { |
| | |
| | | @ApiModelProperty(value = "门店id 空字符串表示不限门店") |
| | | @TableField("storeId") |
| | | private String storeId; |
| | | @ApiModelProperty(value = "扫码发放的二维码地址") |
| | | @TableField("qrCode") |
| | | private String qrCode; |
| | | |
| | | @ApiModelProperty(value = " 有效期(天)最高365 0表示无期限") |
| | | @TableField("time") |
| | |
| | | <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 test="query.startTime != null and query.startTime!=''"> |
| | | and (t1.createTime between #{query.startTime} and #{query.endTime}) |
| | | </if> |
| | | <if test="req.startMoney != null "> |
| | | and (t1.payMoney between #{req.startMoney} and #{req.endMoney}) |
| | | <if test="query.startMoney != null "> |
| | | and (t1.payMoney between #{query.startMoney} and #{query.endMoney}) |
| | | </if> |
| | | <if test="req.isAccounting != null "> |
| | | and t1.isAccounting = #{req.isAccounting} |
| | | <if test="query.isAccounting != null "> |
| | | and t1.isAccounting = #{query.isAccounting} |
| | | </if> |
| | | <if test="req.storeId != null "> |
| | | and t1.storeId = #{req.storeId} |
| | | <if test="query.storeId != null "> |
| | | and t1.storeId = #{query.storeId} |
| | | </if> |
| | | order by t1.isAccounting desc |
| | | </select> |
| | |
| | | </sql> |
| | | <select id="pageList" resultType="com.jilongda.manage.vo.TOrderAftersalesVO"> |
| | | select toa.id, toa.code, toa.sysId, toa.optometristId, toa.orderId, toa.reason, toa.handleResult, toa.createTime, toa.updateTime, |
| | | toa.createBy, toa.updateBy, toa.isDelete,tau.name, tau.phone, tau.realName, ts.storeName, o.orderMoney |
| | | toa.createBy, toa.updateBy, toa.isDelete,tau.name, tau.phone, tau.realName, ts.name as storeName, o.orderMoney |
| | | from t_order_aftersales toa |
| | | left join t_app_user tau on toa.sysId = tau.id |
| | | left join t_store ts on toa.storeId = ts.id |
| | | left join t_order o on toa.orderId = o.id |
| | | left join t_store ts on o.storeId = ts.id |
| | | <where> |
| | | <if test="query.name != null and query.name != ''"> |
| | | and tau.name like concat('%',#{query.name},'%') |
| | |
| | | and tau.phone like concat('%',#{query.phone},'%') |
| | | </if> |
| | | <if test="query.storeId != null"> |
| | | and toa.storeId = #{query.phone} |
| | | and o.storeId = #{query.phone} |
| | | </if> |
| | | <if test="query.startTime != null and query.startTime != '' and query.endTime != null and query.endTime != ''"> |
| | | and toa.createTime between #{query.startTime} and #{query.endTime} |