xuhy
2024-08-23 78676e7c2e4e06080a45fb6802bd32fd931cead3
Merge remote-tracking branch 'origin/master'
1 文件已重命名
23个文件已修改
2个文件已添加
338 ■■■■ 已修改文件
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/AppUserInfoDto.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/InfoCouponDto.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/UserChangeDto.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserFallbackFactory.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUser.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/dto/ApplyChargingQuery.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/model/TApplyChargingPile.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/factory/OrderFallbackFactory.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/dto/AppGoodQuery.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/dto/ExchangeDto.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/dto/PointChangeDto.java 11 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java 28 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/PointDetailUtil.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java 102 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/dto/TApplyChargingPileExportDto.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-chargingPile/src/main/resources/template/充电桩申请记录.xlsx 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TShoppingOrderController.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java 33 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TGoodsMapper.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TGoodsService.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TGoodsServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TGoodsMapper.xml 23 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/controller/WxPayController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/AppUserInfoDto.java
@@ -5,6 +5,7 @@
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
@@ -12,6 +13,8 @@
public class AppUserInfoDto {
    @ApiModelProperty("1是0否")
    private Integer isVip;
    @ApiModelProperty("最低会员价格")
    private BigDecimal minPrice;
    @ApiModelProperty("vip结束时间")
    private LocalDateTime vipExpireTime;
    @ApiModelProperty("当天是否签到")
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/InfoCouponDto.java
@@ -1,6 +1,8 @@
package com.ruoyi.account.api.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -9,9 +11,14 @@
@Data
public class InfoCouponDto {
    @ApiModelProperty(value = "主键")
    @TableId(value = "id", type = IdType.AUTO)
    private Long id;
    @ApiModelProperty(value = "优惠券名称")
    @TableField("name")
    private String name;
    private Integer type;
    @ApiModelProperty(value = "优惠方式(1=满减,2=抵扣)")
    @TableField("preferential_mode")
    private Integer preferentialMode;
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/dto/UserChangeDto.java
@@ -8,4 +8,5 @@
    private Long userId;
    @ApiModelProperty("1=正常,2=冻结")
    private Integer status;
    private String remark;
}
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/factory/AppUserFallbackFactory.java
@@ -3,6 +3,7 @@
import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.account.api.model.TAppUser;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.dto.PointChangeDto;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.cloud.openfeign.FallbackFactory;
@@ -41,8 +42,13 @@
            }
            @Override
            public R change(PointChangeDto points) {
                return null;
            }
            @Override
            public R<TAppUser> selectByPhone(String phone) {
                return R.fail("通过手机号查询用户失败:"+throwable.getMessage());
                return R.fail("积分变化失败:"+throwable.getMessage());
            }
            @Override
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/feignClient/AppUserClient.java
@@ -4,6 +4,7 @@
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.account.api.factory.AppUserFallbackFactory;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.dto.PointChangeDto;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;
@@ -42,6 +43,9 @@
    @PostMapping("/t-app-user/user/updateAppUser")
    R updateAppUser(@RequestBody TAppUser appUser);
    @PostMapping("/t-app-user/user/points/change")
    R change(@RequestBody PointChangeDto points);
    /**
     * 通过手机号查询用户
     * @param phone
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUser.java
@@ -95,6 +95,11 @@
    @TableField("city_code")
    private String cityCode;
    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;
    @ApiModelProperty(value = "状态(1=正常,2=冻结,3=注销)")
    @TableField("status")
    private Integer status;
ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/dto/ApplyChargingQuery.java
@@ -5,5 +5,5 @@
@Data
public class ApplyChargingQuery extends BasePage {
    String name;
    String landlordPhone;
}
ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/model/TApplyChargingPile.java
@@ -56,6 +56,7 @@
    @TableField("landlord_handling")
    private Integer landlordHandling;
    @ApiModelProperty(value = "户名")
    @TableField("landlord_name")
    private String landlordName;
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/factory/OrderFallbackFactory.java
@@ -49,6 +49,11 @@
                return R.fail("创建订单" + cause.getMessage());
            }
            @Override
            public R<Long> shopCreate(ExchangeDto exchangeDto) {
                return R.fail("订单创建" + cause.getMessage());
            }
            @Override
            public R<TActivityVO> activityStatistics(TActivityStatisticsQuery dto) {
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java
@@ -34,6 +34,8 @@
    @PostMapping("/t-exchange-order/create")
    public R<Long> exchangeCreate(@RequestBody ExchangeDto exchangeDto);
    @PostMapping("/t-shopping-order/create")
    public R<Long> shopCreate(@RequestBody ExchangeDto exchangeDto);
    /**
     * 管理后台 活动费用统计
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/dto/AppGoodQuery.java
New file
@@ -0,0 +1,11 @@
package com.ruoyi.common.core.dto;
import com.ruoyi.common.core.web.page.BasePage;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@Data
public class AppGoodQuery extends BasePage {
    @ApiModelProperty("1=购买商品,2=兑换商品")
    private Integer type;
}
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/dto/ExchangeDto.java
File was renamed from ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/dto/ExchangeDto.java
@@ -18,6 +18,13 @@
    Integer goodType;
    @ApiModelProperty(hidden = true)
    Integer point;
    @ApiModelProperty("购买数量")
    Integer num;
    @ApiModelProperty("优惠卷id")
    Long couponId;
    @ApiModelProperty("1微信2支付宝")
    Integer payMethod;
}
ruoyi-common/ruoyi-common-core/src/main/java/com/ruoyi/common/core/dto/PointChangeDto.java
New file
@@ -0,0 +1,11 @@
package com.ruoyi.common.core.dto;
import lombok.Data;
import org.springframework.web.bind.annotation.RequestParam;
@Data
public class PointChangeDto {
    private Long userId;
    private Integer points;
    private String remark;
    private Integer type;
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java
@@ -15,6 +15,7 @@
import com.ruoyi.account.util.GiveVipUtil;
import com.ruoyi.common.core.constant.Constants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.dto.PointChangeDto;
import com.ruoyi.common.core.enums.status.AppUserStatusEnum;
import com.ruoyi.common.core.utils.JwtUtils;
import com.ruoyi.common.core.utils.StringUtils;
@@ -29,13 +30,11 @@
import com.ruoyi.order.api.feignClient.ExchangeOrderClient;
import com.ruoyi.order.api.model.TChargingOrder;
import com.ruoyi.order.api.model.TExchangeOrder;
import com.ruoyi.other.api.domain.*;
import com.ruoyi.other.api.dto.UnitListQueryDto;
import com.ruoyi.other.api.domain.TCompany;
import com.ruoyi.other.api.domain.TCoupon;
import com.ruoyi.other.api.domain.TIntegralRule;
import com.ruoyi.other.api.domain.TUserTag;
import com.ruoyi.other.api.feignClient.IntegralRuleClient;
import com.ruoyi.other.api.feignClient.OtherClient;
import com.ruoyi.other.api.feignClient.VipClient;
import com.ruoyi.system.api.model.LoginUserApplet;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
@@ -106,6 +105,9 @@
    private TAppUserCarService carService;
    @Resource
    private IntegralRuleClient integralRuleClient;
    @Resource
    private VipClient vipClient;
@@ -435,6 +437,7 @@
    public R pointsDetail(@RequestBody UserChangeDto userChangeDto) {
        TAppUser appUser = appUserService.getById(userChangeDto.getUserId());
        appUser.setStatus(userChangeDto.getStatus());
        appUser.setRemark(userChangeDto.getRemark());
        appUserService.updateById(appUser);
        return R.ok();
    }
@@ -467,6 +470,8 @@
        Long userId = tokenService.getLoginUserApplet().getUserId();
        TAppUser byId = appUserService.getById(userId);
        AppUserInfoDto appUserInfoDto = new AppUserInfoDto();
        TVip data = vipClient.getVipInfoByType(2).getData();
        appUserInfoDto.setMinPrice(data.getMonthlyCard());
        //判断会员
        if (byId.getVipEndTime()==null||byId.getVipEndTime().isBefore(LocalDateTime.now())){
@@ -500,6 +505,7 @@
            TCoupon coupon = JSON.toJavaObject(JSON.parseObject(tAppCoupon.getCouponJson()), TCoupon.class);
            InfoCouponDto infoCouponDto = new InfoCouponDto();
            BeanUtils.copyProperties(coupon,infoCouponDto);
            infoCouponDto.setId(tAppCoupon.getId());
            couponDtos.add(infoCouponDto);
        }
@@ -620,7 +626,7 @@
    }
    @ApiOperation(value = "签到", tags = {"小程序-个人中心-签到"})
    @PostMapping(value = "/user/sign")
    @GetMapping(value = "/user/sign")
    public R sign() {
        LoginUserApplet loginUserApplet = tokenService.getLoginUserApplet();
        Long userId = loginUserApplet.getUserId();
@@ -664,13 +670,23 @@
                signService.updateById(appUserSign);
            }
        }
        pointDetailUtil.addDetail(byId.getPoints(),byId.getPoints()+points,1,userId,"每日签到","");
        pointDetailUtil.addDetail(byId.getPoints(),byId.getPoints()+points,1,userId,"每日签到","JF");
        byId.setPoints(byId.getPoints()+points);
        appUserService.updateById(byId);
        return R.ok();
    }
    //积分变化记录用
    @PostMapping(value = "/user/points/change")
    public R change(@RequestBody PointChangeDto points) {
        TAppUser byId = appUserService.getById(points.getUserId());
        pointDetailUtil.addDetail(byId.getPoints(),byId.getPoints()+points.getPoints(),points.getType(),points.getUserId(),points.getRemark(),"JF");
        byId.setPoints(byId.getPoints()+points.getPoints());
        appUserService.updateById(byId);
        return R.ok();
    }
    @ApiOperation(value = "添加编辑车辆", tags = {"小程序-个人中心-车辆"})
    @PostMapping(value = "/user/car/addOrUpdate")
    public R carAdd(@RequestBody TAppUserCar appUserCar) {
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/util/PointDetailUtil.java
@@ -15,7 +15,7 @@
    public void addDetail(Integer old,Integer now,Integer type,Long userId,String extension,String code){
        TAppUserIntegralChange tAppUserIntegralChange= new TAppUserIntegralChange();
        tAppUserIntegralChange.setCode(OrderCodeUtil.getOrderCode("DH"));
        tAppUserIntegralChange.setCode(OrderCodeUtil.getOrderCode(code));
        tAppUserIntegralChange.setAppUserId(userId);
        tAppUserIntegralChange.setChangeType(type);
        tAppUserIntegralChange.setHistoricalIntegral(old);
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/TApplyChargingPileController.java
@@ -5,6 +5,9 @@
import com.alibaba.excel.ExcelWriter;
import com.alibaba.excel.write.builder.ExcelWriterBuilder;
import com.alibaba.excel.write.metadata.WriteSheet;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.chargingPile.api.dto.ApplyChargingQuery;
import com.ruoyi.chargingPile.api.dto.ApplyChargingRemarkDto;
@@ -32,6 +35,7 @@
import java.net.URLEncoder;
import java.util.ArrayList;
import java.util.List;
import java.util.regex.Pattern;
/**
 * <p>
@@ -79,7 +83,7 @@
    @PostMapping(value = "/page")
    public AjaxResult<Page<TApplyChargingPile>> page(ApplyChargingQuery applyChargingQuery) {
        Page<TApplyChargingPile> page = applyChargingPileService.lambdaQuery()
                .like(applyChargingQuery.getName() != null && !applyChargingQuery.getName().equals(""), TApplyChargingPile::getAgentPhone, applyChargingQuery.getName())
                .like(applyChargingQuery.getLandlordPhone() != null && !applyChargingQuery.getLandlordPhone().equals(""), TApplyChargingPile::getLandlordPhone, applyChargingQuery.getLandlordPhone())
                .page(Page.of(applyChargingQuery.getPageCurr(), applyChargingQuery.getPageSize()));
        return AjaxResult.ok(page);
    }
@@ -87,7 +91,7 @@
    @ApiOperation(tags = {"后台-申请表单-申请建桩"},value = "导出")
    @PutMapping(value = "/export")
    public R export(HttpServletResponse response) {
    public R export(String landlordPhone,HttpServletResponse response) {
        try {
        response.setCharacterEncoding(Constants.UTF8);
        response.setContentType("application/vnd.ms-excel");
@@ -98,21 +102,87 @@
            return R.fail("excel导出失败!");
        }
        try {
            List<TApplyChargingPile> list = applyChargingPileService.lambdaQuery().last("limit 1").list();
            List<TApplyChargingPile> list = applyChargingPileService.lambdaQuery().like(landlordPhone != null && !landlordPhone.equals(""), TApplyChargingPile::getLandlordPhone, landlordPhone).list();
            List<TApplyChargingPileExportDto> exportDtos =new ArrayList<>();
            for (TApplyChargingPile tApplyChargingPile : list) {
                TApplyChargingPileExportDto applyChargingPileExportDto = new TApplyChargingPileExportDto();
                BeanUtils.copyProperties(tApplyChargingPile,applyChargingPileExportDto);
                applyChargingPileExportDto.setLandlordFrontIdCard(new URL(tApplyChargingPile.getLandlordFrontIdCard()));
                applyChargingPileExportDto.setLandlordBackIdCard(new URL(tApplyChargingPile.getLandlordBackIdCard()));
                applyChargingPileExportDto.setAgentBackIdCard(new URL(tApplyChargingPile.getAgentBackIdCard()));
                applyChargingPileExportDto.setAgentFrontIdCard(new URL(tApplyChargingPile.getAgentFrontIdCard()));
                List<URL> urls = new ArrayList<>();
                urls.add(new URL("https://img-blog.csdnimg.cn/direct/c11088e1790049a5b84a0fda21a271b1.png"));
                urls.add(new URL("https://img-blog.csdnimg.cn/direct/c11088e1790049a5b84a0fda21a271b1.png"));
                urls.add(new URL("https://img-blog.csdnimg.cn/direct/c11088e1790049a5b84a0fda21a271b1.png"));
                        applyChargingPileExportDto.setUrls(urls);
                JSONArray p1 = JSON.parseArray(tApplyChargingPile.getLandlordFrontIdCard());
                if (!p1.isEmpty()) {
                    applyChargingPileExportDto.setLandlordFrontIdCard(new URL((String) p1.get(0)));
                }
                JSONArray p2 = JSON.parseArray(tApplyChargingPile.getLandlordBackIdCard());
                if (!p2.isEmpty()){
                applyChargingPileExportDto.setLandlordBackIdCard(new URL((String)p2.get(0)));}
                JSONArray p3 = JSON.parseArray(tApplyChargingPile.getAgentBackIdCard());
                if (!p3.isEmpty())
                applyChargingPileExportDto.setAgentBackIdCard(new URL((String)p3.get(0)));
                JSONArray p4 = JSON.parseArray(tApplyChargingPile.getAgentFrontIdCard());
                if (!p4.isEmpty()) {
                    applyChargingPileExportDto.setAgentFrontIdCard(new URL((String)p4.get(0)));
                }
                if (tApplyChargingPile.getChargingPileUser()==1){
                    JSONArray pics1 = JSON.parseArray(tApplyChargingPile.getFixedParkingPropertyRights());
                    if (!pics1.isEmpty()) {
                        applyChargingPileExportDto.setPics1(new URL((String)pics1.get(0)));
                    }
                    JSONArray pics2 = JSON.parseArray(tApplyChargingPile.getConstructionCertificate());
                    if (!pics1.isEmpty()) {
                        applyChargingPileExportDto.setPics2(new URL((String)pics2.get(0)));
                    }
                }else {
                    JSONArray pics1 = JSON.parseArray(tApplyChargingPile.getTitleCertificate());
                    if (!pics1.isEmpty()) {
                        applyChargingPileExportDto.setPics1(new URL((String)pics1.get(0)));
                    }
                    JSONArray pics2 = JSON.parseArray(tApplyChargingPile.getBusinessLicense());
                    if (!pics1.isEmpty()) {
                        applyChargingPileExportDto.setPics2(new URL((String)pics2.get(0)));
                    }
                }
                JSONArray objects1 = JSON.parseArray(tApplyChargingPile.getFurtherInformation());
                for (int i = 0; i < objects1.size(); i++) {
                    JSONObject jsonObject = JSON.parseObject(objects1.get(i).toString());
                    System.err.println("==================="+jsonObject.get("url"));
                    boolean isImage = isImageUrl(jsonObject);
                    if (!isImage){
                        continue;
                    }
                    System.err.println("Is image: " + isImage);
                    if (i==0){
                        applyChargingPileExportDto.setUrl1(new URL((String)jsonObject.get("url")));
                    }else if (i==1){
                        applyChargingPileExportDto.setUrl2(new URL((String)jsonObject.get("url")));
                    }else if (i==2){
                        applyChargingPileExportDto.setUrl3(new URL((String)jsonObject.get("url")));
                    }else if (i==3){
                        applyChargingPileExportDto.setUrl4(new URL((String)jsonObject.get("url")));
                    }else if (i==4){
                        applyChargingPileExportDto.setUrl5(new URL((String)jsonObject.get("url")));
                    }else if (i==5){
                        applyChargingPileExportDto.setUrl6(new URL((String)jsonObject.get("url")));
                    }
                }
                if (tApplyChargingPile.getLandlordHandling()==1){
                    applyChargingPileExportDto.setIs1("是");
                }else {
                    applyChargingPileExportDto.setIs1("否");
                }
                if (tApplyChargingPile.getChargingPileUser()==1){
                    applyChargingPileExportDto.setIs2("是");
                }else {
                    applyChargingPileExportDto.setIs2("否");
                }
                if (tApplyChargingPile.getChargingPile()==1){
                    applyChargingPileExportDto.setIs3("是");
                }else {
                    applyChargingPileExportDto.setIs3("否");
                }
                exportDtos.add(applyChargingPileExportDto);
            }
@@ -134,6 +204,14 @@
        return R.ok();
    }
    public static boolean isImageUrl(JSONObject jsonObject) {
        String url = jsonObject.getString("url");
        Pattern pattern = Pattern.compile(
                "^.*\\.(?i)(jpg|jpeg|png|gif|bmp|webp)$"
        );
        return pattern.matcher(url).matches();
    }
    @ApiOperation(tags = {"后台-申请表单-申请建桩"},value = "详情")
    @PostMapping(value = "/detail/{id}")
    public AjaxResult<TApplyChargingPile> detail(@PathVariable Integer id) {
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/dto/TApplyChargingPileExportDto.java
@@ -109,5 +109,15 @@
    @ApiModelProperty(value = "备注")
    @TableField("remark")
    private String remark;
    private List<URL> urls;
    private URL pics1;
    private URL pics2;
    private URL url1;
    private URL url2;
    private URL url3;
    private URL url4;
    private URL url5;
    private URL url6;
    private String is1;
    private String is2;
    private String is3;
}
ruoyi-service/ruoyi-chargingPile/src/main/resources/template/充电桩申请记录.xlsx
Binary files differ
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java
@@ -183,7 +183,7 @@
        tExchangeOrder.setCreateTime(LocalDateTime.now());
        tExchangeOrder.setDelFlag(false);
        exchangeOrderService.save(tExchangeOrder);
        return R.ok();
        return R.ok(tExchangeOrder.getId());
    }
    
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TShoppingOrderController.java
@@ -1,6 +1,11 @@
package com.ruoyi.order.controller;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.dto.ExchangeDto;
import com.ruoyi.common.core.utils.OrderCodeUtil;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.order.api.model.TExchangeOrder;
import com.ruoyi.order.api.model.TShoppingOrder;
@@ -82,5 +87,48 @@
        List<MyShoppingOrderList> list = shoppingOrderService.getNoInvoicedOrder(query);
        return AjaxResult.success(list);
    }
//    @PostMapping("/create")
//    public R<Long> shopCreate(@RequestBody ExchangeDto exchangeDto){
//        TShoppingOrder shoppingOrder = new TShoppingOrder();
//        shoppingOrder.setCode(OrderCodeUtil.getOrderCode("GW"));
//        shoppingOrder.setAppUserId(exchangeDto.getUserId());
//        shoppingOrder.setOrderType(exchangeDto.getGoodType());
//        if (exchangeDto.getGoodType()==1) {
//            shoppingOrder.setGoodsId(exchangeDto.getGoodId());
//        }else {
//            shoppingOrder.setCouponId(exchangeDto.getGoodId());
//        }
//        shoppingOrder.setPurchaseQuantity(exchangeDto.getNum());
//        shoppingOrder.setAppUserAddressId(Long.valueOf(exchangeDto.getAddressId()));
//        shoppingOrder.setOrderAmount(new BigDecimal("0"));
//        shoppingOrder.setAppCouponId(0L);
//        shoppingOrder.setCouponDiscountAmount(new BigDecimal("0"));
//        shoppingOrder.setVipDiscount(new BigDecimal("0"));
//        shoppingOrder.setVipDiscountAmount(new BigDecimal("0"));
//        shoppingOrder.setPaymentAmount(new BigDecimal("0"));
//        shoppingOrder.setPaymentStatus(0);
//        shoppingOrder.setPaymentType(0);
//        shoppingOrder.setSerialNumber("");
//        shoppingOrder.setRemark("");
//        shoppingOrder.setStatus(0);
//        shoppingOrder.setExpressCompany("");
//        shoppingOrder.setExpressNumber("");
//        shoppingOrder.setConsignerId(0);
//        shoppingOrder.setConsignerTime(LocalDateTime.now());
//        shoppingOrder.setReceivingTime(LocalDateTime.now());
//        shoppingOrder.setCancellationTime(LocalDateTime.now());
//        shoppingOrder.setCancellationId(0);
//        shoppingOrder.setRefundCode("");
//        shoppingOrder.setRefundAmount(new BigDecimal("0"));
//        shoppingOrder.setRefundStatus(0);
//        shoppingOrder.setRefundSerialNumber("");
//        shoppingOrder.setRefundTime(LocalDateTime.now());
//        shoppingOrder.setCreateTime(LocalDateTime.now());
//        shoppingOrder.setDelFlag(false);
//
//
//
//    }
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TGoodsController.java
@@ -7,6 +7,8 @@
import com.ruoyi.account.api.feignClient.AppUserClient;
import com.ruoyi.account.api.model.TAppUser;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.dto.AppGoodQuery;
import com.ruoyi.common.core.dto.PointChangeDto;
import com.ruoyi.common.core.web.domain.AjaxResult;
import com.ruoyi.common.core.web.page.BasePage;
import com.ruoyi.common.core.web.page.PageInfo;
@@ -100,11 +102,11 @@
    @ApiOperation(tags = {"小程序-兑换商城"},value = "商品列表分页查询")
    @PostMapping(value = "/app/pageList")
    public AjaxResult<PageInfo<TGoods>> apppageList(BasePage basePage) {
        return AjaxResult.ok(goodsService.pageList1(basePage));
    public AjaxResult<PageInfo<TGoods>> apppageList(@RequestBody AppGoodQuery appGoodQuery) {
        return AjaxResult.ok(goodsService.pageList1(appGoodQuery));
    }
    @ApiOperation(tags = {"小程序-兑换商城"},value = "兑换商品")
    @ApiOperation(tags = {"小程序-兑换商城"},value = "积分兑换商品")
    @PostMapping(value = "/app/shop")
    public AjaxResult<PageInfo<TGoods>> shop(@RequestBody ExchangeDto exchangeDto) {
        //检查当前用户积分是否够
@@ -135,7 +137,7 @@
        }
        exchangeDto.setPoint(point);
        //生成积分兑换成功的订单
        orderClient.exchangeCreate(exchangeDto);
        R<Long> longR = orderClient.exchangeCreate(exchangeDto);
        if (exchangeDto.getGoodType()==2) {
            //如果是优惠卷,赠送优惠卷给用户
            GrantCouponDto grantCouponDto = new GrantCouponDto();
@@ -146,14 +148,31 @@
            appCouponClient.grantCoupon(grantCouponDto);
        }
        //生成消耗积分的记录
        PointChangeDto pointChangeDto = new PointChangeDto();
        pointChangeDto.setUserId(userId);
        pointChangeDto.setPoints(point);
        pointChangeDto.setRemark(longR.getData().toString());
        pointChangeDto.setType(6);
        appUserClient.change(pointChangeDto);
        return AjaxResult.success();
    }
//    @ApiOperation(tags = {"小程序-兑换商城"},value = "支付商品")
//    @PostMapping(value = "/app/pay")
//    public AjaxResult<PageInfo<TGoods>> pay(@RequestBody ExchangeDto exchangeDto) {
//
//        //创建订单
//
//        //计算价格
//
//        //调起支付
//
//
//
//    }
    
    /**
     * 根据id获取商品信息
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/mapper/TGoodsMapper.java
@@ -1,6 +1,7 @@
package com.ruoyi.other.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.common.core.dto.AppGoodQuery;
import com.ruoyi.common.core.web.page.PageInfo;
import com.ruoyi.other.api.domain.TActivity;
import com.ruoyi.other.api.domain.TGoods;
@@ -20,6 +21,6 @@
public interface TGoodsMapper extends BaseMapper<TGoods> {
    List<TGoods> pageList(@Param("pageInfo")PageInfo<TGoods> pageInfo, @Param("req") GoodsDTO dto);
    List<TGoods> pageList1(@Param("pageInfo")PageInfo<TGoods> pageInfo);
    List<TGoods> pageList1(@Param("pageInfo")PageInfo<TGoods> pageInfo, @Param("appGoodQuery")AppGoodQuery appGoodQuery);
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/TGoodsService.java
@@ -1,6 +1,7 @@
package com.ruoyi.other.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.common.core.dto.AppGoodQuery;
import com.ruoyi.common.core.web.page.BasePage;
import com.ruoyi.common.core.web.page.PageInfo;
import com.ruoyi.other.api.domain.TGoods;
@@ -17,6 +18,6 @@
public interface TGoodsService extends IService<TGoods> {
    PageInfo<TGoods> pageList(GoodsDTO dto);
    PageInfo<TGoods> pageList1(BasePage basePage);
    PageInfo<TGoods> pageList1(AppGoodQuery appGoodQuery);
}
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/TGoodsServiceImpl.java
@@ -1,5 +1,6 @@
package com.ruoyi.other.service.impl;
import com.ruoyi.common.core.dto.AppGoodQuery;
import com.ruoyi.common.core.web.page.BasePage;
import com.ruoyi.common.core.web.page.PageInfo;
import com.ruoyi.order.api.feignClient.OrderClient;
@@ -57,14 +58,14 @@
        return pageInfo;
    }
    @Override
    public PageInfo<TGoods> pageList1(BasePage basePage) {
    public PageInfo<TGoods> pageList1(AppGoodQuery basePage) {
        GoodsDTO dto = new GoodsDTO();
        dto.setType(2);
        dto.setStatus(1);
        dto.setPageCurr(basePage.getPageCurr());
        dto.setPageSize(basePage.getPageSize());
        PageInfo<TGoods> pageInfo = new PageInfo<>(dto.getPageCurr(),dto.getPageSize());
        List<TGoods> list = this.baseMapper.pageList1(pageInfo);
        List<TGoods> list = this.baseMapper.pageList1(pageInfo,basePage);
        StringBuilder stringBuilder = new StringBuilder();
        for (TGoods temp : list) {
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TGoodsMapper.xml
@@ -51,13 +51,24 @@
    </select>
    <select id="pageList1" resultType="com.ruoyi.other.api.domain.TGoods">
        select * from t_goods
        <where>
            AND del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()}
        </where>
        SELECT
            id,name,redeem_points,inventory
        FROM
            t_goods
        WHERE `status` = 1 and del_flag = 0 and type = #{appGoodQuery.type}
        UNION ALL
        SELECT
            id,name,redeem_points,inventory_quantity as inventory
        FROM
            t_coupon
        WHERE `status`= 1 and del_flag = 0 and type = #{appGoodQuery.type}
        ORDER BY
        CASE WHEN `inventory` = 0 THEN 0 ELSE 1 END DESC,
        `redeem_points` ASC;
            CASE
                WHEN `inventory` = 0 THEN
                    0 ELSE 1
                END DESC,
            `redeem_points` ASC;
    </select>
</mapper>
ruoyi-service/ruoyi-payment/src/main/java/com/ruoyi/payment/wx/controller/WxPayController.java
@@ -87,6 +87,16 @@
    public R<Map<String, Object>> payNotify(HttpServletRequest request) throws Exception {
        try {
            Map<String, Object> params = wxV3Pay.verifyNotify(request, new TypeReference<Map<String, Object>>() {});
            String outRefundNo = (String) params.get("out_refund_no");
            String substring = outRefundNo.substring(0, 2);
            switch (substring){
                //购物订单
                case "GW":
                    //更改订单状态
                    //如果是优惠卷赠送优惠卷
                    break;
            }
            log.info("支付回调:{}", params);
            return R.ok(params);
        } catch (Exception e) {