无关风月
2024-12-30 05693f5bde4748f749154926f925b45e8a05730f
小程序
7个文件已修改
51 ■■■■ 已修改文件
manage/src/main/java/com/jilongda/manage/controller/TAppUserController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
manage/src/main/java/com/jilongda/manage/controller/TCouponController.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manage/src/main/java/com/jilongda/manage/controller/TOrderAccountingController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manage/src/main/java/com/jilongda/manage/controller/TOrderController.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manage/src/main/java/com/jilongda/manage/model/TCoupon.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manage/src/main/resources/mapping/TOrderAccountingMapper.xml 16 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manage/src/main/resources/mapping/TOrderAftersalesMapper.xml 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manage/src/main/java/com/jilongda/manage/controller/TAppUserController.java
@@ -98,7 +98,7 @@
        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);
manage/src/main/java/com/jilongda/manage/controller/TCouponController.java
@@ -15,6 +15,7 @@
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;
@@ -119,8 +120,9 @@
                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();
manage/src/main/java/com/jilongda/manage/controller/TOrderAccountingController.java
@@ -75,6 +75,7 @@
                res.setPhone(byId1.getPhone());
            }
        }
        res.setPhone(byId.getPhone());
        res.setAge(byId.getAge());
        res.setRealName(byId.getRealName());
        res.setGender(byId.getGender());
manage/src/main/java/com/jilongda/manage/controller/TOrderController.java
@@ -13,6 +13,7 @@
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;
@@ -24,6 +25,7 @@
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.*;
@@ -68,6 +70,21 @@
    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) {
manage/src/main/java/com/jilongda/manage/model/TCoupon.java
@@ -50,6 +50,9 @@
    @ApiModelProperty(value = "门店id 空字符串表示不限门店")
    @TableField("storeId")
    private String storeId;
    @ApiModelProperty(value = "扫码发放的二维码地址")
    @TableField("qrCode")
    private String qrCode;
    @ApiModelProperty(value = " 有效期(天)最高365 0表示无期限")
    @TableField("time")
manage/src/main/resources/mapping/TOrderAccountingMapper.xml
@@ -39,17 +39,17 @@
                      <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>
manage/src/main/resources/mapping/TOrderAftersalesMapper.xml
@@ -24,11 +24,11 @@
    </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},'%')
@@ -37,7 +37,7 @@
                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}