New file |
| | |
| | | package com.ruoyi.system.api.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @ClassName MerGoodsPriceListDto |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/8/10 16:36 |
| | | * @Version 1.0 |
| | | */ |
| | | @Data |
| | | public class MerGoodsPriceListDto { |
| | | |
| | | @ApiModelProperty(value = "商品ids") |
| | | private String goodsIds; |
| | | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | } |
New file |
| | |
| | | package com.ruoyi.system.api.domain.dto; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @ClassName MerVerifyPrizeDto |
| | | * @Description TODO |
| | | * @Author jqs |
| | | * @Date 2023/8/11 20:54 |
| | | * @Version 1.0 |
| | | */ |
| | | @Data |
| | | public class MerVerifyPrizeFinalDto { |
| | | |
| | | @ApiModelProperty(value = "奖品id") |
| | | private String prizeId; |
| | | |
| | | @ApiModelProperty(value = "商户id") |
| | | private Long shopId; |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.dto.AppShopGoodsGetDto; |
| | | import com.ruoyi.system.api.domain.dto.GoodsTotalChangeDto; |
| | | import com.ruoyi.system.api.domain.dto.MerGoodsPriceListDto; |
| | | import com.ruoyi.system.api.domain.poji.goods.Goods; |
| | | import com.ruoyi.system.api.domain.poji.goods.GoodsFile; |
| | | import com.ruoyi.system.api.domain.poji.goods.ShopGoods; |
| | |
| | | } |
| | | |
| | | @Override |
| | | public R<List<MerGoodsPriceListVo>> listGoodsPriceByGoodsId(String goodsIds) { |
| | | public R<List<MerGoodsPriceListVo>> listGoodsPriceByGoodsId(MerGoodsPriceListDto merGoodsPriceListDto) { |
| | | return R.fail("获取商品列表失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | |
| | | return R.fail("获取平台生日卡失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R verifyPrize(MerVerifyPrizeFinalDto merVerifyPrizeFinalDto) { |
| | | return R.fail("核销奖品失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | |
| | | }; |
| | | } |
| | |
| | | public R<ShopProportionVo> getShopProportion(Long shopId) { |
| | | return R.fail("获取商户分成信息失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<List<Long>> listShopIdByCityCode(List<String> cityCodes) { |
| | | return R.fail("获取商户列表失败:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.system.api.domain.dto.AppShopGoodsGetDto; |
| | | import com.ruoyi.system.api.domain.dto.GoodsTotalChangeDto; |
| | | import com.ruoyi.system.api.domain.dto.MerGoodsPriceListDto; |
| | | import com.ruoyi.system.api.domain.poji.goods.Goods; |
| | | import com.ruoyi.system.api.domain.poji.goods.GoodsFile; |
| | | import com.ruoyi.system.api.domain.poji.goods.ShopGoods; |
| | |
| | | * @return R<List<MerGoodsPriceListVo>> |
| | | */ |
| | | @PostMapping("/goods/listGoodsPriceByGoodsId") |
| | | public R<List<MerGoodsPriceListVo>> listGoodsPriceByGoodsId(@RequestBody String goodsIds); |
| | | public R<List<MerGoodsPriceListVo>> listGoodsPriceByGoodsId(@RequestBody MerGoodsPriceListDto merGoodsPriceListDto); |
| | | |
| | | |
| | | @PostMapping("/goods/changeGoodsTotal") |
| | |
| | | |
| | | |
| | | /** |
| | | * @param verifyPrize |
| | | * @param merVerifyPrizeDto |
| | | * @return R<MemberGiftRecord> |
| | | * @description 获取核销奖品 |
| | | * @author jqs |
| | |
| | | */ |
| | | @PostMapping("/member/getBirthdayCard") |
| | | public R<BirthdayCard> getBirthdayCard(); |
| | | |
| | | /** |
| | | * @description 核销奖品 |
| | | * @author jqs |
| | | * @date 2023/8/10 11:56 |
| | | * @param merVerifyPrizeFinalDto |
| | | * @return R |
| | | */ |
| | | @PostMapping("/member/verifyPrize") |
| | | public R verifyPrize(@RequestBody MerVerifyPrizeFinalDto merVerifyPrizeFinalDto); |
| | | } |
| | |
| | | */ |
| | | @PostMapping("/shop/getShopProportion") |
| | | R<ShopProportionVo> getShopProportion(@RequestBody Long shopId); |
| | | |
| | | @PostMapping("/shop/listShopIdByCityCode") |
| | | R<List<Long>> listShopIdByCityCode(@RequestBody List<String> cityCodes); |
| | | } |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | config: |
| | | # 配置中心地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | # 配置文件格式 |
| | | file-extension: yml |
| | | # 共享配置 |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | config: |
| | | # 配置中心地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | # 配置文件格式 |
| | | file-extension: yml |
| | | # 共享配置 |
| | |
| | | datasource: |
| | | ds1: |
| | | nacos: |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | dataId: sentinel-ruoyi-gateway |
| | | groupId: DEFAULT_GROUP |
| | | data-type: json |
| | |
| | | |
| | | private final static String PRIVATE_KEY = ""; |
| | | |
| | | private final static String MCH_ID = ""; |
| | | private final static String MCH_ID = "1631381314"; |
| | | |
| | | private final static String MCH_SERIAL_NO = ""; |
| | | |
| | | private final static String API_V3_KEY = ""; |
| | | private final static String API_V3_KEY = "J8v9JDHKJYDHW9bdk30o2bdjy6z9mn1A"; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | @Override |
| | | public String createActivityCode(String url, String fileName) throws Exception { |
| | | File qrCodeFile = new File("/home/image/qrcode.png");// 生成二维码 |
| | | QrCodeUtil.generate(url, 200, 200, qrCodeFile); |
| | | QrCodeUtil.generate(url, 300, 300, qrCodeFile); |
| | | InputStream codeStream = new FileInputStream(qrCodeFile); |
| | | String fileUrl = OBSUploadUtils.uploadInputStream(codeStream,fileName); |
| | | codeStream.close(); |
| | | return fileUrl; |
| | | } |
| | | |
| | |
| | | ); |
| | | InputStream inputStream = new ByteArrayInputStream(out.toByteArray()); |
| | | fileUrl = OBSUploadUtils.uploadInputStream(inputStream,activityId); |
| | | codeStream.close(); |
| | | inputStream.close(); |
| | | return fileUrl; |
| | | } |
| | | } |
| | |
| | | result = ossClient.putObject(putObjectRequest); |
| | | // 如果上传成功,则返回200。 |
| | | System.out.println(fileName + "上传返回" + result.getResponse().getStatusCode()); |
| | | inputStream.close(); |
| | | return result.getResponse().getUri(); |
| | | } catch (OSSException oe) { |
| | | System.out.println("Caught an OSSException, which means your request made it to OSS, " |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | config: |
| | | # 配置中心地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | # 配置文件格式 |
| | | file-extension: yml |
| | | # 共享配置 |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | config: |
| | | # 配置中心地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | # 配置文件格式 |
| | | file-extension: yml |
| | | # 共享配置 |
| | |
| | | @EnableCustomSwagger2 |
| | | @EnableRyFeignClients |
| | | @SpringBootApplication |
| | | //@EnableScheduling |
| | | @EnableScheduling |
| | | @ComponentScans(value = {@ComponentScan("com.ruoyi.system.api"),@ComponentScan("com.ruoyi.common.security.utils")}) |
| | | public class RuoYiGoodsApplication |
| | | { |
| | |
| | | import com.ruoyi.goods.service.goods.ShopGoodsService; |
| | | import com.ruoyi.system.api.domain.dto.AppShopGoodsGetDto; |
| | | import com.ruoyi.system.api.domain.dto.GoodsTotalChangeDto; |
| | | import com.ruoyi.system.api.domain.dto.MerGoodsPriceListDto; |
| | | import com.ruoyi.system.api.domain.poji.goods.Goods; |
| | | import com.ruoyi.system.api.domain.poji.goods.GoodsFile; |
| | | import com.ruoyi.system.api.domain.poji.goods.ShopGoods; |
| | |
| | | * @return R<List<MerGoodsPriceListVo>> |
| | | */ |
| | | @PostMapping("/listGoodsPriceByGoodsId") |
| | | public R<List<MerGoodsPriceListVo>> listGoodsPriceByGoodsId(@RequestBody String goodsIds) |
| | | public R<List<MerGoodsPriceListVo>> listGoodsPriceByGoodsId(@RequestBody MerGoodsPriceListDto merGoodsPriceListDto) |
| | | { |
| | | List<MerGoodsPriceListVo> goodsPriceListVoList = goodsService.listGoodsPriceByGoodsId(goodsIds); |
| | | List<MerGoodsPriceListVo> goodsPriceListVoList = goodsService.listGoodsPriceByGoodsId(merGoodsPriceListDto); |
| | | return R.ok(goodsPriceListVoList); |
| | | } |
| | | |
| | |
| | | * @param goodsIds |
| | | * @return List<MerGoodsPriceListVo> |
| | | */ |
| | | List<MerGoodsPriceListVo> listGoodsPriceByGoodsId(@Param("goodsIds")String goodsIds); |
| | | List<MerGoodsPriceListVo> listGoodsPriceByGoodsId(@Param("shopId")Long shopId,@Param("goodsIds")String goodsIds); |
| | | |
| | | |
| | | /** |
| | |
| | | import com.ruoyi.goods.domain.dto.*; |
| | | import com.ruoyi.goods.domain.vo.*; |
| | | import com.ruoyi.system.api.domain.dto.AppActivityGoodsPageDto; |
| | | import com.ruoyi.system.api.domain.dto.MerGoodsPriceListDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.api.domain.poji.goods.Goods; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | |
| | | * @param goodsIds |
| | | * @return List<MerGoodsPriceListVo> |
| | | */ |
| | | List<MerGoodsPriceListVo> listGoodsPriceByGoodsId(String goodsIds); |
| | | List<MerGoodsPriceListVo> listGoodsPriceByGoodsId(MerGoodsPriceListDto merGoodsPriceListDto); |
| | | |
| | | /** |
| | | * @description 分页获取活动商品 |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.HashSet; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | |
| | | activity.setUpdateUserId(mgtActivityEditDto.getUserId()); |
| | | activity.setUpdateTime(nowTime); |
| | | activity.setRecommendFlag(mgtActivityEditDto.getRecommendFlag()); |
| | | if(activity.getAreaFlag()==2&&activity.getShopFlag()==1&&StringUtils.isNotBlank(activity.getDesignatedArea())){ |
| | | activity.setApplicableShop(""); |
| | | String designatedArea = activity.getDesignatedArea(); |
| | | List<String> cityCodes = Arrays.asList(designatedArea.split(",")); |
| | | List<Long> shopIdList = remoteShopService.listShopIdByCityCode(cityCodes).getData(); |
| | | if(shopIdList!=null&&!shopIdList.isEmpty()){ |
| | | String result = shopIdList.stream() |
| | | .map(String::valueOf) |
| | | .collect(Collectors.joining(",")); |
| | | activity.setApplicableShop(result); |
| | | } |
| | | } |
| | | this.saveOrUpdate(activity); |
| | | // 获取活动商品信息 |
| | | List<MgtActivityGoodsEditDto> mgtActivityGoodsEditDtoList = mgtActivityEditDto.getMgtActivityGoodsEditDtoList(); |
| | |
| | | import com.ruoyi.goods.service.goods.ShopGoodsService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.dto.AppActivityGoodsPageDto; |
| | | import com.ruoyi.system.api.domain.dto.MerGoodsPriceListDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtClassNumDto; |
| | | import com.ruoyi.system.api.domain.poji.activity.ActivityGoods; |
| | |
| | | * @return List<MerGoodsPriceListVo> |
| | | */ |
| | | @Override |
| | | public List<MerGoodsPriceListVo> listGoodsPriceByGoodsId(String goodsIds){ |
| | | return goodsMapper.listGoodsPriceByGoodsId(goodsIds); |
| | | public List<MerGoodsPriceListVo> listGoodsPriceByGoodsId(MerGoodsPriceListDto merGoodsPriceListDto){ |
| | | return goodsMapper.listGoodsPriceByGoodsId(merGoodsPriceListDto.getShopId(),merGoodsPriceListDto.getGoodsIds()); |
| | | } |
| | | |
| | | |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | config: |
| | | # 配置中心地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | # 配置文件格式 |
| | | file-extension: yml |
| | | # 共享配置 |
| | |
| | | ta.activity_end_time activityEndTime, |
| | | CASE ta.activity_status |
| | | WHEN 0 THEN '未开始' |
| | | WHEN 1 THEN '进行中' |
| | | WHEN 1 THEN '活动中' |
| | | WHEN 2 THEN '已结束' |
| | | END activityStatus, |
| | | ta.propaganda_poster propagandaPoster, |
| | |
| | | ta.activity_code activityCode |
| | | FROM t_activity ta |
| | | LEFT JOIN t_activity_goods ag ON ta.activity_id = ag.activity_id AND ag.del_flag = 0 |
| | | WHERE ta.del_flag = 0 AND shop_flag = 1 OR (shop_flag = 2 AND FIND_IN_SET(#{param.shopId}, ta.applicable_shop) > 0) |
| | | WHERE ta.del_flag = 0 AND ((ta.shop_flag = 1 AND ta.area_flag = 1) OR (FIND_IN_SET(#{param.shopId}, ta.applicable_shop) > 0)) |
| | | group by ta.activity_id |
| | | ORDER BY ta.activity_status ASC,ta.create_time DESC |
| | | </select> |
| | |
| | | <select id="getRecommendActivity" resultType="com.ruoyi.goods.domain.pojo.activity.Activity"> |
| | | SELECT * FROM t_activity |
| | | WHERE del_flag = 0 AND recommend_flag = 1 AND NOW() BETWEEN activity_start_time AND activity_end_time |
| | | AND activity_status = 1 AND (shop_flag = 1 OR (shop_flag = 2 AND FIND_IN_SET(#{shopId}, applicable_shop) > 0)) |
| | | AND activity_status = 1 AND ((shop_flag = 1 AND area_flag = 1) OR (FIND_IN_SET(#{shopId}, applicable_shop) > 0)) |
| | | ORDER BY activity_end_time - NOW() |
| | | LIMIT 1; |
| | | </select> |
| | |
| | | <select id="listActivityIdByShopId" resultType="java.lang.String"> |
| | | SELECT activity_id FROM t_activity |
| | | WHERE del_flag = 0 AND activity_status = 1 AND NOW() BETWEEN activity_start_time AND activity_end_time |
| | | AND shop_flag = 1 OR (shop_flag = 2 AND FIND_IN_SET(#{shopId}, applicable_shop) > 0) |
| | | AND ((shop_flag = 1 AND area_flag = 1) OR (FIND_IN_SET(#{shopId}, applicable_shop) > 0)) |
| | | </select> |
| | | |
| | | <select id="pageAppActivity" resultType="com.ruoyi.goods.domain.vo.AppActivityPageVo"> |
| | |
| | | ta.propaganda_poster propagandaPoster, |
| | | ta.activity_introduce activityIntroduce |
| | | FROM t_activity ta |
| | | WHERE ta.del_flag = 0 AND ta.activity_status <=1 AND CURRENT_TIME < ta.activity_end_time AND (ta.shop_flag = 1 OR (ta.shop_flag = 2 AND FIND_IN_SET(#{shopId}, ta.applicable_shop) > 0)) |
| | | WHERE ta.del_flag = 0 AND ta.activity_status <=1 AND CURRENT_TIME < ta.activity_end_time AND ((ta.shop_flag = 1 AND ta.area_flag = 1) OR (FIND_IN_SET(#{shopId}, ta.applicable_shop) > 0)) |
| | | group by ta.activity_id |
| | | ORDER BY ta.activity_status ASC,ta.create_time DESC |
| | | </select> |
| | |
| | | tg.service_num defaultServiceNum, |
| | | IFNULL(tsg.service_num,tg.service_num) serviceNum |
| | | FROM t_goods tg |
| | | INNER JOIN t_goods_total tgt ON tg.goods_id = tgt.goods_id |
| | | LEFT JOIN t_goods_file tgf ON tg.goods_id = tgf.goods_id AND tgf.del_flag = 0 AND tgf.file_type = 1 |
| | | LEFT JOIN t_shop_goods tsg ON tg.goods_id = tsg.goods_id AND tsg.shop_id = #{param.shopId} AND tsg.del_flag = 0 |
| | | WHERE tg.del_flag = 0 AND tg.goods_status = 1 |
| | |
| | | tg.goods_name goodsName, |
| | | tg.goods_introduction goodsIntroduction, |
| | | tg.goods_type goodsType, |
| | | CASE tg.goods_type |
| | | WHEN 1 THEN "周期" |
| | | WHEN 2 THEN "服务" |
| | | WHEN 3 THEN "体验" |
| | | WHEN 4 THEN "单品" |
| | | END goodsTag, |
| | | tg.goods_tags goodsTag, |
| | | IFNULL(tsg.sales_price,tg.sales_price) salesPrice, |
| | | tgf.file_url goodsPicture, |
| | | tg.goods_nurses goodsNurses, |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | config: |
| | | # 配置中心地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | # 配置文件格式 |
| | | file-extension: yml |
| | | # 共享配置 |
| | |
| | | @EnableCustomSwagger2 |
| | | @EnableRyFeignClients |
| | | @SpringBootApplication |
| | | //@EnableScheduling |
| | | @EnableScheduling |
| | | @ComponentScans(value = {@ComponentScan("com.ruoyi.system.api"),@ComponentScan("com.ruoyi.common.security.utils")}) |
| | | public class RuoYiMemberApplication |
| | | { |
| | |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import com.ruoyi.system.api.domain.dto.MerBaseGetDto; |
| | | import com.ruoyi.system.api.domain.dto.MerPageDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseGetDto; |
| | | import com.ruoyi.system.api.domain.vo.MerMemberCouponVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | |
| | | @RequestMapping(value = "/getMerCouponVo", method = RequestMethod.POST) |
| | | @ApiOperation(value = "商户获取优惠券编辑信息") |
| | | public R<MerCouponGetVo> getMerCouponVo(@RequestBody MgtBaseGetDto mgtBaseGetDto) { |
| | | public R<MerCouponGetVo> getMerCouponVo(@RequestBody MerBaseGetDto merBaseGetDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | mgtBaseGetDto.setUserId(userId); |
| | | MerCouponGetVo couponGetVo = couponService.getMerCouponVo(mgtBaseGetDto.getId()); |
| | | merBaseGetDto.setUserId(userId); |
| | | MerCouponGetVo couponGetVo = couponService.getMerCouponVo(merBaseGetDto); |
| | | return R.ok(couponGetVo); |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | /** |
| | | * @description 核销奖品 |
| | | * @author jqs |
| | | * @date 2023/8/10 11:56 |
| | | * @param merVerifyPrizeFinalDto |
| | | * @return R |
| | | */ |
| | | @PostMapping("/verifyPrize") |
| | | public R verifyPrize(@RequestBody MerVerifyPrizeFinalDto merVerifyPrizeFinalDto) |
| | | { |
| | | memberGiftRecordService.verifyPrize(merVerifyPrizeFinalDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * @description 积分变动 |
| | | * @author jqs |
| | | * @date 2023/7/12 17:04 |
| | |
| | | private String endMemberDate; |
| | | |
| | | @ApiModelProperty(value = "会员类型1.周期2.服务3.体验") |
| | | private Integer memberType; |
| | | private String memberType; |
| | | |
| | | @ApiModelProperty(value = "会员来源") |
| | | private String memberFrom; |
| | |
| | | |
| | | |
| | | @ApiModelProperty(value = "浏览类型1鸿瑞学堂2营销活动3商城商品4关于鸿瑞堂5申请加盟") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "浏览类型1鸿瑞学堂2营销活动3商城商品4关于鸿瑞堂5申请加盟") |
| | | private String browseType; |
| | | |
| | | @ApiModelProperty(value = "浏览名称") |
| | |
| | | package com.ruoyi.member.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | private Integer sendTimeType; |
| | | |
| | | @ApiModelProperty(value="发送时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date sendTime; |
| | | |
| | | @ApiModelProperty(value = "使用范围1.全场2.指定商品") |
| | |
| | | private Integer validTimeType; |
| | | |
| | | @ApiModelProperty(value = "有效开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date validStartTime; |
| | | |
| | | @ApiModelProperty(value = "有效截止时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date validEndTime; |
| | | |
| | | @ApiModelProperty(value = "有效期") |
| | |
| | | String requestBodyStr = stringBuilder.toString(); |
| | | log.info("requestBodyStr---"+requestBodyStr); |
| | | if(StringUtils.isNotBlank(requestBodyStr)){ |
| | | return JSONObject.parseObject(stringBuilder.toString(), Map.class); |
| | | try { |
| | | return JSONObject.parseObject(stringBuilder.toString(), Map.class); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return new HashMap<>(); |
| | | } |
| | |
| | | * @description 平台获取优惠券编辑信息 |
| | | * @author jqs |
| | | * @date 2023/6/13 14:29 |
| | | * @param couponId |
| | | * @param merBaseGetDto |
| | | * @return MerCouponGetVo |
| | | */ |
| | | MerCouponGetVo getMerCouponVo(String couponId); |
| | | MerCouponGetVo getMerCouponVo(MerBaseGetDto merBaseGetDto); |
| | | |
| | | /** |
| | | * @description 平台编辑优惠券 |
| | |
| | | import com.ruoyi.member.domain.dto.MgtBirthdayEditDto; |
| | | import com.ruoyi.member.domain.dto.MgtBirthdayGetDto; |
| | | import com.ruoyi.member.domain.dto.MgtBirthdayGiftDto; |
| | | import com.ruoyi.system.api.domain.poji.member.BirthdayCard; |
| | | import com.ruoyi.member.domain.pojo.birthday.BirthdayGift; |
| | | import com.ruoyi.member.domain.vo.*; |
| | | import com.ruoyi.member.mapper.birthday.BirthdayCardMapper; |
| | | import com.ruoyi.member.service.birthday.BirthdayCardService; |
| | | import com.ruoyi.member.service.birthday.BirthdayGiftService; |
| | | import com.ruoyi.member.service.member.MemberGiftRecordService; |
| | | import com.ruoyi.member.service.member.MemberService; |
| | | import com.ruoyi.system.api.constant.AppErrorConstant; |
| | | import com.ruoyi.system.api.domain.dto.BirthdayGiftSendDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.poji.member.BirthdayCard; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import com.ruoyi.system.api.domain.poji.member.MemberGiftRecord; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import com.ruoyi.system.api.domain.vo.MgtSimpleShopVo; |
| | |
| | | |
| | | @Resource |
| | | private MemberGiftRecordService memberGiftRecordService; |
| | | |
| | | @Resource |
| | | private MemberService memberService; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | BirthdayGiftSendDto birthdayGiftSendDto; |
| | | String prizeId; |
| | | String currentYear = String.valueOf(LocalDate.now().getYear()); |
| | | Member member = memberService.getByUserId(userId); |
| | | // 获取平台生日卡信息 |
| | | BirthdayCard plBirthdayCard = birthdayCardMapper.getPlatformBirthdayCard(shopId); |
| | | BirthdayCard plBirthdayCard = this.getBirthdayCard(); |
| | | //绑定的时候需要判断范围 |
| | | if(member.getBindingFlag()==1){ |
| | | //判断指定区域全部店铺 |
| | | if(plBirthdayCard.getShopFlag()==1&&plBirthdayCard.getAreaFlag()==2){ |
| | | Shop shop = remoteShopService.getShop(member.getRelationShopId()).getData(); |
| | | if(!StringUtils.checkString(plBirthdayCard.getDesignatedArea(),shop.getShopCityCode())){ |
| | | plBirthdayCard = null; |
| | | } |
| | | } |
| | | //判断指定店铺 |
| | | if(plBirthdayCard.getShopFlag()==2&&!StringUtils.checkString(plBirthdayCard.getApplicableShop(),shopId.toString())){ |
| | | plBirthdayCard = null; |
| | | } |
| | | } |
| | | // 如果生日卡存在 |
| | | if (plBirthdayCard != null && plBirthdayCard.getCardStatus()==1) { |
| | | // 获取生日卡对应的生日礼物列表 |
| | |
| | | } |
| | | } |
| | | //获取商户营销开关状态 |
| | | Integer marketingStatus = remoteShopService.getShopMarketingStatus(shopId).getData(); |
| | | if(marketingStatus>1){ |
| | | //获取商户生日卡 |
| | | LambdaQueryWrapper<BirthdayCard> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(BirthdayCard::getDelFlag,0); |
| | | queryWrapper.eq(BirthdayCard::getShopId,shopId); |
| | | BirthdayCard shopBirthdayCard = this.getOne(queryWrapper,false); |
| | | // 如果生日卡存在 |
| | | if (shopBirthdayCard != null && shopBirthdayCard.getCardStatus()==1) { |
| | | // 获取生日卡对应的生日礼物列表 |
| | | List<BirthdayGift> birthdayGiftList = birthdayGiftService.listByCardId(shopBirthdayCard.getCardId()); |
| | | if(!birthdayGiftList.isEmpty()){ |
| | | // 遍历生日礼物列表 |
| | | for (BirthdayGift birthdayGift : birthdayGiftList) { |
| | | winningProbability = birthdayGift.getWinningProbability(); |
| | | randomProbability = new BigDecimal(new Random().nextInt(100)); |
| | | if(winningProbability.compareTo(randomProbability)>0){ |
| | | appBirthdayGiftVo = new AppBirthdayGiftVo(); |
| | | memberGiftRecord = new MemberGiftRecord(); |
| | | birthdayGiftSendDto = new BirthdayGiftSendDto(); |
| | | BeanUtils.copyProperties(birthdayGift, memberGiftRecord); |
| | | prizeId = IdUtils.simpleUUID(); |
| | | memberGiftRecord.setPrizeId(prizeId); |
| | | memberGiftRecord.setDelFlag(0); |
| | | memberGiftRecord.setVerifyStatus(1); |
| | | memberGiftRecord.setGiftFrom(2); |
| | | memberGiftRecord.setShopId(shopId); |
| | | memberGiftRecord.setGiftYear(currentYear); |
| | | memberGiftRecord.setCreateTime(new Date()); |
| | | memberGiftRecord.setUserId(userId); |
| | | birthdayGiftSendDto.setUserId(userId); |
| | | birthdayGiftSendDto.setGiftFrom(2); |
| | | birthdayGiftSendDto.setShopId(shopId); |
| | | birthdayGiftSendDto.setGiftType(birthdayGift.getGiftType()); |
| | | switch (birthdayGift.getGiftType()) { |
| | | case 1: |
| | | // 礼物类型为1,即优惠券 |
| | | appBirthdayGiftVo.setGiftName(birthdayGift.getCouponName()); |
| | | appBirthdayGiftVo.setGiftNumber(birthdayGift.getCouponNumber()); |
| | | birthdayGiftSendDto.setCouponId(birthdayGift.getCouponId()); |
| | | birthdayGiftSendDto.setCouponNumber(birthdayGift.getCouponNumber()); |
| | | sendGoodsList.add(birthdayGiftSendDto); |
| | | memberGiftRecord.setCouponId(birthdayGift.getCouponId()); |
| | | memberGiftRecord.setCouponName(birthdayGift.getCouponName()); |
| | | memberGiftRecord.setCouponNumber(birthdayGift.getCouponNumber()); |
| | | break; |
| | | case 2: |
| | | // 礼物类型为2,即商品 |
| | | appBirthdayGiftVo.setGiftName(birthdayGift.getGoodsName()); |
| | | appBirthdayGiftVo.setGiftNumber(birthdayGift.getGoodsNumber()); |
| | | birthdayGiftSendDto.setGoodsId(birthdayGift.getGoodsId()); |
| | | birthdayGiftSendDto.setCouponNumber(birthdayGift.getGoodsNumber()); |
| | | sendCouponList.add(birthdayGiftSendDto); |
| | | memberGiftRecord.setGoodsId(birthdayGift.getGoodsId()); |
| | | memberGiftRecord.setGoodsName(birthdayGift.getGoodsName()); |
| | | memberGiftRecord.setGoodsNumber(birthdayGift.getGoodsNumber()); |
| | | break; |
| | | case 3: |
| | | // 礼物类型为3,即现金 |
| | | appBirthdayGiftVo.setGiftName("现金"); |
| | | appBirthdayGiftVo.setGiftNumber(memberGiftRecord.getMoney().doubleValue()); |
| | | memberGiftRecord.setMoney(birthdayGift.getMoney()); |
| | | break; |
| | | case 4: |
| | | // 礼物类型为4,即礼品 |
| | | appBirthdayGiftVo.setGiftName(birthdayGift.getGiftName()); |
| | | appBirthdayGiftVo.setGiftNumber(birthdayGift.getGiftNumber()); |
| | | memberGiftRecord.setGiftName(birthdayGift.getGiftName()); |
| | | memberGiftRecord.setGiftNumber(birthdayGift.getGiftNumber()); |
| | | break; |
| | | default: |
| | | break; |
| | | if(member.getBindingFlag()==1){ |
| | | Integer marketingStatus = remoteShopService.getShopMarketingStatus(shopId).getData(); |
| | | if(marketingStatus>1){ |
| | | //获取商户生日卡 |
| | | LambdaQueryWrapper<BirthdayCard> queryWrapper = new LambdaQueryWrapper<>(); |
| | | queryWrapper.eq(BirthdayCard::getDelFlag,0); |
| | | queryWrapper.eq(BirthdayCard::getShopId,shopId); |
| | | BirthdayCard shopBirthdayCard = this.getOne(queryWrapper,false); |
| | | // 如果生日卡存在 |
| | | if (shopBirthdayCard != null && shopBirthdayCard.getCardStatus()==1) { |
| | | // 获取生日卡对应的生日礼物列表 |
| | | List<BirthdayGift> birthdayGiftList = birthdayGiftService.listByCardId(shopBirthdayCard.getCardId()); |
| | | if(!birthdayGiftList.isEmpty()){ |
| | | // 遍历生日礼物列表 |
| | | for (BirthdayGift birthdayGift : birthdayGiftList) { |
| | | winningProbability = birthdayGift.getWinningProbability(); |
| | | randomProbability = new BigDecimal(new Random().nextInt(100)); |
| | | if(winningProbability.compareTo(randomProbability)>0){ |
| | | appBirthdayGiftVo = new AppBirthdayGiftVo(); |
| | | memberGiftRecord = new MemberGiftRecord(); |
| | | birthdayGiftSendDto = new BirthdayGiftSendDto(); |
| | | BeanUtils.copyProperties(birthdayGift, memberGiftRecord); |
| | | prizeId = IdUtils.simpleUUID(); |
| | | memberGiftRecord.setPrizeId(prizeId); |
| | | memberGiftRecord.setDelFlag(0); |
| | | memberGiftRecord.setVerifyStatus(1); |
| | | memberGiftRecord.setGiftFrom(2); |
| | | memberGiftRecord.setShopId(shopId); |
| | | memberGiftRecord.setGiftYear(currentYear); |
| | | memberGiftRecord.setCreateTime(new Date()); |
| | | memberGiftRecord.setUserId(userId); |
| | | birthdayGiftSendDto.setUserId(userId); |
| | | birthdayGiftSendDto.setGiftFrom(2); |
| | | birthdayGiftSendDto.setShopId(shopId); |
| | | birthdayGiftSendDto.setGiftType(birthdayGift.getGiftType()); |
| | | switch (birthdayGift.getGiftType()) { |
| | | case 1: |
| | | // 礼物类型为1,即优惠券 |
| | | appBirthdayGiftVo.setGiftName(birthdayGift.getCouponName()); |
| | | appBirthdayGiftVo.setGiftNumber(birthdayGift.getCouponNumber()); |
| | | birthdayGiftSendDto.setCouponId(birthdayGift.getCouponId()); |
| | | birthdayGiftSendDto.setCouponNumber(birthdayGift.getCouponNumber()); |
| | | sendGoodsList.add(birthdayGiftSendDto); |
| | | memberGiftRecord.setCouponId(birthdayGift.getCouponId()); |
| | | memberGiftRecord.setCouponName(birthdayGift.getCouponName()); |
| | | memberGiftRecord.setCouponNumber(birthdayGift.getCouponNumber()); |
| | | break; |
| | | case 2: |
| | | // 礼物类型为2,即商品 |
| | | appBirthdayGiftVo.setGiftName(birthdayGift.getGoodsName()); |
| | | appBirthdayGiftVo.setGiftNumber(birthdayGift.getGoodsNumber()); |
| | | birthdayGiftSendDto.setGoodsId(birthdayGift.getGoodsId()); |
| | | birthdayGiftSendDto.setCouponNumber(birthdayGift.getGoodsNumber()); |
| | | sendCouponList.add(birthdayGiftSendDto); |
| | | memberGiftRecord.setGoodsId(birthdayGift.getGoodsId()); |
| | | memberGiftRecord.setGoodsName(birthdayGift.getGoodsName()); |
| | | memberGiftRecord.setGoodsNumber(birthdayGift.getGoodsNumber()); |
| | | break; |
| | | case 3: |
| | | // 礼物类型为3,即现金 |
| | | appBirthdayGiftVo.setGiftName("现金"); |
| | | appBirthdayGiftVo.setGiftNumber(memberGiftRecord.getMoney().doubleValue()); |
| | | memberGiftRecord.setMoney(birthdayGift.getMoney()); |
| | | break; |
| | | case 4: |
| | | // 礼物类型为4,即礼品 |
| | | appBirthdayGiftVo.setGiftName(birthdayGift.getGiftName()); |
| | | appBirthdayGiftVo.setGiftNumber(birthdayGift.getGiftNumber()); |
| | | memberGiftRecord.setGiftName(birthdayGift.getGiftName()); |
| | | memberGiftRecord.setGiftNumber(birthdayGift.getGiftNumber()); |
| | | break; |
| | | default: |
| | | break; |
| | | } |
| | | birthdayGiftVoList.add(appBirthdayGiftVo); |
| | | memberGiftRecordList.add(memberGiftRecord); |
| | | } |
| | | birthdayGiftVoList.add(appBirthdayGiftVo); |
| | | memberGiftRecordList.add(memberGiftRecord); |
| | | } |
| | | } |
| | | } |
| | |
| | | if (plBirthdayCard == null || plBirthdayCard.getCardStatus()!=1) { |
| | | platformBirthdayCardOpen = false; |
| | | }else{ |
| | | if(plBirthdayCard.getShopFlag()==2&&plBirthdayCard.getAreaFlag()==1){ |
| | | Shop shop = remoteShopService.getShop(shopId).getData(); |
| | | if(!StringUtils.checkString(plBirthdayCard.getDesignatedArea(),shop.getShopCityCode())){ |
| | | //绑死店铺判断区域和店铺 |
| | | if(bindingFlag==1){ |
| | | //判断指定区域全部店铺 |
| | | if(plBirthdayCard.getShopFlag()==1&&plBirthdayCard.getAreaFlag()==2){ |
| | | Shop shop = remoteShopService.getShop(shopId).getData(); |
| | | if(!StringUtils.checkString(plBirthdayCard.getDesignatedArea(),shop.getShopCityCode())){ |
| | | platformBirthdayCardOpen = false; |
| | | } |
| | | } |
| | | //判断指定店铺 |
| | | if(plBirthdayCard.getShopFlag()==2&&!StringUtils.checkString(plBirthdayCard.getApplicableShop(),shopId.toString())){ |
| | | platformBirthdayCardOpen = false; |
| | | } |
| | | } |
| | | if(plBirthdayCard.getAreaFlag()==2&&!StringUtils.checkString(plBirthdayCard.getApplicableShop(),shopId.toString())){ |
| | | platformBirthdayCardOpen = false; |
| | | } |
| | | } |
| | | //判断店铺生日卡 |
| | | BirthdayCard shopBirthdayCard = birthdayCardMapper.getMerShopBirthdayCard(shopId); |
| | | // 如果生日卡存在 |
| | | Boolean shopBirthdayCardOpen = true; |
| | |
| | | BigDecimal discountPercent; |
| | | String useLimit = ""; |
| | | for(MgtCouponPageVo mgtCouponPageVo : mgtCouponPageVoList){ |
| | | useLimit = null; |
| | | //处理使用限制 |
| | | couponType = mgtCouponPageVo.getCouponType(); |
| | | if(couponType.equals("满减")){ |
| | |
| | | discountPercent = mgtCouponPageVo.getDiscountPercent(); |
| | | useLimit = discountPercent.toString() + "折"; |
| | | } |
| | | if(couponType.equals("抵扣")){ |
| | | if(couponType.equals("代金")){ |
| | | discountMoney = mgtCouponPageVo.getDiscountMoney(); |
| | | useLimit = discountMoney.toString(); |
| | | } |
| | |
| | | if(validTimeType==1){ |
| | | validStartTime = mgtCouponPageVo.getValidStartTime(); |
| | | validEndTime = mgtCouponPageVo.getValidEndTime(); |
| | | validTime = DateUtils.dateTime(validStartTime) + '-' + DateUtils.dateTime(validEndTime); |
| | | validTime = DateUtils.parseDateToStr("yyyy-MM-dd",validStartTime) + '-' + DateUtils.parseDateToStr("yyyy-MM-dd",validEndTime); |
| | | }else if(validTimeType==2){ |
| | | validDay = mgtCouponPageVo.getValidDay(); |
| | | validTime = "领取之日起" + validDay.toString() + "天"; |
| | |
| | | * @description 平台获取优惠券编辑信息 |
| | | * @author jqs |
| | | * @date 2023/6/13 14:29 |
| | | * @param couponId |
| | | * @param merBaseGetDto |
| | | * @return MgtCouponGetVo |
| | | */ |
| | | @Override |
| | | public MerCouponGetVo getMerCouponVo(String couponId){ |
| | | public MerCouponGetVo getMerCouponVo(MerBaseGetDto merBaseGetDto){ |
| | | MerCouponGetVo merCouponGetVo = new MerCouponGetVo(); |
| | | Coupon coupon = this.getById(couponId); |
| | | Coupon coupon = this.getById(merBaseGetDto.getId()); |
| | | BeanUtils.copyProperties(coupon, merCouponGetVo); |
| | | //判断优惠券是否为指定商品 |
| | | if(coupon.getUseScope()==2){ |
| | | String relGoodsIds = coupon.getRelGoodsIds(); |
| | | if(StringUtils.isNotBlank(relGoodsIds)){ |
| | | //获取指定商品列表 |
| | | List<MerGoodsPriceListVo> goodsList = remoteGoodsService.listGoodsPriceByGoodsId(relGoodsIds).getData(); |
| | | MerGoodsPriceListDto merGoodsPriceListDto = new MerGoodsPriceListDto(); |
| | | merGoodsPriceListDto.setGoodsIds(relGoodsIds); |
| | | merGoodsPriceListDto.setShopId(merBaseGetDto.getShopId()); |
| | | List<MerGoodsPriceListVo> goodsList = remoteGoodsService.listGoodsPriceByGoodsId(merGoodsPriceListDto).getData(); |
| | | if(goodsList!=null&&!goodsList.isEmpty()){ |
| | | merCouponGetVo.setRelGoodsList(goodsList); |
| | | } |
| | |
| | | if(validTimeType==1){ |
| | | validStartTime = mgtCouponAuditPageVo.getValidStartTime(); |
| | | validEndTime = mgtCouponAuditPageVo.getValidEndTime(); |
| | | validTime = DateUtils.dateTime(validStartTime) + '-' + DateUtils.dateTime(validEndTime); |
| | | validTime = DateUtils.parseDateToStr("yyyy-MM-dd",validStartTime) + '-' + DateUtils.parseDateToStr("yyyy-MM-dd",validEndTime); |
| | | }else if(validTimeType==2){ |
| | | validDay = mgtCouponAuditPageVo.getValidDay(); |
| | | validTime = "领取之日起" + validDay.toString() + "天"; |
| | |
| | | browseTime = browseTime + seconds + "秒"; |
| | | } |
| | | browseRecord.setBrowseTime(browseTime); |
| | | this.saveOrUpdate(browseRecord); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.member.service.impl.member; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.ruoyi.system.api.domain.dto.MerVerifyPrizeFinalDto; |
| | | import com.ruoyi.system.api.domain.poji.member.MemberGiftRecord; |
| | | import com.ruoyi.member.mapper.member.MemberGiftRecordMapper; |
| | | import com.ruoyi.member.service.member.MemberGiftRecordService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/8/10 11:54 |
| | | * @param merVerifyPrizeFinalDto |
| | | * @return void |
| | | */ |
| | | @Override |
| | | public void verifyPrize(MerVerifyPrizeFinalDto merVerifyPrizeFinalDto){ |
| | | MemberGiftRecord memberGiftRecord = this.getById(merVerifyPrizeFinalDto.getPrizeId()); |
| | | memberGiftRecord.setShopId(merVerifyPrizeFinalDto.getShopId()); |
| | | memberGiftRecord.setVerifyStatus(2); |
| | | memberGiftRecord.setVerifyTime(new Date()); |
| | | this.saveOrUpdate(memberGiftRecord); |
| | | } |
| | | |
| | | } |
| | |
| | | mgtActivenessJudgeVo.setStartDay(DateUtils.addDays(new Date(), -activeness.getEndDay())); |
| | | mgtActivenessJudgeVo.setEndDay(DateUtils.addDays(new Date(), -activeness.getStartDay())); |
| | | mgtActivenessJudgeVo.setActivenessName(activeness.getActivenessName()); |
| | | mgtActivenessJudgeVoList.add(mgtActivenessJudgeVo); |
| | | } |
| | | //活跃度赋值 |
| | | Date lastPayTime; |
| | | for (MerMemberPageVo mgtMemberPageVo : merMemberPageVoList) { |
| | | //实际是最后服务时间 |
| | | lastPayTime = mgtMemberPageVo.getLastPayTime(); |
| | | StringJoiner sj = new StringJoiner(","); |
| | | if (lastPayTime != null) { |
| | |
| | | MemberTotal memberTotal = memberTotalService.getById(member.getMemberId()); |
| | | // 设置MerMemberInfoVo对象的属性值 |
| | | merMemberInfoVo.setSurpNumber(memberTotal.getUseableServiceCount()); |
| | | merMemberInfoVo.setUserNumber(memberTotal.getUsedServiceCount()); |
| | | merMemberInfoVo.setUserNumber(memberTotal.getTotalPayCount()); |
| | | merMemberInfoVo.setPayMoney(memberTotal.getTotalPayMoney()); |
| | | // 创建MerBaseDto对象 |
| | | MerBaseDto merBaseDto = new MerBaseDto(); |
| | |
| | | // Get the sysUser by mobile number |
| | | SysUser sysUser = sysUserService.getSysUserByMobile(phoneNumber).getData(); |
| | | // If sysUser does not exist, create a new one |
| | | if (sysUser == null) { |
| | | if (sysUser == null || !sysUser.getUserType().equals("03")) { |
| | | String memberId = IdUtils.simpleUUID(); |
| | | sysUser = new SysUser(); |
| | | sysUser.setUserName(memberId); |
| | | sysUser.setUserType("03"); |
| | | sysUser.setNickName(merMemberAddDto.getRealName()); |
| | | sysUser.setPhonenumber(merMemberAddDto.getPhonenumber()); |
| | | sysUser.setAvatar("https://hongruitang.oss-cn-beijing.aliyuncs.com/default.png"); |
| | | String password = "hongruitang"; |
| | | sysUser.setPassword(SecurityUtils.encryptPassword(password)); |
| | |
| | | member.setNickName(merMemberAddDto.getRealName()); |
| | | member.setRealName(merMemberAddDto.getRealName()); |
| | | member.setGender(merMemberAddDto.getGender()); |
| | | member.setLevel(merMemberAddDto.getLevel()); |
| | | member.setMobile(phoneNumber); |
| | | member.setReferrer(merMemberAddDto.getReferrer()); |
| | | member.setBirthday(merMemberAddDto.getBirthday()); |
| | |
| | | member.setRelationShopName(shop.getShopName()); |
| | | member.setCustomerSource(merMemberAddDto.getCustomerSource()); |
| | | member.setCreateTime(new Date()); |
| | | //调理问题 |
| | | List<String> memberNurse = merMemberAddDto.getMemberNurse(); |
| | | if(memberNurse!=null&&!memberNurse.isEmpty()){ |
| | | String memberNurseString = String.join(",", memberNurse); |
| | | member.setMemberNurse(memberNurseString); |
| | | } |
| | | // Save the member and initialize member total |
| | | this.saveOrUpdate(member); |
| | | initMemberTotal(memberId); |
| | |
| | | ).collect(Collectors.toList()); |
| | | memberArchiveService.saveBatch(memberArchiveList); |
| | | } |
| | | }else{ |
| | | throw new ServiceException(AppErrorConstant.MOBILE_USER_DOUBLE); |
| | | } |
| | | return sysUser.getUserId(); |
| | | } |
| | |
| | | import com.ruoyi.member.domain.vo.MgtMemberSuggestPageVo; |
| | | import com.ruoyi.member.domain.vo.MgtMemberSuggestTagVo; |
| | | import com.ruoyi.member.mapper.member.MemberSuggestMapper; |
| | | import com.ruoyi.member.service.member.MemberService; |
| | | import com.ruoyi.member.service.member.MemberSuggestService; |
| | | import com.ruoyi.system.api.domain.dto.AppSuggestPageDto; |
| | | import com.ruoyi.system.api.domain.dto.AppUserSuggestDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtBaseBathDto; |
| | | import com.ruoyi.system.api.domain.dto.MgtShopIdByCodeDto; |
| | | import com.ruoyi.system.api.domain.poji.config.SysTag; |
| | | import com.ruoyi.system.api.domain.poji.member.Member; |
| | | import com.ruoyi.system.api.domain.poji.sys.SysUser; |
| | | import com.ruoyi.system.api.domain.vo.MgtShopIdByCodeVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtSimpleShopVo; |
| | |
| | | @Resource |
| | | private RemoteConfigService remoteConfigService; |
| | | |
| | | @Resource |
| | | private MemberService memberService; |
| | | |
| | | /** |
| | | * |
| | | * @param page |
| | |
| | | memberSuggest.setSuggestContent(appUserSuggestDto.getSuggestContent()); |
| | | memberSuggest.setCreateTime(new Date()); |
| | | memberSuggest.setSuggestType(appUserSuggestDto.getSuggestType()); |
| | | if(appUserSuggestDto.getSuggestType()==2){ |
| | | Member member = memberService.getByUserId(appUserSuggestDto.getUserId()); |
| | | memberSuggest.setShopId(member.getRelationShopId()); |
| | | } |
| | | memberSuggest.setReplayFlag(0); |
| | | this.saveOrUpdate(memberSuggest); |
| | | } |
| | |
| | | package com.ruoyi.member.service.member; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.system.api.domain.dto.MerVerifyPrizeFinalDto; |
| | | import com.ruoyi.system.api.domain.poji.member.MemberGiftRecord; |
| | | |
| | | import java.util.List; |
| | |
| | | * @return List<MemberGiftRecord> |
| | | */ |
| | | List<MemberGiftRecord> listByUserIdAndYear(Long userId,String giftYear); |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/8/10 11:55 |
| | | * @param merVerifyPrizeFinalDto |
| | | * @return void |
| | | */ |
| | | void verifyPrize(MerVerifyPrizeFinalDto merVerifyPrizeFinalDto); |
| | | } |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | config: |
| | | # 配置中心地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | # 配置文件格式 |
| | | file-extension: yml |
| | | # 共享配置 |
| | |
| | | FROM t_birthday_card |
| | | WHERE del_flag = 0 AND card_status = 1 AND shop_id = 0 |
| | | AND (shop_flag = 1 OR (shop_flag = 2 AND FIND_IN_SET(#{shopId}, applicable_shop) > 0)) |
| | | |
| | | </select> |
| | | |
| | | <select id="getMerShopBirthdayCard" resultType="com.ruoyi.system.api.domain.poji.member.BirthdayCard"> |
| | |
| | | |
| | | <select id="pageMerMemberBrowse" resultType="com.ruoyi.member.domain.vo.MerMemberBrowsePageVo"> |
| | | SELECT |
| | | browse_type type, |
| | | CASE browse_type |
| | | WHEN 1 THEN "鸿瑞学堂" |
| | | WHEN 2 THEN "营销活动" |
| | |
| | | tm.birthday birthday, |
| | | tm.user_tags userTags, |
| | | tm.goods_type goodsType, |
| | | tmt.last_pay_time lastPayTime |
| | | tmt.last_service_time lastPayTime |
| | | FROM t_member tm |
| | | INNER JOIN t_member_total tmt ON tm.member_id = tmt.member_id |
| | | WHERE tm.relation_shop_id = #{param.shopId} AND tm.binding_flag = 1 |
| | |
| | | AND tm.customer_source = #{param.memberFrom} |
| | | </if> |
| | | <if test="param.memberLevel != null and param.memberLevel != ''"> |
| | | AND tm.member_level = #{param.memberLevel} |
| | | AND tm.level = #{param.memberLevel} |
| | | </if> |
| | | <if test="param.taskStartDate!=null and param.taskStartDate!=''"> |
| | | AND Date(tmt.next_task_time) >= #{param.taskStartDate} |
| | |
| | | AND Date(tm.create_time) <= #{param.endDate} |
| | | </if> |
| | | GROUP BY tm.customer_source |
| | | ORDER BY COUNT(tm.user_id) DESC LIMIT 15 |
| | | ORDER BY mapValue DESC LIMIT 10 |
| | | </select> |
| | | |
| | | |
| | |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | import org.springframework.context.annotation.ComponentScans; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | |
| | | /** |
| | | * 系统模块 |
| | |
| | | @EnableCustomConfig |
| | | @EnableCustomSwagger2 |
| | | @EnableRyFeignClients |
| | | //@EnableScheduling |
| | | @EnableScheduling |
| | | @SpringBootApplication |
| | | @ComponentScans(value = {@ComponentScan("com.ruoyi.system.api"),@ComponentScan("com.ruoyi.common.security.utils")}) |
| | | public class RuoYiOrderApplication |
| | |
| | | |
| | | @RequestMapping(value = "/pageMerMemberOrder", method = RequestMethod.POST) |
| | | @ApiOperation(value = "分页商户端用户收银记录") |
| | | public R<Page<MerMemberNoClearOrderVo>> pageMerMemberOrder(@RequestBody MerMemberNoClearOrderDto merMemberNoClearOrderDto) { |
| | | public R<Page<MerMemberOrderVo>> pageMerMemberOrder(@RequestBody MerMemberNoClearOrderDto merMemberNoClearOrderDto) { |
| | | Long userId = SecurityUtils.getUserId(); |
| | | merMemberNoClearOrderDto.setUserId(userId); |
| | | Page<MerMemberNoClearOrderVo> page = new Page<>(); |
| | | Page<MerMemberOrderVo> page = new Page<>(); |
| | | page.setSize(merMemberNoClearOrderDto.getPageSize()); |
| | | page.setCurrent(merMemberNoClearOrderDto.getPageNum()); |
| | | List<MerMemberNoClearOrderVo> merMemberNoClearOrderVoList = orderService.pageMerMemberOrder(page,merMemberNoClearOrderDto); |
| | | List<MerMemberOrderVo> merMemberNoClearOrderVoList = orderService.pageMerMemberOrder(page,merMemberNoClearOrderDto); |
| | | return R.ok(page.setRecords(merMemberNoClearOrderVoList)); |
| | | } |
| | | |
| | |
| | | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.order.domain.vo.MerOrderDistributionTotalVo; |
| | | import com.ruoyi.order.domain.vo.MerOrderTypeTotalVo; |
| | | import com.ruoyi.order.domain.vo.*; |
| | | import com.ruoyi.order.service.order.OrderService; |
| | | import com.ruoyi.system.api.domain.dto.StaffTotalDto; |
| | |
| | | @TableField("pay_time") |
| | | private Date payTime; |
| | | /** |
| | | * 支付类型1微信支付2店铺收银 |
| | | * 支付类型1微信支付2店铺收银3支付宝 |
| | | */ |
| | | @TableField("pay_type") |
| | | private Integer payType; |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private String goodsNurses; |
| | | |
| | | @ApiModelProperty(value = "商品建议售价") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal suggestSalesPrice;; |
| | | |
| | | @ApiModelProperty(value = "商品售价") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal salesPrice;; |
| | | |
| | | @ApiModelProperty(value="周期次数标记0否1是") |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private Integer orderStatus; |
| | | |
| | | @ApiModelProperty(value = "商品总价") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal orderGoodsMoney; |
| | | |
| | | @ApiModelProperty(value = "优惠券抵扣") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal couponDiscount; |
| | | |
| | | @ApiModelProperty(value="应收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @ApiModelProperty(value="应收订金") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal receivableDeposit; |
| | | |
| | | @ApiModelProperty(value="实收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty(value="订单已收金额") |
| | | private BigDecimal receiveMoney; |
| | | |
| | | @ApiModelProperty(value="已收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty(value = "实收金额") |
| | | private BigDecimal relReceiveMoney; |
| | | |
| | | @ApiModelProperty(value="订单实际支付金额") |
| | | private BigDecimal payMoney; |
| | | |
| | | @ApiModelProperty(value="未收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal unPaidMoney; |
| | | |
| | | @ApiModelProperty(value="创建时间") |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private Integer orderStatus; |
| | | |
| | | @ApiModelProperty(value = "商品总价") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal orderGoodsMoney; |
| | | |
| | | @ApiModelProperty(value = "优惠券抵扣") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal couponDiscount; |
| | | |
| | | @ApiModelProperty(value="应付金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @ApiModelProperty(value="应收订金") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal receivableDeposit; |
| | | |
| | | @ApiModelProperty(value="实收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal receiveMoney; |
| | | |
| | | @ApiModelProperty(value="已收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal payMoney; |
| | | |
| | | @ApiModelProperty(value="未收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal unPaidMoney; |
| | | |
| | | @ApiModelProperty(value="收款时间") |
| | |
| | | private Date receiveMoneyTime; |
| | | |
| | | @ApiModelProperty(value="收款金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal thisReceiveMoney; |
| | | |
| | | @ApiModelProperty(value="收款方式") |
| | |
| | | private Integer[] orderTotalValue; |
| | | |
| | | @ApiModelProperty(value = "订单金额value") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal[] orderMoneyValue; |
| | | |
| | | |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private Integer payType; |
| | | |
| | | @ApiModelProperty(value = "商品总价") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal orderGoodsMoney; |
| | | |
| | | @ApiModelProperty(value = "优惠券抵扣") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal couponDiscount; |
| | | |
| | | @ApiModelProperty(value="应收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @ApiModelProperty(value="应收订金") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal receivableDeposit; |
| | | |
| | | @ApiModelProperty(value="应收全额") |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @ApiModelProperty(value="订单实际支付金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal payMoney; |
| | | |
| | | @ApiModelProperty(value="订单已收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal receiveMoney; |
| | | |
| | | @ApiModelProperty(value = "实收金额") |
| | | private BigDecimal relReceiveMoney; |
| | | |
| | | @ApiModelProperty(value="订单未支付金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal unPaidMoney; |
| | | |
| | | @ApiModelProperty(value="订单备注") |
| | |
| | | private Integer serviceTotal; |
| | | |
| | | @ApiModelProperty(value = "总订单金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal orderMoney; |
| | | |
| | | @ApiModelProperty(value = "线上订单金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal onlineMoney; |
| | | |
| | | @ApiModelProperty(value = "线下订单金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal offlineMoney; |
| | | |
| | | @ApiModelProperty(value = "活动订单金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal activityMoney; |
| | | |
| | | @ApiModelProperty(value = "周期订单金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal cycleMoney; |
| | | |
| | | @ApiModelProperty(value = "体验订单金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal experienceMoney; |
| | | |
| | | @ApiModelProperty(value = "服务订单金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal serviceMoney; |
| | | |
| | | |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private Integer orderTotal; |
| | | |
| | | @ApiModelProperty(value = "应收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @ApiModelProperty(value = "实收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal relReceiveMoney; |
| | | |
| | | @ApiModelProperty(value = "已收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal relPayMoney; |
| | | |
| | | @ApiModelProperty(value = "未收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private BigDecimal unpaidMoney; |
| | | |
| | | @ApiModelProperty(value = "总订金") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | @ApiModelProperty(value = "订金") |
| | | private BigDecimal receivableDeposit; |
| | | } |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import com.ruoyi.system.api.domain.dto.MerBaseDto; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | package com.ruoyi.order.domain.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | |
| | | private Integer orderFrom; |
| | | |
| | | @ApiModelProperty(value = "商品总价") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal orderGoodsMoney; |
| | | |
| | | @ApiModelProperty(value = "优惠券抵扣") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal couponDiscount; |
| | | |
| | | @ApiModelProperty(value="应收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal receivableMoney; |
| | | |
| | | @ApiModelProperty(value="应收订金") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal receivableDeposit; |
| | | |
| | | @ApiModelProperty(value="订单商品列表") |
| | | private List<AppUserOrderGoodsPageVo> appUserOrderGoodsPageVoList; |
| | | |
| | | @ApiModelProperty(value="订单支付金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal payMoney; |
| | | |
| | | @ApiModelProperty(value="创建时间") |
| | |
| | | private String userMobile; |
| | | |
| | | @ApiModelProperty(value="实收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal realReceiveMoney; |
| | | |
| | | @ApiModelProperty(value="已收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal receiveMoney; |
| | | |
| | | @ApiModelProperty(value="未收金额") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | |
| | | private BigDecimal unReceiveMoney; |
| | | |
| | | @ApiModelProperty(value="支付方式1.全款2订金") |
| | |
| | | } |
| | | String requestBodyStr = stringBuilder.toString(); |
| | | if(StringUtils.isNotBlank(requestBodyStr)){ |
| | | return JSONObject.parseObject(stringBuilder.toString(), Map.class); |
| | | try { |
| | | return JSONObject.parseObject(stringBuilder.toString(), Map.class); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return new HashMap<>(); |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.order.domain.dto.*; |
| | | import com.ruoyi.order.domain.pojo.order.Order; |
| | | import com.ruoyi.order.domain.vo.MerMemberNoClearOrderVo; |
| | | import com.ruoyi.order.domain.vo.MerOrderPageVo; |
| | | import com.ruoyi.order.domain.vo.MerOrderTotalVo; |
| | | import com.ruoyi.order.domain.vo.MerTotalOrderVo; |
| | | import com.ruoyi.order.domain.vo.*; |
| | | import com.ruoyi.system.api.domain.dto.*; |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | List<MerMemberNoClearOrderVo> pageMerMemberNoClearOrder(Page page, @Param("userId") Long userId); |
| | | List<MerMemberNoClearOrderVo> pageMerMemberNoClearOrder(Page page, @Param("userId") Long userId); |
| | | |
| | | |
| | | |
| | |
| | | * @param merOrderPageDto |
| | | * @return |
| | | */ |
| | | List<MerOrderPageVo> pageMerOrder(Page page,@Param("param") MerOrderPageDto merOrderPageDto); |
| | | List<MerOrderPageVo> pageMerOrder(Page page, @Param("param") MerOrderPageDto merOrderPageDto); |
| | | |
| | | |
| | | /** |
| | |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | List<MerMemberNoClearOrderVo> pageMerMemberOrder(Page page, @Param("userId") Long userId); |
| | | List<MerMemberOrderVo> pageMerMemberOrder(Page page, @Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 获取用户订单统计 |
| | |
| | | for (AppMemberCouponVo entity : appMemberCouponVoList) { |
| | | if (StringUtils.isBlank(entity.getRelGoodsIds()) || entity.getRelGoodsIds().contains(sureOrderGoodsVo.getGoodsId())) { |
| | | if (entity.getCouponType() == 1) { |
| | | if (entity.getMoneyThreshold().compareTo(sureOrderGoodsVo.getGoodsTotalPrice()) < 0 && entity.getDiscountMoney().compareTo(sureOrderGoodsVo.getGoodsTotalPrice()) < 0) { |
| | | if (entity.getMoneyThreshold().compareTo(sureOrderGoodsVo.getGoodsTotalPrice()) <= 0) { |
| | | appGoodsMemberCouponVoList.add(entity); |
| | | } |
| | | /*if (entity.getMoneyThreshold().compareTo(sureOrderGoodsVo.getGoodsTotalPrice()) < 0 && entity.getDiscountMoney().compareTo(sureOrderGoodsVo.getGoodsTotalPrice()) < 0) { |
| | | appGoodsMemberCouponVoList.add(entity); |
| | | }*/ |
| | | } else if (entity.getCouponType() == 2) { |
| | | appGoodsMemberCouponVoList.add(entity); |
| | | } else if (entity.getCouponType() == 3) { |
| | | if (entity.getDiscountMoney().compareTo(sureOrderGoodsVo.getGoodsTotalPrice()) < 0) { |
| | | appGoodsMemberCouponVoList.add(entity); |
| | | /*if (entity.getDiscountMoney().compareTo(sureOrderGoodsVo.getGoodsTotalPrice()) < 0) { |
| | | appGoodsMemberCouponVoList.add(entity); |
| | | } |
| | | }*/ |
| | | } |
| | | |
| | | } |
| | |
| | | goodsRealPrice = goodsTotalPrice.subtract(discountMoney); |
| | | useCoupon = 1; |
| | | } |
| | | if(goodsRealPrice.compareTo(BigDecimal.ZERO)<0){ |
| | | goodsRealPrice = BigDecimal.ZERO; |
| | | discountMoney = goodsTotalPrice; |
| | | } |
| | | } |
| | | memberCouponSJ.add(memberCouponId); |
| | | } |
| | |
| | | order.setDiscountMoney(couponDiscount); |
| | | order.setReceivableMoney(orderPayMoney); |
| | | order.setReceivableDeposit(orderPayDeposit); |
| | | order.setOfflinePayMoney(BigDecimal.ZERO); |
| | | // 根据支付类型计算支付金额 |
| | | if (appPlaceOrderDto.getPayType() == 1) { |
| | | order.setPayMoney(orderPayMoney); |
| | | order.setOnlinePayMoney(orderPayMoney); |
| | | appPlaceOrderVo.setPayMoney(orderPayMoney); |
| | | appPlaceOrderVo.setUnpaidMoney(order.getReceivableMoney().subtract(order.getPayMoney())); |
| | | order.setChangeReceivableMoney(orderGoodsMoney.subtract(couponDiscount)); |
| | | order.setPayType(1); |
| | | order.setCloseFlag(1); |
| | | } else if (appPlaceOrderDto.getPayType() == 2) { |
| | |
| | | order.setOnlinePayMoney(orderPayDeposit); |
| | | appPlaceOrderVo.setPayMoney(orderPayDeposit); |
| | | appPlaceOrderVo.setUnpaidMoney(order.getReceivableMoney().subtract(order.getPayMoney())); |
| | | order.setChangeReceivableMoney(orderGoodsMoney.subtract(couponDiscount).subtract(orderPayDeposit)); |
| | | order.setPayType(2); |
| | | order.setCloseFlag(0); |
| | | } |
| | | order.setChangeReceivableMoney(appPlaceOrderVo.getUnpaidMoney()); |
| | | order.setOrderRemark(appPlaceOrderDto.getOrderRemark()); |
| | | order.setGoodsNum(goodsNum); |
| | | order.setCreateTime(new Date()); |
| | |
| | | order.setReceivableDeposit(orderPayDeposit); |
| | | order.setActivityId(activityId); |
| | | order.setActivityName(activityGoodsGetVo.getActivityName()); |
| | | order.setOfflinePayMoney(BigDecimal.ZERO); |
| | | // 根据支付类型设置订单支付金额,在线支付金额,订单支付金额,未支付金额,关闭标志 |
| | | if (appPlaceActivityDto.getPayType() == 1) { |
| | | order.setPayMoney(orderPayMoney); |
| | |
| | | merVerifyOrderVo.setCouponDiscount(order.getCouponMoney()); |
| | | merVerifyOrderVo.setReceivableDeposit(order.getReceivableDeposit()); |
| | | if(order.getPayType()==1){ |
| | | merVerifyOrderVo.setReceivableMoney(order.getOrderMoney().subtract(order.getPayMoney())); |
| | | merVerifyOrderVo.setReceivableMoney(order.getReceivableMoney()); |
| | | }else{ |
| | | merVerifyOrderVo.setReceivableMoney(order.getOrderMoney().subtract(order.getCouponMoney()).subtract(order.getReceivableDeposit())); |
| | | } |
| | |
| | | consumerGoods.setSourceFrom(1); |
| | | consumerGoodsList.add(consumerGoods); |
| | | } |
| | | remoteCouponService.useMemberCoupon(memberCoupon.getId()); |
| | | consumerGoodsService.saveBatchConsumerGoods(consumerGoodsList); |
| | | merVerifyCouponVo.setVerifyStatus(2); |
| | | return merVerifyCouponVo; |
| | |
| | | throw new ServiceException(AppErrorConstant.COUPON_USED); |
| | | } |
| | | ShopRelUserVo shopRelUserVo = remoteShopService.getShopByUserId(merVerifyPrizeDto.getUserId()).getData(); |
| | | if (!shopRelUserVo.getShopId().equals(memberGiftRecord.getShopId())) { |
| | | Shop shop = remoteShopService.getShop(shopRelUserVo.getShopId()).getData(); |
| | | if (memberGiftRecord.getGiftFrom() == 1) { |
| | | BirthdayCard birthdayCard = remoteMemberService.getBirthdayCard().getData(); |
| | | if(birthdayCard!=null){ |
| | | //判断指定区域全部店铺 |
| | | if(birthdayCard.getAreaFlag()==2&&birthdayCard.getShopFlag()==1&&!StringUtils.checkString(birthdayCard.getDesignatedArea(),shop.getShopCityCode())){ |
| | | throw new ServiceException(AppErrorConstant.VERIFY_SHOP_ERROR); |
| | | } |
| | | //判断指定店铺 |
| | | if(birthdayCard.getShopFlag()==2&&!StringUtils.checkString(birthdayCard.getApplicableShop(),shop.getShopId().toString())){ |
| | | throw new ServiceException(AppErrorConstant.VERIFY_SHOP_ERROR); |
| | | } |
| | | }else{ |
| | | throw new ServiceException(AppErrorConstant.VERIFY_SHOP_ERROR); |
| | | } |
| | | } |
| | | if (memberGiftRecord.getGiftFrom() == 2 && !memberGiftRecord.getShopId().equals(shop.getShopId())) { |
| | | throw new ServiceException(AppErrorConstant.VERIFY_SHOP_ERROR); |
| | | } |
| | | Member member = remoteMemberService.getMember(memberGiftRecord.getUserId()).getData(); |
| | | if(member.getBindingFlag()==0){ |
| | | //绑定用户 |
| | | if(shop==null){ |
| | | shop = remoteShopService.getShop(shop.getShopId()).getData(); |
| | | } |
| | | AppMemberBindingDto appMemberBindingDto = new AppMemberBindingDto(); |
| | | appMemberBindingDto.setBindingFlag(1); |
| | | appMemberBindingDto.setShopId(shop.getShopId()); |
| | | appMemberBindingDto.setShopName(shop.getShopName()); |
| | | appMemberBindingDto.setUserId(memberGiftRecord.getUserId()); |
| | | remoteMemberService.updateMemberBinding(appMemberBindingDto); |
| | | } |
| | | merVerifyAwardVo.setUserName(member.getRealName()); |
| | | merVerifyAwardVo.setUserMobile(member.getMobile()); |
| | | if (memberGiftRecord.getGiftFrom() == 1) { |
| | |
| | | break; |
| | | } |
| | | merVerifyAwardVo.setCreateTime(memberGiftRecord.getCreateTime()); |
| | | memberGiftRecord.setVerifyStatus(2); |
| | | memberGiftRecord.setVerifyTime(new Date()); |
| | | MerVerifyPrizeFinalDto merVerifyPrizeFinalDto = new MerVerifyPrizeFinalDto(); |
| | | merVerifyPrizeFinalDto.setPrizeId(memberGiftRecord.getPrizeId()); |
| | | merVerifyPrizeFinalDto.setShopId(shop.getShopId()); |
| | | remoteMemberService.verifyPrize(merVerifyPrizeFinalDto); |
| | | if (member.getBindingFlag() != 1) { |
| | | AppMemberBindingDto appMemberBindingDto = new AppMemberBindingDto(); |
| | | appMemberBindingDto.setBindingFlag(1); |
| | | appMemberBindingDto.setShopId(merVerifyPrizeDto.getShopId()); |
| | | Shop shop = remoteShopService.getShop(merVerifyPrizeDto.getShopId()).getData(); |
| | | appMemberBindingDto.setShopName(shop.getShopName()); |
| | | appMemberBindingDto.setUserId(merVerifyPrizeDto.getUserId()); |
| | | remoteMemberService.updateMemberBinding(appMemberBindingDto); |
| | |
| | | order.setOffPayTime(new Date()); |
| | | order.setPayMoney(order.getPayMoney().add(merCloseOrderDto.getPayMoney())); |
| | | if (order.getPayMoney().compareTo(order.getChangeReceivableMoney()) >= 0) { |
| | | order.setCloseFlag(0); |
| | | } else { |
| | | order.setCloseFlag(1); |
| | | } else { |
| | | order.setCloseFlag(0); |
| | | } |
| | | this.saveOrUpdate(order); |
| | | //创建支付记录 |
| | |
| | | order.setOffPayTime(nowTime); |
| | | order.setPayType(1); |
| | | if (order.getPayMoney().compareTo(order.getChangeReceivableMoney()) >= 0) { |
| | | order.setCloseFlag(0); |
| | | } else { |
| | | order.setCloseFlag(1); |
| | | } else { |
| | | order.setCloseFlag(0); |
| | | } |
| | | this.save(order); |
| | | //创建服务 |
| | |
| | | payRecord.setDelFlag(0); |
| | | payRecord.setOrderId(orderId); |
| | | payRecord.setPayMoney(order.getPayMoney()); |
| | | payRecord.setPayTime(order.getPayTime()); |
| | | payRecord.setPayTime(order.getOffPayTime()); |
| | | payRecord.setPayType(2); |
| | | payRecordService.save(payRecord); |
| | | } |
| | |
| | | if (orderFrom == 1) { |
| | | orderFromDesc = "商城订单"; |
| | | } else if(orderFrom == 2){ |
| | | |
| | | orderFromDesc = "店铺砍价活动("+merOrderPageVo.getActivityName()+")"; |
| | | } else { |
| | | orderFromDesc = "线下创建"; |
| | |
| | | orderFromDesc = "商城订单"; |
| | | } |
| | | merOrderPageVo.setOrderFromDesc(orderFromDesc); |
| | | merOrderPageVo.setUnPaidMoney(merOrderPageVo.getPayMoney().subtract(merOrderPageVo.getReceiveMoney())); |
| | | if (merOrderPageVo.getUnPaidMoney() == null) { |
| | | merOrderPageVo.setUnPaidMoney(zeroBig); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | @Override |
| | | public List<MerMemberNoClearOrderVo> pageMerMemberOrder(Page page, MerMemberNoClearOrderDto merMemberNoClearOrderDto) { |
| | | List<MerMemberNoClearOrderVo> merMemberNoClearOrderVoList = orderMapper.pageMerMemberOrder(page, merMemberNoClearOrderDto.getMemberUserId()); |
| | | public List<MerMemberOrderVo> pageMerMemberOrder(Page page, MerMemberNoClearOrderDto merMemberNoClearOrderDto) { |
| | | List<MerMemberOrderVo> merMemberNoClearOrderVoList = orderMapper.pageMerMemberOrder(page, merMemberNoClearOrderDto.getMemberUserId()); |
| | | if (merMemberNoClearOrderVoList != null && !merMemberNoClearOrderVoList.isEmpty()) { |
| | | BigDecimal zeroBig = new BigDecimal("0.00"); |
| | | for (MerMemberNoClearOrderVo merMemberNoClearOrderVo : merMemberNoClearOrderVoList) { |
| | | merMemberNoClearOrderVo.setUnPaidMoney(merMemberNoClearOrderVo.getReceivableMoney().subtract(merMemberNoClearOrderVo.getPayMoney())); |
| | | for (MerMemberOrderVo merMemberNoClearOrderVo : merMemberNoClearOrderVoList) { |
| | | if (merMemberNoClearOrderVo.getUnPaidMoney() == null) { |
| | | merMemberNoClearOrderVo.setUnPaidMoney(zeroBig); |
| | | } |
| | |
| | | merVerifyCouponVo.setUserName(member.getRealName()); |
| | | merVerifyCouponVo.setUserMobile(member.getMobile()); |
| | | merVerifyCouponVo.setCouponFrom(verifyCouponGetVo.getCouponFrom()); |
| | | merVerifyCouponVo.setCouponName(verifyCouponGetVo.getMemberCoupon().getCouponName()); |
| | | merVerifyCouponVo.setCreateTime(verifyCouponGetVo.getMemberCoupon().getReceiveTime()); |
| | | merVerifyCouponVo.setCouponName(memberCoupon.getCouponName()); |
| | | merVerifyCouponVo.setCreateTime(memberCoupon.getReceiveTime()); |
| | | // 将goodsList转换为MerCouponGoodsListVo列表,并设置相应属性 |
| | | List<MerCouponGoodsListVo> merCouponGoodsList = goodsList.stream() |
| | | .map(goods -> { |
| | |
| | | // 设置merVerifyCouponVo的goodsList属性为merCouponGoodsList |
| | | merVerifyCouponVo.setGoodsList(merCouponGoodsList); |
| | | merVerifyCouponVo.setVerifyStatus(1); |
| | | merVerifyCouponVo.setMemberCouponId(memberCoupon.getId()); |
| | | return merVerifyCouponVo; |
| | | } |
| | | |
| | |
| | | throw new ServiceException(AppErrorConstant.COUPON_USED); |
| | | } |
| | | Shop shop = null; |
| | | Member member = remoteMemberService.getMember(memberGiftRecord.getUserId()).getData(); |
| | | if (memberGiftRecord.getGiftFrom() == 1) { |
| | | BirthdayCard birthdayCard = remoteMemberService.getBirthdayCard().getData(); |
| | | if(birthdayCard!=null){ |
| | |
| | | if (memberGiftRecord.getGiftFrom() == 2 && !memberGiftRecord.getShopId().equals(shopId)) { |
| | | throw new ServiceException(AppErrorConstant.VERIFY_SHOP_ERROR); |
| | | } |
| | | Member member = remoteMemberService.getMember(memberGiftRecord.getUserId()).getData(); |
| | | if(member.getBindingFlag()==0){ |
| | | //绑定用户 |
| | | if(shop==null){ |
| | | shop = remoteShopService.getShop(shopId).getData(); |
| | | } |
| | | AppMemberBindingDto appMemberBindingDto = new AppMemberBindingDto(); |
| | | appMemberBindingDto.setBindingFlag(1); |
| | | appMemberBindingDto.setShopId(shopId); |
| | | appMemberBindingDto.setShopName(shop.getShopName()); |
| | | appMemberBindingDto.setUserId(memberGiftRecord.getUserId()); |
| | | remoteMemberService.updateMemberBinding(appMemberBindingDto); |
| | | } |
| | | |
| | | |
| | | merVerifyAwardVo.setUserName(member.getRealName()); |
| | | merVerifyAwardVo.setUserMobile(member.getMobile()); |
| | | if (memberGiftRecord.getGiftFrom() == 1) { |
| | |
| | | import com.github.binarywang.wxpay.bean.ecommerce.PartnerTransactionsResult; |
| | | import com.github.binarywang.wxpay.bean.ecommerce.RefundNotifyResult; |
| | | import com.github.binarywang.wxpay.bean.profitsharingV3.ProfitSharingNotifyResult; |
| | | import com.ruoyi.order.domain.dto.MerVerifyPrizeDto; |
| | | import com.ruoyi.order.domain.dto.*; |
| | | import com.ruoyi.order.domain.pojo.order.Order; |
| | | import com.ruoyi.order.domain.vo.*; |
| | |
| | | import com.ruoyi.system.api.domain.vo.MerHomeShopTotalVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtBulletinBoardVo; |
| | | import com.ruoyi.system.api.domain.vo.MgtMapIntTotalVo; |
| | | import com.wechat.pay.java.service.partnerpayments.jsapi.model.Transaction; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | |
| | | * @param merOrderPageDto |
| | | * @return |
| | | */ |
| | | List<MerOrderPageVo> pageMerOrder(Page page,MerOrderPageDto merOrderPageDto); |
| | | List<MerOrderPageVo> pageMerOrder(Page page, MerOrderPageDto merOrderPageDto); |
| | | |
| | | /** |
| | | * 分页商户端用户收银记录 |
| | |
| | | * @param merMemberNoClearOrderDto |
| | | * @return |
| | | */ |
| | | List<MerMemberNoClearOrderVo> pageMerMemberOrder(Page page, MerMemberNoClearOrderDto merMemberNoClearOrderDto); |
| | | List<MerMemberOrderVo> pageMerMemberOrder(Page page, MerMemberNoClearOrderDto merMemberNoClearOrderDto); |
| | | |
| | | /** |
| | | * 获取用户订单统计 |
| | |
| | | * @description 商户端订单管理统计 |
| | | * @author jqs |
| | | * @date 2023/7/4 16:27 |
| | | * @param merBaseDto |
| | | * @param merOrderPageDto |
| | | * @return MerTotalOrderVo |
| | | */ |
| | | MerTotalOrderVo totalMerOrder(MerOrderPageDto merOrderPageDto); |
| | |
| | | * @description 订单支付回调 |
| | | * @author jqs |
| | | * @date 2023/7/13 17:57 |
| | | * @param Transaction transaction |
| | | * @param transaction |
| | | * @return void |
| | | */ |
| | | void payBack(PartnerTransactionsResult transaction); |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | config: |
| | | # 配置中心地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | # 配置文件格式 |
| | | file-extension: yml |
| | | # 共享配置 |
| | |
| | | <result column="couponDiscount" property="couponDiscount"/> |
| | | <result column="receivableMoney" property="receivableMoney"/> |
| | | <result column="receivableDeposit" property="receivableDeposit"/> |
| | | <result column="relReceiveMoney" property="relReceiveMoney"/> |
| | | <result column="payMoney" property="payMoney"/> |
| | | <result column="receiveMoney" property="receiveMoney"/> |
| | | <result column="unPaidMoney" property="unPaidMoney"/> |
| | | <result column="orderRemark" property="orderRemark" /> |
| | | <result column="orderFrom" property="orderFrom" /> |
| | | <result column="createTime" property="createTime" /> |
| | |
| | | toc.order_status orderStatus, |
| | | toc.order_money orderGoodsMoney, |
| | | toc.coupon_money couponDiscount, |
| | | toc.receivable_money receivableMoney, |
| | | CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN toc.order_money-toc.coupon_money-toc.online_pay_money END receivableMoney, |
| | | toc.receivable_deposit receivableDeposit, |
| | | toc.change_receivable_money receiveMoney, |
| | | IFNULL(toc.offline_pay_money,0) payMoney, |
| | | toc.change_receivable_money-IFNULL(toc.offline_pay_money,0) unPaidMoney, |
| | | toc.pay_money payMoney, |
| | | toc.change_receivable_money relReceiveMoney, |
| | | CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN IFNULL(toc.offline_pay_money,0) END receiveMoney, |
| | | toc.change_receivable_money - (CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN IFNULL(toc.offline_pay_money,0) END) unPaidMoney, |
| | | toc.create_time createTime |
| | | FROM t_order toc |
| | | WHERE toc.del_flag = 0 AND toc.user_id = #{userId} AND toc.order_status >= 2 AND toc.close_flag = 0 |
| | |
| | | toc.order_status orderStatus, |
| | | toc.order_money orderGoodsMoney, |
| | | toc.coupon_money couponDiscount, |
| | | toc.receivable_money-toc.online_pay_money receivableMoney, |
| | | CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN toc.order_money-toc.coupon_money-toc.online_pay_money END receivableMoney, |
| | | toc.receivable_deposit receivableDeposit, |
| | | toc.change_receivable_money payMoney, |
| | | IFNULL(toc.offline_pay_money,0) receiveMoney, |
| | | toc.pay_money payMoney, |
| | | toc.change_receivable_money relReceiveMoney, |
| | | CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN IFNULL(toc.offline_pay_money,0) END receiveMoney, |
| | | toc.change_receivable_money - (CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN IFNULL(toc.offline_pay_money,0) END) unPaidMoney, |
| | | toc.order_remark orderRemark, |
| | | tog.goods_name goodsName, |
| | | tog.goods_type goodsType, |
| | |
| | | ORDER BY toc.create_time DESC |
| | | </select> |
| | | |
| | | <select id="pageMerMemberOrder" resultType="com.ruoyi.order.domain.vo.MerMemberNoClearOrderVo"> |
| | | SELECT |
| | | toc.order_id orderId, |
| | | toc.order_no orderNo, |
| | | toc.order_status orderStatus, |
| | | toc.order_money orderGoodsMoney, |
| | | toc.coupon_money couponDiscount, |
| | | toc.receivable_money-toc.online_pay_money receivableMoney, |
| | | toc.receivable_deposit receivableDeposit, |
| | | toc.change_receivable_money payMoney, |
| | | IFNULL(toc.offline_pay_money,0) receiveMoney, |
| | | IFNULL(toc.receivable_money-IFNULL(CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN IFNULL(toc.offline_pay_money,0) END,0),0) unpaidMoney, |
| | | tpr.pay_time receiveMoneyTime, |
| | | tpr.pay_money thisReceiveMoney, |
| | | CASE tpr.pay_type WHEN 1 THEN "微信" WHEN 2 THEN "现金" WHEN 3 THEN "支付宝" END thisReceiveType |
| | | FROM t_pay_record tpr |
| | | INNER JOIN t_order toc ON tpr.order_id = toc.order_id |
| | | WHERE toc.del_flag = 0 AND toc.user_id = #{userId} AND (toc.order_status = 2 OR toc.order_status = 3) |
| | | ORDER BY toc.create_time DESC |
| | | </select> |
| | | |
| | | |
| | | <select id="getMgtMemberOrderTotal" resultType="com.ruoyi.order.domain.vo.MgtMemberOrderTotalVo"> |
| | | SELECT |
| | |
| | | </select> |
| | | |
| | | <select id="getMemberUnpaidOrder" resultType="java.math.BigDecimal"> |
| | | SELECT IFNULL(SUM(receivable_money-pay_money),0) |
| | | FROM t_order |
| | | WHERE del_flag = 0 AND user_id = #{param.userId} AND shop_id = #{param.shopId} AND order_status IN (1,2) AND close_flag = 0 |
| | | SELECT IFNULL(SUM(toc.change_receivable_money-IFNULL(CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN IFNULL(toc.offline_pay_money,0) END,0)),0) |
| | | FROM t_order toc |
| | | WHERE toc.del_flag = 0 AND toc.user_id = #{param.userId} AND toc.shop_id = #{param.shopId} AND toc.order_status IN (2,3) AND toc.close_flag = 0 |
| | | </select> |
| | | |
| | | |
| | |
| | | <select id="totalMerOrder" resultType="com.ruoyi.order.domain.vo.MerTotalOrderVo"> |
| | | SELECT |
| | | COUNT(toc.order_id) orderTotal, |
| | | IFNULL(SUM(toc.receivable_money-IFNULL(toc.online_pay_money,0)),0) receivableMoney, |
| | | IFNULL(SUM(CASE toc.pay_type WHEN 1 THEN toc.receivable_money WHEN 2 THEN order_money-coupon_money-online_pay_money END),0) receivableMoney, |
| | | IFNULL(SUM(toc.change_receivable_money),0) relReceiveMoney, |
| | | IFNULL(SUM(CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN IFNULL(toc.offline_pay_money,0) END),0) relPayMoney, |
| | | IFNULL(SUM(toc.change_receivable_money-IFNULL(CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN IFNULL(toc.offline_pay_money,0) END,0)),0) unpaidMoney, |
| | |
| | | ORDER BY toc.create_time DESC |
| | | </select> |
| | | |
| | | |
| | | <select id="pageMerMemberOrder" resultType="com.ruoyi.order.domain.vo.MerMemberOrderVo"> |
| | | SELECT |
| | | toc.order_id orderId, |
| | | toc.order_no orderNo, |
| | | toc.order_status orderStatus, |
| | | toc.order_money orderGoodsMoney, |
| | | toc.coupon_money couponDiscount, |
| | | CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN toc.order_money-toc.coupon_money-toc.online_pay_money END receivableMoney, |
| | | toc.receivable_deposit receivableDeposit, |
| | | toc.pay_money payMoney, |
| | | toc.change_receivable_money relReceiveMoney, |
| | | CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN IFNULL(toc.offline_pay_money,0) END receiveMoney, |
| | | toc.change_receivable_money - (CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN IFNULL(toc.offline_pay_money,0) END) unPaidMoney, |
| | | tpr.pay_time receiveMoneyTime, |
| | | tpr.pay_money thisReceiveMoney, |
| | | CASE tpr.pay_type WHEN 1 THEN "微信" WHEN 2 THEN "现金" WHEN 3 THEN "支付宝" END thisReceiveType |
| | | FROM t_pay_record tpr |
| | | INNER JOIN t_order toc ON tpr.order_id = toc.order_id |
| | | WHERE toc.del_flag = 0 AND toc.user_id = #{userId} AND (toc.order_status = 2 OR toc.order_status = 3) |
| | | ORDER BY toc.create_time DESC |
| | | </select> |
| | | |
| | | <select id="pageMerMemberPayOrder" resultMap="merOrderResultMap"> |
| | | SELECT |
| | | toc.user_id userId, |
| | |
| | | toc.order_status orderStatus, |
| | | toc.order_money orderGoodsMoney, |
| | | toc.coupon_money couponDiscount, |
| | | toc.receivable_money-toc.online_pay_money receivableMoney, |
| | | CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN toc.order_money-toc.coupon_money-toc.online_pay_money END receivableMoney, |
| | | toc.receivable_deposit receivableDeposit, |
| | | toc.change_receivable_money payMoney, |
| | | IFNULL(toc.offline_pay_money,0) receiveMoney, |
| | | toc.pay_money payMoney, |
| | | toc.change_receivable_money relReceiveMoney, |
| | | CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN IFNULL(toc.offline_pay_money,0) END receiveMoney, |
| | | toc.change_receivable_money - (CASE toc.pay_type WHEN 1 THEN toc.online_pay_money WHEN 2 THEN IFNULL(toc.offline_pay_money,0) END) unPaidMoney, |
| | | toc.order_remark orderRemark, |
| | | tog.goods_name goodsName, |
| | | tog.goods_type goodsType, |
| | |
| | | pay_time payTime, |
| | | pay_money payMoney, |
| | | CASE pay_type |
| | | WHEN 1 THEN "微信支付" |
| | | WHEN 2 THEN "店铺收银" |
| | | WHEN 1 THEN "微信" |
| | | WHEN 2 THEN "现金" |
| | | WHEN 3 THEN "支付宝" |
| | | END payType |
| | | FROM t_pay_record |
| | | WHERE del_flag = 0 AND order_id = #{orderId} |
| | |
| | | <artifactId>cxf-rt-rs-extension-providers</artifactId> |
| | | <version>4.0.2</version> |
| | | </dependency> |
| | | |
| | | <!-- 阿里云OBS --> |
| | | <dependency> |
| | | <groupId>com.aliyun.oss</groupId> |
| | | <artifactId>aliyun-sdk-oss</artifactId> |
| | | <version>3.15.1</version> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | |
| | | @EnableCustomSwagger2 |
| | | @EnableRyFeignClients |
| | | @SpringBootApplication |
| | | //@EnableScheduling |
| | | @EnableScheduling |
| | | @ComponentScans(value = {@ComponentScan("com.ruoyi.system.api"),@ComponentScan("com.ruoyi.common.security.utils")}) |
| | | public class RuoYiShopApplication |
| | | { |
| | |
| | | package com.ruoyi.shop.config; |
| | | |
| | | import com.github.binarywang.wxpay.config.WxPayConfig; |
| | | import com.github.binarywang.wxpay.service.WxPayService; |
| | | import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; |
| | | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | /** |
| | |
| | | public class WxPayConfiguration { |
| | | private WxPayProperties properties; |
| | | |
| | | /*@Bean |
| | | @Bean |
| | | @ConditionalOnMissingBean |
| | | public WxPayService wxService() { |
| | | WxPayConfig payConfig = new WxPayConfig(); |
| | |
| | | WxPayService wxPayService = new WxPayServiceImpl(); |
| | | wxPayService.setConfig(payConfig); |
| | | return wxPayService; |
| | | }*/ |
| | | } |
| | | |
| | | } |
| | |
| | | shopStaffService.editMgtShopStaff(mgtShopStaffEditDto); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/8/10 23:01 |
| | | * @param cityCodes |
| | | * @return R<List<Long>> |
| | | */ |
| | | @PostMapping("/listShopIdByCityCode") |
| | | R<List<Long>> listShopIdByCityCode(@RequestBody List<String> cityCodes){ |
| | | List<Long> shopIdList = shopService.listShopIdByCityCode(cityCodes); |
| | | return R.ok(shopIdList); |
| | | } |
| | | |
| | | @PostMapping("/authShop") |
| | | R authShop(){ |
| | | shopService.authShop(); |
| | | return R.ok(); |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty(value="自定义跟进类型") |
| | | private String customeFollowType; |
| | | |
| | | |
| | | @ApiModelProperty(value="拨打电话") |
| | | private String callPhone; |
| | | |
| | |
| | | @ApiModelProperty(value="下次任务时间") |
| | | private String nextTaskDate; |
| | | |
| | | @ApiModelProperty(value="下次任务紧急情况") |
| | | private String emergencyState;; |
| | | |
| | | @ApiModelProperty(value="下次任务内容") |
| | | private String nextTaskContent; |
| | |
| | | package com.ruoyi.shop.domain.vo; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | private String shopownerPhone; |
| | | |
| | | @ApiModelProperty(value="合作期限") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | @JsonFormat(pattern = "yyyy-MM-dd") |
| | | private Date cooperationEndTime; |
| | | |
| | | |
| | |
| | | } |
| | | String requestBodyStr = stringBuilder.toString(); |
| | | if(StringUtils.isNotBlank(requestBodyStr)){ |
| | | return JSONObject.parseObject(stringBuilder.toString(), Map.class); |
| | | try { |
| | | return JSONObject.parseObject(stringBuilder.toString(), Map.class); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return new HashMap<>(); |
| | | } |
| | |
| | | * @return void |
| | | */ |
| | | void updateExtendContacts(Shop shop); |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/8/10 22:54 |
| | | * @param cityCodes |
| | | * @return List<Long> |
| | | */ |
| | | List<Long> listShopIdByCityCode(List<String> cityCodes); |
| | | } |
| | |
| | | package com.ruoyi.shop.scheduler; |
| | | |
| | | |
| | | import com.ruoyi.common.core.utils.bean.BeanUtils; |
| | | import com.ruoyi.common.core.utils.uuid.IdUtils; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopAuthentication; |
| | | import com.ruoyi.shop.service.shop.ShopService; |
| | | import com.ruoyi.shop.service.task.ShopTaskService; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.scheduling.annotation.Scheduled; |
| | |
| | | } |
| | | |
| | | /** |
| | | * 0 0/1 * * * ? |
| | | * 定时检查 每分钟检查一次 微信二级商户进件状态 |
| | | * 0 0/30 * * * ? |
| | | * 定时检查 每30分钟检查一次 微信二级商户进件状态 |
| | | */ |
| | | @Scheduled(cron="0 0/1 * * * ?") |
| | | @Scheduled(cron="0 0/30 * * * ?") |
| | | private void queryEcommerceApplyMentsStatus(){ |
| | | if(schedulerUtils.getSchedulerRun()) { |
| | | log.info("--------------------定时检查微信二级商户进件状态任务开始执行--------------------"); |
| | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsStatusResult; |
| | | import com.github.binarywang.wxpay.exception.WxPayException; |
| | | import com.ruoyi.common.core.constant.CacheConstants; |
| | | import com.ruoyi.common.core.exception.ServiceException; |
| | |
| | | import com.ruoyi.shop.domain.pojo.shop.*; |
| | | import com.ruoyi.shop.domain.pojo.task.ShopFile; |
| | | import com.ruoyi.shop.domain.vo.*; |
| | | import com.ruoyi.shop.enums.WxApplyMentStateEnum; |
| | | import com.ruoyi.shop.mapper.shop.ShopMapper; |
| | | import com.ruoyi.shop.service.shop.*; |
| | | import com.ruoyi.shop.service.task.MemberTaskService; |
| | |
| | | } |
| | | merHomeShopTotalVo.setShopId(shopId); |
| | | Shop shop = this.getById(shopId); |
| | | if(shop.getFrozenFlag()==1){ |
| | | String userKey = SecurityUtils.getUserKey(); |
| | | redisService.deleteObject(CacheConstants.LOGIN_TOKEN_KEY+userKey); |
| | | throw new ServiceException("商户已被冻结",401); |
| | | } |
| | | merHomeShopTotalVo.setShopType(shop.getShopType()); |
| | | MerHomeShopTotalVo orderVo = remoteOrderService.getMerHomeTotal(merHomeShopTotalVo).getData(); |
| | | ShopTotal shopTotal = shopTotalService.getById(shopId); |
| | |
| | | * @param applymentId |
| | | */ |
| | | private void queryApplyStatusByApplymentId(String applymentId, Long shopId) { |
| | | /*try { |
| | | try { |
| | | if (StringUtils.isNotBlank(applymentId)) { |
| | | ApplymentsStatusResult result = wechatPayUtils.queryApplyStatusByApplymentId(applymentId); |
| | | shopAuthenticationService.updateAuditStatusByApplymentId(applymentId, result); |
| | |
| | | } |
| | | } catch (WxPayException e) { |
| | | e.printStackTrace(); |
| | | }*/ |
| | | } |
| | | } |
| | | |
| | | /** |
| | |
| | | .set(Shop::getAuthFlag, 1); |
| | | this.update(updateWrapper); |
| | | } |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/8/10 22:53 |
| | | * @param cityCodes |
| | | * @return List<Long> |
| | | */ |
| | | @Override |
| | | public List<Long> listShopIdByCityCode(List<String> cityCodes){ |
| | | return shopMapper.listShopIdByCityCode(cityCodes); |
| | | } |
| | | |
| | | @Override |
| | | public void authShop(){ |
| | | ShopAuthentication shopAuthentication = shopAuthenticationService.getById("8c23fa423beb4673a0edc641a1ca0c23"); |
| | | Shop shop = this.getByShopId(shopAuthentication.getShopId()); |
| | | try { |
| | | wechatPayUtils.ecommerceApply(shopAuthentication,shopAuthentication.getApplyNumber(),shop); |
| | | |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | } |
| | | } |
| | |
| | | memberTask.setUserId(oldMemberTask.getUserId()); |
| | | memberTask.setTaskDate(merFollowMemberTaskDto.getNextTaskDate()); |
| | | memberTask.setTaskContent(merFollowMemberTaskDto.getNextTaskContent()); |
| | | memberTask.setEmergencyState(merFollowMemberTaskDto.getEmergencyState()); |
| | | int i = merFollowMemberTaskDto.getNextTaskDate().compareTo(nowTimeStr); |
| | | if(i>0){ |
| | | memberTask.setTaskStatus(0); |
| | |
| | | * 微信二级商户进件状态 定时任务检测 |
| | | */ |
| | | void queryEcommerceApplyMentsStatus(); |
| | | |
| | | /** |
| | | * @description |
| | | * @author jqs |
| | | * @date 2023/8/10 22:54 |
| | | * @param cityCodes |
| | | * @return List<Long> |
| | | */ |
| | | List<Long> listShopIdByCityCode(List<String> cityCodes); |
| | | |
| | | void authShop(); |
| | | } |
New file |
| | |
| | | package com.ruoyi.shop.util; |
| | | |
| | | import com.aliyun.oss.OSS; |
| | | import com.aliyun.oss.OSSClientBuilder; |
| | | import com.aliyun.oss.model.OSSObject; |
| | | |
| | | import java.io.InputStream; |
| | | |
| | | /** |
| | | * @author jqs34 |
| | | * @version 1.0 |
| | | * @classname OBSUploadUtils |
| | | * @description: TODO |
| | | * @date 2023 2023/5/1 15:40 |
| | | */ |
| | | public class OBSUploadUtils { |
| | | |
| | | public static void main(String[] args) throws Exception { |
| | | } |
| | | |
| | | protected static OSS createOss(){ |
| | | // Endpoint以华东1(杭州)为例,其它Region请按实际情况填写。 |
| | | String endpoint = "https://oss-cn-beijing.aliyuncs.com"; |
| | | // 阿里云账号AccessKey拥有所有API的访问权限,风险很高。强烈建议您创建并使用RAM用户进行API访问或日常运维,请登录RAM控制台创建RAM用户。 |
| | | String accessKeyId = "LTAI5tAfKFuhyKFH12CTkXFj"; |
| | | String accessKeySecret = "tIBRuonHuQQPdcYrmlCdXlexOSwVXe"; |
| | | // 填写Bucket名称,例如examplebucket。 |
| | | String bucketName = "hongruitang"; |
| | | OSS ossClient = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret); |
| | | return ossClient; |
| | | } |
| | | |
| | | |
| | | |
| | | public static InputStream getOSSInputStream(String key) throws Exception { |
| | | String bucketName = "hongruitang"; |
| | | // 创建OSSClient实例。 |
| | | OSS ossClient = createOss(); |
| | | OSSObject ossObject = ossClient.getObject(bucketName,key); |
| | | InputStream inputStream = ossObject.getObjectContent(); |
| | | return inputStream; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.ruoyi.shop.util; |
| | | |
| | | import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsRequest; |
| | | import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsResult; |
| | | import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsStatusResult; |
| | | import com.github.binarywang.wxpay.bean.media.ImageUploadResult; |
| | | import com.github.binarywang.wxpay.exception.WxPayException; |
| | | import com.github.binarywang.wxpay.service.EcommerceService; |
| | | import com.github.binarywang.wxpay.service.MerchantMediaService; |
| | | import com.github.binarywang.wxpay.service.WxPayService; |
| | | import com.ruoyi.shop.domain.pojo.shop.ShopAuthentication; |
| | | import com.ruoyi.system.api.domain.poji.shop.Shop; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.InputStream; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 微信支付 |
| | |
| | | @AllArgsConstructor |
| | | public class WechatPayUtils { |
| | | |
| | | /*private final WxPayService wxService; |
| | | private final WxPayService wxService; |
| | | |
| | | *//** |
| | | * 电商二级商户进件(提交申请单) |
| | | *//* |
| | | public ApplymentsResult ecommerceApply(ShopAuthentication shopAuthentication, String applyNumber, Shop shop) throws WxPayException { |
| | | /** |
| | | * @description 电商二级商户进件(提交申请单) |
| | | * @author jqs |
| | | * @date 2023/8/11 10:04 |
| | | * @param shopAuthentication |
| | | * @param applyNumber |
| | | * @param shop |
| | | * @return ApplymentsResult |
| | | */ |
| | | public ApplymentsResult ecommerceApply(ShopAuthentication shopAuthentication, String applyNumber, Shop shop) throws Exception { |
| | | EcommerceService ecommerceService = wxService.getEcommerceService(); |
| | | MerchantMediaService merchantMediaService = wxService.getMerchantMediaService(); |
| | | ApplymentsRequest request = new ApplymentsRequest(); |
| | | //生成提交类 |
| | | request.setOutRequestNo(applyNumber); |
| | |
| | | } |
| | | //营业执照 |
| | | ApplymentsRequest.BusinessLicenseInfo business_license_info = new ApplymentsRequest.BusinessLicenseInfo(); |
| | | business_license_info.setBusinessLicenseCopy(shopAuthentication.getBlImage()); |
| | | InputStream blImageIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getBlImage()); |
| | | ImageUploadResult blImageIR = merchantMediaService.imageUploadV3(blImageIO,applyNumber+"blimage"); |
| | | business_license_info.setBusinessLicenseCopy(blImageIR.getMediaId()); |
| | | blImageIO.close(); |
| | | business_license_info.setBusinessLicenseNumber(shopAuthentication.getBlNumber()); |
| | | business_license_info.setMerchantName(shopAuthentication.getBlShopName()); |
| | | business_license_info.setLegalPerson(shopAuthentication.getBlCorporateName()); |
| | |
| | | //法人证件 |
| | | request.setIdDocType("IDENTIFICATION_TYPE_MAINLAND_IDCARD"); |
| | | ApplymentsRequest.IdCardInfo id_card_info = new ApplymentsRequest.IdCardInfo(); |
| | | id_card_info.setIdCardCopy(shopAuthentication.getLpIcFront()); |
| | | id_card_info.setIdCardNational(shopAuthentication.getLpIcBack()); |
| | | InputStream lpIcFrontIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getLpIcFront()); |
| | | ImageUploadResult lpIcFrontIR = merchantMediaService.imageUploadV3(lpIcFrontIO,applyNumber+"lpIcFront"); |
| | | id_card_info.setIdCardCopy(lpIcFrontIR.getMediaId()); |
| | | lpIcFrontIO.close(); |
| | | InputStream lpIcBackIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getLpIcBack()); |
| | | ImageUploadResult lpIcBackIR = merchantMediaService.imageUploadV3(lpIcBackIO,applyNumber+"lpIcBack"); |
| | | id_card_info.setIdCardNational(lpIcBackIR.getMediaId()); |
| | | lpIcBackIO.close(); |
| | | id_card_info.setIdCardName(shopAuthentication.getLpCorporateName()); |
| | | id_card_info.setIdCardNumber(shopAuthentication.getLpIdCard()); |
| | | id_card_info.setIdCardValidTimeBegin(shopAuthentication.getLpIcStartDate()); |
| | |
| | | List<ApplymentsRequest.UboInfo> ubo_info_list = new ArrayList<>(); |
| | | ApplymentsRequest.UboInfo uboInfo = new ApplymentsRequest.UboInfo(); |
| | | uboInfo.setUboIdDocType("IDENTIFICATION_TYPE_MAINLAND_IDCARD"); |
| | | uboInfo.setUboIdDocCopy(shopAuthentication.getUboIcFront()); |
| | | uboInfo.setUboIdDocCopyBack(shopAuthentication.getUboIcBack()); |
| | | InputStream uboIcFrontIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getUboIcFront()); |
| | | ImageUploadResult uboIcFrontIR = merchantMediaService.imageUploadV3(uboIcFrontIO,applyNumber+"uboIcFront"); |
| | | uboInfo.setUboIdDocCopy(uboIcFrontIR.getMediaId()); |
| | | uboIcFrontIO.close(); |
| | | InputStream uboIcBackIO = OBSUploadUtils.getOSSInputStream(shopAuthentication.getUboIcBack()); |
| | | ImageUploadResult uboIcBackIR = merchantMediaService.imageUploadV3(uboIcBackIO,applyNumber+"uboIcBack"); |
| | | uboInfo.setUboIdDocCopyBack(uboIcBackIR.getMediaId()); |
| | | uboIcBackIO.close(); |
| | | uboInfo.setUboIdDocName(shopAuthentication.getUboName()); |
| | | uboInfo.setUboIdDocNumber(shopAuthentication.getUboIdCard()); |
| | | uboInfo.setUboIdDocAddress(shopAuthentication.getUboIcAddress()); |
| | | uboInfo.setUboIdDocPeriodBegin(shopAuthentication.getUboIcStartDate()); |
| | | uboInfo.setUboIdDocCopyBack(shopAuthentication.getUboIcEndDate()); |
| | | ubo_info_list.add(uboInfo); |
| | | request.setUboInfoList(ubo_info_list); |
| | | } |
| | |
| | | //店铺信息 |
| | | ApplymentsRequest.SalesSceneInfo salesSceneInfo = new ApplymentsRequest.SalesSceneInfo(); |
| | | salesSceneInfo.setStoreName(shop.getShopName()); |
| | | salesSceneInfo.setStoreUrl(""); |
| | | salesSceneInfo.setStoreQrCode(""); |
| | | salesSceneInfo.setStoreQrCode("https://wxapp.hhhrt.cn/mini/shop?id="+shop.getShopId()); |
| | | salesSceneInfo.setMiniProgramSubAppid("wxb7f0ea286fc4e535"); |
| | | request.setSalesSceneInfo(salesSceneInfo); |
| | | request.setMerchantShortname(shop.getShopName()); |
| | | request.setBusinessAdditionPics(shopAuthentication.getBaPics()); |
| | | request.setBusinessAdditionDesc(shopAuthentication.getBaDesc()); |
| | | |
| | | return ecommerceService.createApply(request); |
| | | } |
| | | |
| | | |
| | | *//** |
| | | * 通过查询申请状态API查询二级商户入驻申请结果 |
| | | * @param applymentId 微信支付申请单号 |
| | | * @return 申请状态 |
| | | * @throws WxPayException |
| | | *//* |
| | | /** |
| | | * @description 查询申请审核状态 |
| | | * @author jqs |
| | | * @date 2023/8/11 10:04 |
| | | * @param applymentId |
| | | * @return ApplymentsStatusResult |
| | | */ |
| | | public ApplymentsStatusResult queryApplyStatusByApplymentId(String applymentId) throws WxPayException { |
| | | return wxService.getEcommerceService().queryApplyStatusByApplymentId(applymentId); |
| | | }*/ |
| | | } |
| | | |
| | | } |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | config: |
| | | # 配置中心地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | # 配置文件格式 |
| | | file-extension: yml |
| | | # 共享配置 |
| | |
| | | shop_id, |
| | | shop_name |
| | | FROM t_shop |
| | | WHERE FIND_IN_SET(shop_id,#{shopIds}) > 0 |
| | | WHERE del_flag = 0 AND FIND_IN_SET(shop_id,#{shopIds}) > 0 |
| | | </select> |
| | | |
| | | <select id="pageMgtShopByCityCode" resultType="com.ruoyi.system.api.domain.vo.MgtSimpleShopVo"> |
| | |
| | | <if test="updateUserId != null">update_user_id = #{updateUserId},</if> |
| | | WHERE shop_id = #{shopId} |
| | | </update> |
| | | |
| | | <select id="listShopIdByCityCode" resultType="java.lang.Long"> |
| | | SELECT shop_id |
| | | FROM t_shop |
| | | WHERE del_flag = 0 |
| | | AND shop_city_code IN |
| | | <foreach item="id" collection="cityCodes" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </select> |
| | | </mapper> |
| | |
| | | FROM t_member_task tmt |
| | | INNER JOIN t_member_task_record tmtr ON tmtr.task_id = tmt.task_id |
| | | WHERE tmt.del_flag = 0 AND tmt.shop_id = #{param.shopId} AND tmt.user_id = #{param.memberUserId} |
| | | ORDER BY tmt.task_date DESC |
| | | ORDER BY tmtr.create_time DESC |
| | | </select> |
| | | |
| | | <select id="pageMgtMemberFollow" resultType="com.ruoyi.shop.domain.vo.MgtMemberFollowPageVo"> |
| | |
| | | @EnableCustomSwagger2 |
| | | @EnableRyFeignClients |
| | | @SpringBootApplication |
| | | //@EnableScheduling |
| | | @EnableScheduling |
| | | public class RuoYiSystemApplication |
| | | { |
| | | public static void main(String[] args) |
| | |
| | | return R.ok(page.setRecords(mgtTagPageVoList)); |
| | | } |
| | | |
| | | @ApiOperation(value = "导入标签") |
| | | @PostMapping("/importData") |
| | | public AjaxResult importData(MultipartFile file, Integer tagType) throws Exception |
| | | @ApiOperation(value = "导入商品标签") |
| | | @PostMapping("/importGoodsTagData") |
| | | public AjaxResult importGoodsTagData(@RequestPart("file")MultipartFile file) throws Exception |
| | | { |
| | | ExcelUtil<MgtTagImportDto> util = new ExcelUtil<MgtTagImportDto>(MgtTagImportDto.class); |
| | | List<MgtTagImportDto> tagList = util.importExcel(file.getInputStream()); |
| | | String operName = SecurityUtils.getUsername(); |
| | | String message = sysTagService.importTag(tagList, tagType, operName); |
| | | String message = sysTagService.importTag(tagList, 1, operName); |
| | | return success(message); |
| | | } |
| | | |
| | | @ApiOperation(value = "导入用户标签") |
| | | @PostMapping("/importUserTagData") |
| | | public AjaxResult importUserTagData(@RequestPart("file")MultipartFile file) throws Exception |
| | | { |
| | | ExcelUtil<MgtTagImportDto> util = new ExcelUtil<MgtTagImportDto>(MgtTagImportDto.class); |
| | | List<MgtTagImportDto> tagList = util.importExcel(file.getInputStream()); |
| | | String operName = SecurityUtils.getUsername(); |
| | | String message = sysTagService.importTag(tagList, 2, operName); |
| | | return success(message); |
| | | } |
| | | |
| | | @ApiOperation(value = "导入商户标签") |
| | | @PostMapping("/importShopTagData") |
| | | public AjaxResult importShopTagData(@RequestPart("file")MultipartFile file) throws Exception |
| | | { |
| | | ExcelUtil<MgtTagImportDto> util = new ExcelUtil<MgtTagImportDto>(MgtTagImportDto.class); |
| | | List<MgtTagImportDto> tagList = util.importExcel(file.getInputStream()); |
| | | String operName = SecurityUtils.getUsername(); |
| | | String message = sysTagService.importTag(tagList, 3, operName); |
| | | return success(message); |
| | | } |
| | | |
| | | @ApiOperation(value = "导入建议标签") |
| | | @PostMapping("/importSuggestTagData") |
| | | public AjaxResult importSuggestTagData(@RequestPart("file")MultipartFile file) throws Exception |
| | | { |
| | | ExcelUtil<MgtTagImportDto> util = new ExcelUtil<MgtTagImportDto>(MgtTagImportDto.class); |
| | | List<MgtTagImportDto> tagList = util.importExcel(file.getInputStream()); |
| | | String operName = SecurityUtils.getUsername(); |
| | | String message = sysTagService.importTag(tagList, 4, operName); |
| | | return success(message); |
| | | } |
| | | |
| | |
| | | @Data |
| | | public class MgtOperLogPageVo { |
| | | |
| | | @Excel(name = "操作内容", width = 30) |
| | | @Excel(name = "操作内容", width = 30,sort = 5) |
| | | @ApiModelProperty(value = "操作内容") |
| | | private String operContent; |
| | | @Excel(name = "操作类型", width = 30) |
| | | @Excel(name = "操作类型", width = 30,sort = 2) |
| | | @ApiModelProperty(value = "操作类型") |
| | | private String operTitle; |
| | | @Excel(name = "操作IP", width = 30) |
| | | @Excel(name = "操作IP", width = 30,sort = 4) |
| | | @ApiModelProperty(value = "操作IP") |
| | | private String operIp; |
| | | @Excel(name = "操作人员", width = 30) |
| | | @Excel(name = "操作人员", width = 30,sort = 3) |
| | | @ApiModelProperty(value = "操作人员") |
| | | private String operName; |
| | | @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss") |
| | | @Excel(name = "操作时间", width = 30, dateFormat = "yyyy-MM-dd HH:mm:ss",sort = 1) |
| | | @ApiModelProperty(value = "操作时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") |
| | | private Date operTime; |
| | |
| | | } |
| | | String requestBodyStr = stringBuilder.toString(); |
| | | if(StringUtils.isNotBlank(requestBodyStr)){ |
| | | return JSONObject.parseObject(stringBuilder.toString(), Map.class); |
| | | try { |
| | | return JSONObject.parseObject(stringBuilder.toString(), Map.class); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return new HashMap<>(); |
| | | } |
| | |
| | | port: 10061 |
| | | |
| | | # Spring |
| | | spring: |
| | | spring: |
| | | mvc: |
| | | hidden-method: |
| | | filter: |
| | | enabled: true |
| | | application: |
| | | # 应用名称 |
| | | name: ruoyi-system |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | config: |
| | | # 配置中心地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | # 配置文件格式 |
| | | file-extension: yml |
| | | # 共享配置 |
| | | shared-configs: |
| | | - application-${spring.profiles.active}.${spring.cloud.nacos.config.file-extension} |
| | | servlet: |
| | | multipart: |
| | | location: /home/temp |
| | | |
| | |
| | | nacos: |
| | | discovery: |
| | | # 服务注册地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | config: |
| | | # 配置中心地址 |
| | | #server-addr: 47.109.78.184:5000 |
| | | server-addr: 127.0.0.1:8848 |
| | | server-addr: 47.109.78.184:5000 |
| | | #server-addr: 127.0.0.1:8848 |
| | | # 配置文件格式 |
| | | file-extension: yml |
| | | # 共享配置 |