luodangjia
2024-08-22 93c64d57fa870193d4971509d0a20c3be8779565
Merge remote-tracking branch 'origin/master'
26个文件已修改
201 ■■■■■ 已修改文件
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUserSign.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/SiteFallbackFactory.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/feignClient/SiteClient.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/TChargingOrder.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/query/ChargingOrderQuery.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/vo/ChargingOrderVO.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/vo/TActivityVO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/TGoods.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/TIntegralRule.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/SysUserFallbackFactory.java 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-auth/src/main/java/com/ruoyi/auth/controller/TokenController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java 26 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AliLoginController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WxLoginController.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/TChargingOrderMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/pom.xml 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TRoleSiteController.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TGoodsMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-account/src/main/java/com/ruoyi/account/api/model/TAppUserSign.java
@@ -25,7 +25,7 @@
@EqualsAndHashCode(callSuper = false)
@TableName("t_app_user_sign")
@ApiModel(value="TAppUserSign对象", description="")
public class TAppUserSign extends BasePojo {
public class TAppUserSign implements Serializable {
    private static final long serialVersionUID = 1L;
ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/factory/SiteFallbackFactory.java
@@ -29,6 +29,11 @@
            public R<List<Site>> getSiteByIds(List<Integer> ids) {
                return R.fail("根据id集合获取站点数据调用失败:" + throwable.getMessage());
            }
            @Override
            public R<List<Site>> getSiteAll() {
                return R.fail("获取所有站点调用失败:" + throwable.getMessage());
            }
        };
    }
}
ruoyi-api/ruoyi-api-chargingPile/src/main/java/com/ruoyi/chargingPile/api/feignClient/SiteClient.java
@@ -24,4 +24,11 @@
     */
    @PostMapping("/site/getSiteByIds")
    R<List<Site>> getSiteByIds(@RequestBody List<Integer> ids);
    /**
     * 获取所有站点
     * @return
     */
    @PostMapping("/site/getSiteAll")
    R<List<Site>> getSiteAll();
}
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/feignClient/OrderClient.java
@@ -7,9 +7,7 @@
import com.ruoyi.order.api.query.TActivityStatisticsQuery;
import com.ruoyi.order.api.vo.TActivityVO;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.*;
import java.util.List;
@@ -20,16 +18,16 @@
@FeignClient(contextId = "OrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = OrderFallbackFactory.class)
public interface OrderClient {
    @PostMapping("/t-exchange-order/getSalesCountByGoodsIds")
    R<List<Integer>> getSalesCountByGoodsId(String goodsIds);
    @GetMapping("/t-exchange-order/getSalesCountByGoodsIds/{goodsIds}")
    R<List<Integer>> getSalesCountByGoodsId(@PathVariable("goodsIds") String goodsIds);
    /**
     * 管理后台 根据t_app_coupon订单购买或者兑换优惠券的订单编号
     * @param goodsIds  订单号-商品类型
     * @return
     */
    @PostMapping("/t-exchange-order/getCodeByOrderId")
    public R<List<String>> getCodeByOrderId(String goodsIds);
    @GetMapping("/t-exchange-order/getCodeByOrderId/{goodsIds}")
    public R<List<String>> getCodeByOrderId(@PathVariable("goodsIds")String goodsIds);
    //查询已兑换的订单数
    @PostMapping("/t-exchange-order/getById")
    public R<Long> getExchangeById(@RequestParam("goodId") Integer goodId,@RequestParam("userId")  Long userId,@RequestParam("goodType") Integer goodType);
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/model/TChargingOrder.java
@@ -118,7 +118,7 @@
    @TableField("app_coupon_id")
    private Long appCouponId;
    @ApiModelProperty(value = "优惠金额")
    @ApiModelProperty(value = "优惠券抵扣金额")
    @TableField("coupon_discount_amount")
    private BigDecimal couponDiscountAmount;
@@ -130,7 +130,7 @@
    @TableField("vip_discount_amount")
    private BigDecimal vipDiscountAmount;
    @ApiModelProperty(value = "支付金额")
    @ApiModelProperty(value = "支付金额(实付)")
    @TableField("payment_amount")
    private BigDecimal paymentAmount;
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/query/ChargingOrderQuery.java
@@ -21,14 +21,16 @@
    private Integer status;
    @ApiModelProperty(value = "站点id")
    private Integer siteId;
    @ApiModelProperty(value = "充电桩ids 逗号拼接")
    private String pileIds;
    @ApiModelProperty(value = "充电枪ids 逗号拼接")
    private String gunIds;
    @ApiModelProperty(value = "充电桩id ")
    private Integer pileId;
    @ApiModelProperty(value = "充电枪id ")
    private Integer gunId;
    @ApiModelProperty(value = "开始时间2020-01-01 00:00:00 - 2021-01-01 23:59:59")
    private String startTime;
    @ApiModelProperty(value = "结束时间2020-01-01 00:00:00 - 2021-01-01 23:59:59")
    private String endTime;
    @ApiModelProperty(value = "订单来源 1明星 2快电 3新电途")
    private Integer orderSource;
    @ApiModelProperty(value = "用户ids 前端忽略")
    private List<Long> userIds;
}
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/vo/ChargingOrderVO.java
@@ -1,6 +1,7 @@
package com.ruoyi.order.api.vo;
import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.ruoyi.order.api.model.TChargingOrder;
import com.ruoyi.order.api.model.TOrderEvaluate;
import io.swagger.annotations.ApiModel;
@@ -8,15 +9,12 @@
import lombok.Data;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;
@Data
@ApiModel(value = "SiteDetailEvaluateVO对象",description = "站点详情订单评价")
public class ChargingOrderVO extends TChargingOrder {
    @ApiModelProperty(value = "订单id")
    private Long id;
    @ApiModelProperty(value = "用户id")
    private Long userId;
    @ApiModelProperty(value = "站点名称")
    private String siteName;
    @ApiModelProperty(value = "充电终端名称 桩+枪")
@@ -41,4 +39,5 @@
    private Integer count;
    @ApiModelProperty(value = "1明星充电 2快电 3新电途")
    private Integer orderSource;
}
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/api/vo/TActivityVO.java
@@ -23,5 +23,4 @@
    private BigDecimal vipActivity;
    @ApiModelProperty(value = "赠送会员")
    private BigDecimal grantVip;
}
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/TGoods.java
@@ -84,16 +84,16 @@
    private Integer underlyingSales;
    @ApiModelProperty(value = "商品描述")
    @TableField("describe")
    private String describe;
    @TableField("describes")
    private String describes;
    @ApiModelProperty(value = "商品介绍")
    @TableField("introduce")
    private String introduce;
    @ApiModelProperty(value = "商品说明")
    @TableField("explain")
    private String explain;
    @TableField("explains")
    private String explains;
    @ApiModelProperty(value = "状态(1=上架,2=下架)")
    @TableField("status")
ruoyi-api/ruoyi-api-other/src/main/java/com/ruoyi/other/api/domain/TIntegralRule.java
@@ -24,7 +24,7 @@
@EqualsAndHashCode(callSuper = false)
@TableName("t_integral_rule")
@ApiModel(value="TIntegralRule对象", description="")
public class TIntegralRule extends BasePojo {
public class TIntegralRule {
    private static final long serialVersionUID = 1L;
ruoyi-api/ruoyi-api-system/src/main/java/com/ruoyi/system/api/factory/SysUserFallbackFactory.java
ruoyi-auth/src/main/java/com/ruoyi/auth/controller/TokenController.java
@@ -58,7 +58,6 @@
        SysUser sysUser = new SysUser();
        sysUser.setUserId(userInfo.getSysUser().getUserId());
        sysUser.setLoginDate(new Date());
        sysUser.setRoleId(userInfo.getSysUser().getRoleId());
        System.out.println("修改用户登录时间" + sysUser);
        userClient.updateSysUser(sysUser);
        return R.ok(map);
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysRoleController.java
@@ -60,8 +60,7 @@
@RestController
@RequestMapping("/role")
@Api(tags = "角色模块")
public class SysRoleController extends BaseController
{
public class SysRoleController extends BaseController {
    @Resource
    private ISysRoleService roleService;
@@ -87,15 +86,12 @@
    private SiteClient siteClient;
    
    
    @ApiOperation(value = "获取角色列表", tags = {"管理后台-系统用户管理"})
    @GetMapping("/list")
    public AjaxResult list() {
        List<SysRole> list = roleService.list(new LambdaQueryWrapper<SysRole>().eq(SysRole::getDelFlag, 0).eq(SysRole::getStatus, 0));
        return AjaxResult.success(list);
    }
    
    
    @ResponseBody
@@ -121,14 +117,11 @@
    }
    
    
    @ResponseBody
    @PostMapping("/roleAdd")
    @ApiOperation(value = "添加角色", tags = {"管理后台-角色管理"})
    @GlobalTransactional(rollbackFor = Exception.class)//分布式事务
    public AjaxResult roleAdd(@Validated @RequestBody RoleAddDto dto)
    {
    public AjaxResult roleAdd(@Validated @RequestBody RoleAddDto dto) {
        SysRole role = new SysRole();
        role.setRoleName(dto.getRoleName());
        long count = roleService.count(Wrappers.lambdaQuery(SysRole.class)
@@ -202,7 +195,6 @@
    }
    @PostMapping("/roleUpdate")
    @ApiOperation(value = "编辑角色", tags = {"管理后台-角色管理"})
    @GlobalTransactional(rollbackFor = Exception.class)//分布式事务
@@ -257,7 +249,6 @@
    }
    /**
     * 删除角色
     */
@@ -270,15 +261,12 @@
    }
    
    /**
     * 查询已分配用户角色列表
     */
    @RequiresPermissions("system:role:list")
    @GetMapping("/authUser/allocatedList")
    public TableDataInfo allocatedList(SysUser user)
    {
    public TableDataInfo allocatedList(SysUser user) {
        startPage();
        List<SysUser> list = userService.selectAllocatedList(user);
        return getDataTable(list);
@@ -289,13 +277,11 @@
     */
    @RequiresPermissions("system:role:list")
    @GetMapping("/authUser/unallocatedList")
    public TableDataInfo unallocatedList(SysUser user)
    {
    public TableDataInfo unallocatedList(SysUser user) {
        startPage();
        List<SysUser> list = userService.selectUnallocatedList(user);
        return getDataTable(list);
    }
 
    /**
@@ -303,8 +289,7 @@
     */
    @RequiresPermissions("system:role:query")
    @GetMapping(value = "/deptTree/{roleId}")
    public AjaxResult deptTree(@PathVariable("roleId") Long roleId)
    {
    public AjaxResult deptTree(@PathVariable("roleId") Long roleId) {
        AjaxResult ajax = AjaxResult.success();
        ajax.put("checkedKeys", deptService.selectDeptListByRoleId(roleId));
        ajax.put("depts", deptService.selectDeptTreeList(new SysDept()));
@@ -314,6 +299,7 @@
    
    /**
     * 根据id集合获取数据
     *
     * @param ids
     * @return
     */
ruoyi-modules/ruoyi-system/src/main/java/com/ruoyi/system/controller/SysUserController.java
@@ -239,7 +239,6 @@
        if (user.getPhonenumber() != null) {
            user.setUserName(user.getPhonenumber());
        }
        user.setPassword(null);
        user.setUpdateBy(SecurityUtils.getUsername());
        user.setUpdateTime(new Date());
        userService.updateUser(user);
@@ -371,11 +370,13 @@
            sysUser.setUpdateBy(SecurityUtils.getUsername());
            sysUser.setUpdateTime(new Date());
            userService.updateUser(sysUser);
            if(null != sysUser.getRoleId()){
            userRoleService.deleteSysUserRoleByUserId(sysUser.getUserId());
            SysUserRole sysUserRole = new SysUserRole();
            sysUserRole.setRoleId(sysUser.getRoleId());
            sysUserRole.setUserId(sysUser.getUserId());
            userRoleService.insertSysUserRole(sysUserRole);
            }
            return R.ok(true);
        } catch (Exception e) {
            e.printStackTrace();
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
@@ -89,7 +89,7 @@
         where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
    </select>
    <select id="isExitUpdate" resultType="com.ruoyi.system.api.domain.SysRole">
        select role_name romeName from sys_role where role_name=#{roleName} and companyId =#{companyId} and  role_id != #{roleId}
        select role_name romeName from sys_role where role_name=#{roleName} and  role_id != #{roleId}
    </select>
    <insert id="insertRole" parameterType="com.ruoyi.system.api.domain.SysRole" useGeneratedKeys="true" keyProperty="roleId">
@@ -97,33 +97,19 @@
             <if test="roleId != null and roleId != 0">role_id,</if>
             <if test="roleName != null and roleName != ''">role_name,</if>
             <if test="roleKey != null and roleKey != ''">role_key,</if>
             <if test="roleSort != null">role_sort,</if>
             <if test="dataScope != null and dataScope != ''">data_scope,</if>
             <if test="menuCheckStrictly != null">menu_check_strictly,</if>
             <if test="deptCheckStrictly != null">dept_check_strictly,</if>
             <if test="status != null and status != ''">status,</if>
             <if test="remark != null and remark != ''">remark,</if>
             <if test="createBy != null and createBy != ''">create_by,</if>
             <if test="carDataAuth != null and carDataAuth != ''">carDataAuth,</if>
             <if test="carTrainOperAuth != null and carTrainOperAuth != ''">carTrainOperAuth,</if>
             <if test="contractDataAuth != null and contractDataAuth != ''">contractDataAuth,</if>
             <if test="companyId != null and companyId != ''">companyId,</if>
             create_time
         )values(
             <if test="roleId != null and roleId != 0">#{roleId},</if>
             <if test="roleName != null and roleName != ''">#{roleName},</if>
             <if test="roleKey != null and roleKey != ''">#{roleKey},</if>
             <if test="roleSort != null">#{roleSort},</if>
             <if test="dataScope != null and dataScope != ''">#{dataScope},</if>
             <if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
             <if test="deptCheckStrictly != null">#{deptCheckStrictly},</if>
             <if test="status != null and status != ''">#{status},</if>
             <if test="remark != null and remark != ''">#{remark},</if>
             <if test="createBy != null and createBy != ''">#{createBy},</if>
             <if test="carDataAuth != null and carDataAuth != ''">#{carDataAuth},</if>
             <if test="carTrainOperAuth != null and carTrainOperAuth != ''">#{carTrainOperAuth},</if>
             <if test="contractDataAuth != null and contractDataAuth != ''">#{contractDataAuth},</if>
             <if test="companyId != null and companyId != ''">#{companyId},</if>
             sysdate()
         )
    </insert>
@@ -133,16 +119,10 @@
         <set>
             <if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
             <if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
             <if test="roleSort != null">role_sort = #{roleSort},</if>
             <if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
             <if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if>
             <if test="deptCheckStrictly != null">dept_check_strictly = #{deptCheckStrictly},</if>
             <if test="status != null and status != ''">status = #{status},</if>
             <if test="remark != null">remark = #{remark},</if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
             <if test="carDataAuth != null and carDataAuth != ''">carDataAuth = #{carDataAuth},</if>
             <if test="carTrainOperAuth != null and carTrainOperAuth != ''">carTrainOperAuth = #{carTrainOperAuth},</if>
             <if test="contractDataAuth != null and contractDataAuth != ''">contractDataAuth = #{contractDataAuth},</if>
             update_time = sysdate()
         </set>
         where role_id = #{roleId}
ruoyi-modules/ruoyi-system/src/main/resources/mapper/system/SysUserMapper.xml
@@ -224,6 +224,7 @@
             <if test="loginDate != null">login_date = #{loginDate},</if>
             <if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
             <if test="remark != null">remark = #{remark},</if>
            <if test="forbiddenRemark != null">forbidden_remark = #{forbiddenRemark},</if>
             update_time = sysdate()
         </set>
         where user_id = #{userId}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AliLoginController.java
@@ -59,7 +59,7 @@
            // 获取用户信息
//            AlipayUserInfoShareResponse userInfo = new AliAppletTools(aliProperties).getUserInfo(response.getAccessToken());
            if(StringUtils.isEmpty(appletUserLogin.getToken())){
                return AjaxResult.success();
                return AjaxResult.success("已拒绝授权");
            }
            // 获取用户手机号
            String phoneNumber = new AliAppletTools(aliProperties).getPhoneNumber(appletUserLogin.getToken());
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/TAppUserController.java
@@ -462,9 +462,9 @@
    }
    @ApiOperation(value = "个人中心信息", tags = {"小程序-个人中心"})
    @PostMapping(value = "/user/info")
    @GetMapping(value = "/user/info")
    public R<AppUserInfoDto> info() {
        Long userId = 1L;
        Long userId = tokenService.getLoginUserApplet().getUserId();
        TAppUser byId = appUserService.getById(userId);
        AppUserInfoDto appUserInfoDto = new AppUserInfoDto();
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/WxLoginController.java
@@ -61,7 +61,7 @@
//            WxUtils.verifySignature(data.getRawData(), sessionKey, data.getSignature());
//        }
        if(StringUtils.isEmpty(data.getEncryptedData()) || StringUtils.isEmpty(data.getIv())){
            return AjaxResult.success();
            return AjaxResult.success("已拒绝授权");
        }
        AppletUserDecodeData appletUserDecodeData = WxUtils.encryptedData(data.getEncryptedData(), sessionKey,  data.getIv());
        appletUserDecodeData.setOpenId(openid);
ruoyi-service/ruoyi-chargingPile/src/main/java/com/ruoyi/chargingPile/controller/SiteController.java
@@ -243,4 +243,16 @@
        List<Site> sites = siteService.listByIds(ids);
        return R.ok(sites);
    }
    /**
     * 获取所有站点数据
     * @return
     */
    @ResponseBody
    @PostMapping("/getSiteAll")
    public R<List<Site>> getSiteAll(){
        List<Site> list = siteService.list(new LambdaQueryWrapper<Site>().eq(Site::getDelFlag, 0));
        return R.ok(list);
    }
}
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TExchangeOrderController.java
@@ -83,8 +83,8 @@
     * @param goodsIds  订单号-商品类型
     * @return
     */
    @PostMapping("/getSalesCountByGoodsIds")
    public R<List<Integer>> getSalesCountByGoodsId(String goodsIds){
    @GetMapping("/getSalesCountByGoodsIds/{goodsIds}")
    public R<List<Integer>> getSalesCountByGoodsId(@PathVariable("goodsIds")String goodsIds){
        String[] split = goodsIds.split("-");
        // 取出最后一位字符 类型1查询现金购买 类型2查询积分兑换
        String s = split[split.length - 1];
@@ -117,8 +117,8 @@
     * @param goodsIds  订单号-商品类型
     * @return
     */
    @PostMapping("/getCodeByOrderId")
    public R<List<String>> getCodeByOrderId(String goodsIds){
    @GetMapping("/getCodeByOrderId/{goodsIds}")
    public R<List<String>> getCodeByOrderId(@PathVariable("goodsIds") String goodsIds){
        String[] split = goodsIds.split("-");
        List<String> strings = new ArrayList<>();
        for (String s : split) {
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/mapper/TChargingOrderMapper.java
@@ -46,6 +46,6 @@
    List<TChargingOrder> getNoInvoicedOrder(@Param("appUserId") Long appUserId, @Param("month") String month,
                                            @Param("pageCurr") Integer pageCurr, @Param("pageSize") Integer pageSize);
    List<ChargingOrderVO> chargingOrder(@Param("pageInfo") PageInfo<ChargingOrderVO> pageInfo, ChargingOrderQuery dto, String startTime1, String startTime2, String endTime1, String endTime11);
    List<ChargingOrderVO> chargingOrder(@Param("pageInfo") PageInfo<ChargingOrderVO> pageInfo, @Param("req") ChargingOrderQuery dto, @Param("startTime1")String startTime1, @Param("startTime2")String startTime2,@Param("endTime1") String endTime1,@Param("endTime2") String endTime11);
}
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/TChargingOrderMapper.xml
@@ -55,9 +55,6 @@
            limit #{pageCurr}, #{pageSize}
        </if>
    </select>
    <select id="getNoInvoicedOrder" resultMap="BaseResultMap">
        select * from t_charging_order where del_flag = 0 and app_user_id = #{appUserId}
        <if test="null != month and '' != month">
@@ -69,4 +66,40 @@
            limit #{pageCurr}, #{pageSize}
        </if>
    </select>
    <select id="chargingOrder" resultType="com.ruoyi.order.api.vo.ChargingOrderVO">
        select t1.*
        from t_charging_order t1
        where 1=1
        <if test="null != req.code and req.code!=''">
            and t1.code  LIKE CONCAT('%',#{req.code},'%')
        </if>
        <if test="null != req.userIds and req.userIds.size()>0" >
            and t1.app_user_id in
            <foreach collection="req.userIds" item="item" index="index" separator="," open="(" close=")">
                #{item}
            </foreach>
        </if>
        <if test="req.orderType != null ">
            and t1.order_type = #{req.orderType}
        </if>
        <if test="req.status != null ">
            and t1.status = #{req.status}
        </if>
        <if test="req.siteId != null ">
            and t1.site_id = #{req.siteId}
        </if>
        <if test="req.pileId != null ">
            and t1.charging_pile_id = #{req.pileId}
        </if>
        <if test="req.gunId != null ">
            and t1.charging_gun_id = #{req.gunId}
        </if>
        <if test="startTime1 != null and startTime1!=''">
            and (t1.start_time between #{startTime1} and #{startTime2}
        </if>
        <if test="endTime1 != null and endTime1!=''">
            and (t1.end_time between #{endTime1} and #{endTime2}
        </if>
    </select>
</mapper>
ruoyi-service/ruoyi-other/pom.xml
@@ -92,6 +92,10 @@
            <groupId>com.ruoyi</groupId>
            <artifactId>ruoyi-common-swagger</artifactId>
        </dependency>
        <dependency>
            <groupId>com.ruoyi</groupId>
            <artifactId>ruoyi-api-chargingPile</artifactId>
        </dependency>
        <!-- 引入Druid依赖,阿里巴巴所提供的数据源 -->
        <dependency>
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/controller/TRoleSiteController.java
@@ -2,6 +2,8 @@
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.ruoyi.chargingPile.api.feignClient.SiteClient;
import com.ruoyi.chargingPile.api.model.Site;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.other.api.domain.TRoleSite;
import com.ruoyi.other.service.TRoleSiteService;
@@ -26,6 +28,11 @@
    @Resource
    private TRoleSiteService roleSiteService;
    
    @Resource
    private SiteClient siteClient;
    /**
     * 查询角色站点数据
     * @param roleId
@@ -35,6 +42,14 @@
    @PostMapping("/getSiteIds/{roleId}")
    public R<List<Integer>> getSiteIds(@PathVariable Long roleId){
        List<TRoleSite> list = roleSiteService.list(new LambdaQueryWrapper<TRoleSite>().eq(TRoleSite::getRoleId, roleId));
        if(list.size() == 1){
            Integer siteId = list.get(0).getSiteId();
            if(0 == siteId){
                List<Site> data = siteClient.getSiteAll().getData();
                List<Integer> collect = data.stream().map(Site::getId).collect(Collectors.toList());
                return R.ok(collect);
            }
        }
        List<Integer> collect = list.stream().map(TRoleSite::getSiteId).collect(Collectors.toList());
        return R.ok(collect);
    }
ruoyi-service/ruoyi-other/src/main/resources/mapper/other/TGoodsMapper.xml
@@ -42,7 +42,7 @@
            <if test="req.status != null">
                AND  status = #{req.status}
            </if>
            <if test="req.otherState != null and req.otherState = 2">
            <if test="req.otherState != null and req.otherState == 2">
                AND  inventory = 0
            </if>
            AND del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()}