huliguo
6 天以前 3348eda2c33469e9935ae6afcf83ea5c52cea906
修改bug-初验阶段
15个文件已修改
68 ■■■■ 已修改文件
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserPointMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserPointService.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserApplyForAdmissionServiceImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserPointServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointDetailVO.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointExcel.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointStatisticsPageVO.java 3 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/resources/mapper/account/UserPointMapper.xml 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ChargeOrderServiceImpl.java 5 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/ChargeOrderMapper.xml 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-api/ruoyi-api-order/src/main/java/com/ruoyi/order/vo/OrderDetailVO.java
@@ -45,6 +45,9 @@
    @ApiModelProperty(value = "门店地址")
    private String shopAddress;
    @ApiModelProperty(value = "门店地址")
    private String detailAddress;
    @ApiModelProperty(value = "经度")
    private String longitude;
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/UserPointController.java
@@ -210,10 +210,11 @@
    @GetMapping("/getUserPontDetailPageList")
    @ApiOperation(value = "用户积分详情", tags = "管理后台-财务统计-用户积分统计")
    public R<PageInfo<UserPointDetailVO>> getUserPontDetailPageList(@RequestParam(value = "types",required = false) Collection<Integer> types,
                                                                               @RequestParam(value = "objectIdStr",required = false) String objectIdStr,
                                                                               @RequestParam(value = "id") Long id,
                                                                               @ApiParam("当前页")@RequestParam("pageCurr") Integer pageCurr,
                                                                               @ApiParam("分页大小")@RequestParam("pageSize") Integer pageSize) {
        PageInfo<UserPointDetailVO> pageInfo=userPointService.getUserPontDetailPageList(types,id,pageCurr,pageSize);
        PageInfo<UserPointDetailVO> pageInfo=userPointService.getUserPontDetailPageList(types, objectIdStr,id,pageCurr,pageSize);
        return R.ok(pageInfo);
    }
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/mapper/UserPointMapper.java
@@ -43,7 +43,7 @@
                                               @Param("endTime") LocalDateTime endTime, @Param("type") Integer type);
    List<UserPointDetailVO> getUserPontDetailPageList(PageInfo<UserPointDetailVO> pageInfo, @Param("userId") Long userId, @Param("types")Collection<Integer> types);
    List<UserPointDetailVO> getUserPontDetailPageList(PageInfo<UserPointDetailVO> pageInfo,@Param("objectIdStr") String objectIdStr, @Param("userId") Long userId, @Param("types")Collection<Integer> types);
    Integer selectRechargeAndUse(@Param("name")String name,@Param("phone")  String phone, @Param("beginTime")LocalDateTime beginTime, @Param("endTime")LocalDateTime endTime,@Param("type")Integer type);
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/UserPointService.java
@@ -40,7 +40,7 @@
    IPage<UserPoint> getUserPointPage(Page<UserPoint> page, UserPoint userPoint);
    PageInfo<UserPointDetailVO> getUserPontDetailPageList(Collection<Integer> types, Long id, Integer pageCurr, Integer pageSize);
    PageInfo<UserPointDetailVO> getUserPontDetailPageList(Collection<Integer> types,String objectIdStr, Long id, Integer pageCurr, Integer pageSize);
    Integer selectRechargeAndUse(String name, String phone, LocalDateTime beginTime, LocalDateTime endTime,Integer type);
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/AppUserServiceImpl.java
@@ -134,6 +134,7 @@
            appUser.setWxOpenid(openid);
            appUser.setStatus(1);
            appUser.setDelFlag(false);
            appUser.setCreateTime(LocalDateTime.now());
            this.save(appUser);
        }
        //账户被冻结,给出提示
@@ -303,7 +304,7 @@
        if(null != appUser1 && StringUtils.isNotEmpty(appUser1.getWxOpenid())){
            return R.fail("手机号已注册,请直接登录!");
        }
        if(null != appUser1 && appUser1.getStatus() == 2){
        if(null != appUser1 && appUser1.getStatus() == 1){
            return R.fail("手机号已注册,请直接登录!");
        }
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserApplyForAdmissionServiceImpl.java
@@ -131,6 +131,7 @@
        //审核通过
        apply.setStatus(1);
        apply.setUpdateTime(LocalDateTime.now());
        apply.setRemark(applyReviewDTO.getRemark());
        this.updateById(apply);
        //先加入商店
@@ -155,7 +156,7 @@
        Phone phone = new Phone();
        phone.setType(2);//门店
        phone.setPhoneOne(apply.getServiceTel());
        phone.setShopId(shop.getId());
        phone.setShopId(shopId);
        R phoneR = phoneClient.insert(phone);
        if (phoneR.getCode()!=200){
            throw new RuntimeException("添加店铺客服电话失败");
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/UserPointServiceImpl.java
@@ -264,9 +264,9 @@
    }
    @Override
    public PageInfo<UserPointDetailVO> getUserPontDetailPageList(Collection<Integer> types, Long id, Integer pageCurr, Integer pageSize) {
    public PageInfo<UserPointDetailVO> getUserPontDetailPageList(Collection<Integer> types,String objectIdStr, Long id, Integer pageCurr, Integer pageSize) {
        PageInfo<UserPointDetailVO> pageInfo = new PageInfo<>(pageCurr, pageSize);
        List<UserPointDetailVO> list =baseMapper.getUserPontDetailPageList(pageInfo,id,types);
        List<UserPointDetailVO> list =baseMapper.getUserPontDetailPageList(pageInfo,objectIdStr,id,types);
        pageInfo.setRecords(list);
        return pageInfo;
    }
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointDetailVO.java
@@ -35,4 +35,6 @@
    private Integer historicalPoint;
    
    private Integer balance;
    private String objectIdStr;
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointExcel.java
@@ -18,9 +18,12 @@
    private Integer variablePoint;
    @Excel(name = "订单编号")
    private Long objectId;
    @Excel(name = "订单编号")
    private String objectIdStr;
    @Excel(name = "变更时间")
    private String createTime;
}
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/vo/UserPointStatisticsPageVO.java
@@ -17,4 +17,7 @@
    private Long objectId;
    @ApiModelProperty(value = "变动时间")
    private String createTime;
    @ApiModelProperty("订单编号")
    private String objectIdStr;
}
ruoyi-service/ruoyi-account/src/main/resources/mapper/account/UserPointMapper.xml
@@ -82,6 +82,11 @@
            variable_point,
            DATE_FORMAT(create_time, '%Y-%m-%d %H:%i:%s') as createTime,
            object_id as objectId,
        CASE
        WHEN type = 17 THEN extention  -- 当 type=17 时取 extention
        ELSE CAST(object_id AS CHAR)     -- 否则取 object_id 的字符串形式
        END AS objectIdStr,
        CASE WHEN (balance - historical_point) > 0 THEN 1 ELSE 2 END AS flag
        from t_user_point where app_user_id = #{userId}
        <if test="types != null and types.size>0">
@@ -89,6 +94,13 @@
            <foreach collection="types" item="type" open="(" separator="," close=")">
                #{type}
            </foreach>
        </if>
        <if test="objectIdStr != null and objectIdStr != ''">
            and (
                (type = 17 AND extention LIKE CONCAT('%', #{objectIdStr}, '%'))
            OR
                (type != 17 AND CAST(object_id AS CHAR) LIKE CONCAT('%', #{objectIdStr}, '%'))
                )
        </if>
    </select>
    <select id="selectRechargeAndUse" resultType="java.lang.Integer">
@@ -118,7 +130,11 @@
        tp.type,
        tp.variable_point,
        tp.object_id,
        tp.create_time
        tp.create_time,
        CASE
        WHEN tp.type = 17 THEN tp.extention  -- 当 type=17 时取 extention
        ELSE CAST(tp.object_id AS VARCHAR)     -- 否则取 object_id 的字符串形式
        END AS objectIdStr
        from
        t_user_point tp
        left join t_app_user tu on tp.app_user_id = tu.id
@@ -149,6 +165,10 @@
        tp.type,
        tp.variable_point,
        tp.object_id,
        CASE
        WHEN tp.type = 17 THEN tp.extention  -- 当 type=17 时取 extention
        ELSE CAST(tp.object_id AS VARCHAR)     -- 否则取 object_id 的字符串形式
        END AS objectIdStr,
        tp.create_time
        from
        t_user_point tp
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ChargeOrderServiceImpl.java
@@ -29,6 +29,7 @@
import org.apache.poi.xssf.usermodel.XSSFWorkbook;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.io.IOException;
@@ -279,8 +280,8 @@
        pageInfo.setRecords(list);
        return pageInfo;
    }
    private R importData(ChargeOrder chargeOrder) {
    @Transactional
    public R importData(ChargeOrder chargeOrder) {
        //先计算出积分数
        Integer point = getPoint(chargeOrder.getTotalAmount());
        //获取用户,更改积分数
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/OrderServiceImpl.java
@@ -181,6 +181,7 @@
        orderDetailVO.setPaymentAmount(order.getPaymentAmount());
        orderDetailVO.setShopName(shop.getName());
        orderDetailVO.setShopAddress(shop.getAddress());
        orderDetailVO.setDetailAddress(shop.getDetailAddress());
        orderDetailVO.setLongitude(shop.getLongitude());
        orderDetailVO.setLatitude(shop.getLatitude());
        orderDetailVO.setShopId(shop.getId());
ruoyi-service/ruoyi-order/src/main/resources/mapper/order/ChargeOrderMapper.xml
@@ -29,6 +29,6 @@
        <if test="dto.beginTime2 != null and dto.endTime2 != null">
            AND end_time between #{dto.beginTime2 } and  #{dto.endTime2  }
        </if>
      order by begin_time DESC
    </select>
</mapper>
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopServiceImpl.java
@@ -75,6 +75,8 @@
    private GoodsShopMapper goodsShopMapper;
    @Resource
    private GoodsShopService goodsShopService;
    @Resource
    private GoodsEvaluateMapper goodsEvaluateMapper;
    /**
@@ -334,6 +336,12 @@
            goodsVO.setEditActivityPrice(one.getSellingPrice());
        }
        //商品评价
        GoodsEvaluate goodsEvaluateOne = goodsEvaluateMapper.getGoodsEvaluateOne(goods.getId());
        AppUser appUserById = appUserClient.getAppUserById(goodsEvaluateOne.getAppUserId());
        goodsEvaluateOne.setUserName(appUserById.getName());
        goodsEvaluateOne.setAvatar(appUserById.getAvatar());
        goodsVO.setGoodsEvaluate(goodsEvaluateOne);
        return goodsVO;
    }