From 5e7892cd0921111dfbaf84196f2593f8045d1c11 Mon Sep 17 00:00:00 2001 From: yanghui <2536613402@qq.com> Date: 星期四, 08 十二月 2022 13:16:54 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/haucheng_panzhihua' into haucheng_panzhihua --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java | 3 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerGoodsServiceImpl.java | 11 +-- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidRecordMapper.xml | 2 flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java | 1 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerOrderServiceImpl.java | 5 + springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java | 35 ++++++++++- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java | 28 +++++++-- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerRefundOrderServiceImpl.java | 7 + springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/AddShopFlowerGoodsAttrVO.java | 2 flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java | 11 +++ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml | 13 ++- flower_city/src/main/java/com/dg/core/util/SmsUtil.java | 3 flower_city/src/main/resources/mapper/OrganizationChartMapper.xml | 3 springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BasicScreenApi.java | 4 springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerGoodsMapper.xml | 7 + flower_city/src/main/java/com/dg/core/db/gen/mapper/OrganizationChartMapper.java | 2 16 files changed, 100 insertions(+), 37 deletions(-) diff --git a/flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java b/flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java index 12f8fd3..8270408 100644 --- a/flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java +++ b/flower_city/src/main/java/com/dg/core/controller/GuideRepairOrderController.java @@ -243,6 +243,7 @@ } SysUser submitUser = iGuideRepairOrderService.getSubmitUser(order); wxUtil.sendGuideRepairOrderComplete(submitUser.getOpenid(),accessToken,guideRepairOrderCompleteTemplateId,entity); + smsUtil.sendSmsCompleteNew(order.getConsultUserPhone(),order.getMatterName()); } else if (order.getSubmitType().equals(2)){ smsUtil.sendSmsCompleteNew(order.getConsultUserPhone(),order.getMatterName()); diff --git a/flower_city/src/main/java/com/dg/core/db/gen/mapper/OrganizationChartMapper.java b/flower_city/src/main/java/com/dg/core/db/gen/mapper/OrganizationChartMapper.java index cfdd1e5..23fac86 100644 --- a/flower_city/src/main/java/com/dg/core/db/gen/mapper/OrganizationChartMapper.java +++ b/flower_city/src/main/java/com/dg/core/db/gen/mapper/OrganizationChartMapper.java @@ -64,7 +64,7 @@ /** * 根据所属地区查找部门 */ - List<OrganizationChartEntity> selectByCode(@Param("id")String id, @Param("areaCode") String areaCode); + List<OrganizationChartEntity> selectByCode(@Param("id")String id, @Param("areaCode") String areaCode,@Param("grade") Integer grade); diff --git a/flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java b/flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java index b8c7614..7694ecd 100644 --- a/flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java +++ b/flower_city/src/main/java/com/dg/core/service/impl/GuideRepairOrderServiceImpl.java @@ -51,6 +51,10 @@ @Resource + private AreaCode2022Mapper areaCode2022Mapper; + + + @Resource SmsUtil smsUtil; @Resource(name = "stringRedisTemplate") @@ -84,8 +88,13 @@ } } if (isAdd) { + AreaCode2022 areaCode2022 = areaCode2022Mapper.selectOne(new QueryWrapper<AreaCode2022>().lambda().eq(AreaCode2022::getCode, guideRepairOrder.getAreaCode())); + Integer grade=2; + if (areaCode2022.getLevel()==2){ + grade=1; + } //自动分配业务代码开始 - List<OrganizationChartEntity> organizationChartEntities = organizationChartMapper.selectByCode(transactionEvent.getDepartmentId(), guideRepairOrder.getAreaCode()); + List<OrganizationChartEntity> organizationChartEntities = organizationChartMapper.selectByCode(transactionEvent.getDepartmentId(), guideRepairOrder.getAreaCode(),grade); if (organizationChartEntities.size() > 0) { for (OrganizationChartEntity organizationChart : organizationChartEntities) { departmentIds.add(organizationChart.getId().toString()); diff --git a/flower_city/src/main/java/com/dg/core/util/SmsUtil.java b/flower_city/src/main/java/com/dg/core/util/SmsUtil.java index cde4fd0..3ded30f 100644 --- a/flower_city/src/main/java/com/dg/core/util/SmsUtil.java +++ b/flower_city/src/main/java/com/dg/core/util/SmsUtil.java @@ -23,6 +23,7 @@ import javax.annotation.Resource; import java.io.IOException; +import java.time.LocalDateTime; import java.util.HashMap; import java.util.Map; import java.util.Random; @@ -376,7 +377,7 @@ String url = "https://dxsdk.028lk.com:8082/Api/SendSms?"+"LoginName="+LoginName+"&Pwd="+Pwd+"&FeeType="+FeeType+"&Mobile="+tel+"&Content="; Random rd = new Random(); - String content="您有新的导办工单,请"+name+"尽快处理。"; + String content="您在"+ LocalDateTime.now() +"新的导办工单,请"+name+"尽快处理。"; url=url+content; OkHttpClient client = new OkHttpClient(); Response response; diff --git a/flower_city/src/main/resources/mapper/OrganizationChartMapper.xml b/flower_city/src/main/resources/mapper/OrganizationChartMapper.xml index eed6828..8d51b50 100644 --- a/flower_city/src/main/resources/mapper/OrganizationChartMapper.xml +++ b/flower_city/src/main/resources/mapper/OrganizationChartMapper.xml @@ -110,8 +110,9 @@ <select id="selectByCode" resultMap="OrganizationChartResult"> <include refid="selectOrganizationChartVo"/> <where> - ( id=#{id} or parent_id=#{id}) and (city=#{areaCode} or district= #{areaCode} or village=#{areaCode}) + ( id=#{id} or parent_id=#{id}) and (city=#{areaCode} or district= #{areaCode} or village=#{areaCode}) and grade=#{grade} </where> + order by grade </select> <insert id="insertConfig" parameterType="com.dg.core.db.gen.entity.OrganizationChartEntity"> diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/AddShopFlowerGoodsAttrVO.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/AddShopFlowerGoodsAttrVO.java index b346cfa..afbb722 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/AddShopFlowerGoodsAttrVO.java +++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/shop/AddShopFlowerGoodsAttrVO.java @@ -18,7 +18,7 @@ public class AddShopFlowerGoodsAttrVO { @ApiModelProperty("商品规格Id:编辑必传") - private Long goodsAttrId; + private Long id; @ApiModelProperty("商品规格") private String goodsAttrName; diff --git a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BasicScreenApi.java b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BasicScreenApi.java index fbe5bbd..fa0d358 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BasicScreenApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/community_backstage/src/main/java/com/panzhihua/community_backstage/api/BasicScreenApi.java @@ -157,7 +157,7 @@ @ApiOperation(value = "随手拍详情", response = ComActEasyPhotoVO.class) @GetMapping("easyphoto") public R detailEasyPhoto(@RequestParam("id") Long id) { - Long userId = this.getUserId(); - return communityService.detailEasyPhoto(id, userId); +// Long userId = this.getUserId(); + return communityService.detailEasyPhoto(id, 0L); } } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java index 45ade73..72bf5de 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActAcidRecordServiceImpl.java @@ -11,6 +11,7 @@ import com.panzhihua.common.model.dtos.community.acid.BatchCheckAcidRecordDTO; import com.panzhihua.common.model.dtos.community.acid.ComActAcidRecordDTO; import com.panzhihua.common.model.vos.R; +import com.panzhihua.common.model.vos.community.StatisticsPhotoVO; import com.panzhihua.common.model.vos.community.acid.*; import com.panzhihua.common.service.user.UserService; import com.panzhihua.common.utlis.DateUtils; @@ -29,6 +30,7 @@ import javax.annotation.Resource; import java.math.BigDecimal; +import java.time.LocalDate; import java.util.*; import java.util.function.Function; import java.util.stream.Collectors; @@ -622,7 +624,7 @@ if (0!=all){ BigDecimal countNum = new BigDecimal(comActAcidColorChartsVO.getCountNum()); BigDecimal allDecimal = new BigDecimal(all); - BigDecimal percent = countNum.divide(allDecimal,2, BigDecimal.ROUND_HALF_DOWN); + BigDecimal percent = countNum.divide(allDecimal,4, BigDecimal.ROUND_HALF_DOWN).multiply(new BigDecimal(100)); comActAcidColorChartsVO.setPercent(percent); } } @@ -646,16 +648,43 @@ if (0L!=sum) { BigDecimal countNum = new BigDecimal(comActAcidColorChartsVO.getCountNum()); BigDecimal sumDecimal = new BigDecimal(sum); - BigDecimal percent = countNum.divide(sumDecimal, 2, BigDecimal.ROUND_HALF_DOWN); + BigDecimal percent = countNum.divide(sumDecimal, 4, BigDecimal.ROUND_HALF_DOWN).multiply(new BigDecimal(100)); comActAcidColorChartsVO.setPercent(percent); } } } - Map<String, Map<String, ComActAcidColorChartsVO>> chartMap = comActAcidColorChartsVOS1 + Map<String, Map<String, ComActAcidColorChartsVO>> colletMap = comActAcidColorChartsVOS1 .stream() .collect(Collectors.groupingBy(ComActAcidColorChartsVO::getCountName, Collectors.toMap(ComActAcidColorChartsVO::getColorMark, Function.identity()))); + String[] statusArr = {"红码","黄码","绿码"}; + List<String> latest5Month = DateUtils.getLatest12Month(LocalDate.now(), 5); + for (String month : latest5Month) { + Map<String, ComActAcidColorChartsVO> map1; + if(colletMap.containsKey(month)){ + map1 = colletMap.get(month); + }else { + map1 = new HashMap<>(); + } + for (String status : statusArr) { + if (!map1.containsKey(status)){ + ComActAcidColorChartsVO comActAcidColorChartsVO = new ComActAcidColorChartsVO(); + comActAcidColorChartsVO.setCountNum(0); + comActAcidColorChartsVO.setCountName(month); + comActAcidColorChartsVO.setColorMark(status); + comActAcidColorChartsVOS1.add(comActAcidColorChartsVO); + map1.put(status,comActAcidColorChartsVO); + } + } + colletMap.put(month,map1); + } + + + Map<String, List<ComActAcidColorChartsVO>> chartMap = comActAcidColorChartsVOS1 + .stream().sorted(Comparator.comparing(ComActAcidColorChartsVO::getCountName)) + .collect(Collectors.groupingBy(ComActAcidColorChartsVO::getColorMark)); + Map<String,Object> retMap = new HashMap<>(); retMap.put("comActAcidColorChartsVOS",comActAcidColorChartsVOS); retMap.put("chartMap",chartMap); diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java index ce4b094..cec6ea6 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComActEasyPhotoServiceImpl.java @@ -1104,13 +1104,14 @@ if (0!=all){ BigDecimal countNum = new BigDecimal(statisticsPhotoVO.getCountNum()); BigDecimal allDecimal = new BigDecimal(all); - BigDecimal percent = countNum.divide(allDecimal,2, BigDecimal.ROUND_HALF_DOWN); + BigDecimal percent = countNum.divide(allDecimal,4, BigDecimal.ROUND_HALF_DOWN).multiply(new BigDecimal(100)); statisticsPhotoVO.setPercent(percent); } } - Map<String, StatisticsPhotoVO> circleMap = statisticsPhotoVOS - .stream() - .collect(Collectors.toMap(StatisticsPhotoVO::getCountName, Function.identity())); +// Map<String, StatisticsPhotoVO> circleMap = statisticsPhotoVOS +// .stream() +// .collect(Collectors.toMap(StatisticsPhotoVO::getCountName, Function.identity())); + //按月份查询 List<StatisticsPhotoVO> statisticsPhotoVOS1 = this.baseMapper.selectPhotoByMonth(); @@ -1128,15 +1129,18 @@ if (0L!=sum) { BigDecimal countNum = new BigDecimal(statisticsPhotoVO.getCountNum()); BigDecimal sumDecimal = new BigDecimal(sum); - BigDecimal percent = countNum.divide(sumDecimal, 2, BigDecimal.ROUND_HALF_DOWN); + BigDecimal percent = countNum.divide(sumDecimal, 4, BigDecimal.ROUND_HALF_DOWN).multiply(new BigDecimal(100)); statisticsPhotoVO.setPercent(percent); } } } Map<String, Map<String, StatisticsPhotoVO>> chartMap = statisticsPhotoVOS1.stream().collect(Collectors.groupingBy(StatisticsPhotoVO::getStatisticsDate, Collectors.toMap(StatisticsPhotoVO::getCountName, Function.identity()))); + + + // 状态 1待处理 2进行中 3已驳回 4待评价 5.已完成 - String[] statusArr = {"dcl","jxz","ybh","dpj","ywc"}; + String[] statusArr = {"待处理","进行中","已驳回","待评价","已完成"}; List<String> latest12Month = DateUtils.getLatest12Month(LocalDate.now(), 10); for (String month : latest12Month) { Map<String, StatisticsPhotoVO> map1; @@ -1151,13 +1155,23 @@ statisticsPhotoVO.setCountNum(0); statisticsPhotoVO.setStatisticsDate(month); statisticsPhotoVO.setCountName(status); + statisticsPhotoVOS1.add(statisticsPhotoVO); map1.put(status,statisticsPhotoVO); } } chartMap.put(month,map1); } + Map<String, List<StatisticsPhotoVO>> stringListMap = statisticsPhotoVOS1 + .stream() + .sorted(Comparator.comparing(StatisticsPhotoVO::getStatisticsDate)) + .collect(Collectors.groupingBy(StatisticsPhotoVO::getCountName)); - return R.ok(); + + Map<String,Object> retMap = new HashMap<>(); + retMap.put("statisticsPhotoVOS",statisticsPhotoVOS); + retMap.put("monthMap",stringListMap); + + return R.ok(retMap); } } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerGoodsServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerGoodsServiceImpl.java index e61634c..75f77c8 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerGoodsServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerGoodsServiceImpl.java @@ -2,7 +2,6 @@ import cn.hutool.core.collection.CollUtil; import cn.hutool.core.util.NumberUtil; -import cn.hutool.core.util.StrUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; @@ -17,7 +16,6 @@ import com.panzhihua.common.model.vos.shop.*; import com.panzhihua.common.utlis.DifferentLongListUtil; import com.panzhihua.common.utlis.Snowflake; -import com.panzhihua.common.utlis.StringUtils; import com.panzhihua.service_community.dao.*; import com.panzhihua.service_community.model.dos.*; import com.panzhihua.service_community.service.ComShopFlowerGoodsAttrService; @@ -141,13 +139,11 @@ ArrayList<AddShopFlowerGoodsAttrVO> goodsAttrVOList = Lists.newArrayList(); StringBuilder sbr = new StringBuilder(); int stock = 0; - int sale = 0; for (ComShopFlowerGoodsAttrDO oneGoodsAttrDO : goodsAttrDOs) { AddShopFlowerGoodsAttrVO goodsAttrVO = new AddShopFlowerGoodsAttrVO(); BeanUtils.copyProperties(oneGoodsAttrDO, goodsAttrVO); - goodsAttrVO.setGoodsAttrId(oneGoodsAttrDO.getId()); + goodsAttrVO.setId(oneGoodsAttrDO.getId()); goodsAttrVOList.add(goodsAttrVO); - sale = sale + oneGoodsAttrDO.getSale(); stock = stock +oneGoodsAttrDO.getStock(); sbr.append(oneGoodsAttrDO.getGoodsAttrName()).append(" "); } @@ -161,7 +157,6 @@ String categoryNames = convenientGoodsCategoryDAO.selectCategoryScopeByGoodsId(shopGoods.getId()); shopGoods.setCategoryName(categoryNames); shopGoods.setStock(stock); - shopGoods.setSale(sale); }); } return R.ok(comShopStoreVOIPage); @@ -286,7 +281,7 @@ } else { List<Long> attrIds = comShopFlowerGoodsAttrDOS.stream().map(ComShopFlowerGoodsAttrDO::getId).collect(Collectors.toList()); - List<Long> voAttrIds = addShopFlowerGoodsVO.getGoodsAttrVOList().stream().map(AddShopFlowerGoodsAttrVO::getGoodsAttrId) + List<Long> voAttrIds = addShopFlowerGoodsVO.getGoodsAttrVOList().stream().map(AddShopFlowerGoodsAttrVO::getId) .collect(Collectors.toList()); // 需要删除的规格ID——针对编辑时删除了规格的情况 List<Long> deleteIds = DifferentLongListUtil.getDiffrent(attrIds, voAttrIds); @@ -294,7 +289,7 @@ shopFlowerGoodsAttrDAO.deleteBatchIds(deleteIds); } addShopFlowerGoodsVO.getGoodsAttrVOList().forEach(goodsAttr -> { - ComShopFlowerGoodsAttrDO comShopGoodsAttrDO = shopFlowerGoodsAttrDAO.selectById(goodsAttr.getGoodsAttrId()); + ComShopFlowerGoodsAttrDO comShopGoodsAttrDO = shopFlowerGoodsAttrDAO.selectById(goodsAttr.getId()); if (comShopGoodsAttrDO != null) { comShopGoodsAttrDO.setPrice(goodsAttr.getPrice()); comShopGoodsAttrDO.setCollatePrice(goodsAttr.getCollatePrice()); diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerOrderServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerOrderServiceImpl.java index 890219e..89eab55 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerOrderServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerOrderServiceImpl.java @@ -37,6 +37,7 @@ import javax.annotation.Resource; import java.math.BigDecimal; +import java.text.DecimalFormat; import java.text.SimpleDateFormat; import java.util.*; import java.util.stream.Collectors; @@ -970,9 +971,11 @@ if (R.isOk(sysUserVOR)) { SysUserVO sysUserVO = JSONObject.parseObject(JSONObject.toJSONString(sysUserVOR.getData()), SysUserVO.class); try { + DecimalFormat df = new DecimalFormat("#.00"); WxUtil.sendNewOrderNotice(sysUserVO.getOpenid(),maService.getAccessToken(),shopOrderDO.getOrderNo(), shopOrderDO.getDeliveryType()==1?"拼单订单":"快递订单",orderGoodsList.get(0).getGoodsName(), - shopOrderDO.getTotalAmount().toString(),DateUtil.format(shopOrderDO.getCreateAt(),"yyyy-MM-dd HH:mm")); + df.format(shopOrderDO.getTotalAmount()), + DateUtil.format(shopOrderDO.getCreateAt(),"yyyy-MM-dd HH:mm")); } catch (WxErrorException e) { e.printStackTrace(); } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerRefundOrderServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerRefundOrderServiceImpl.java index 7469c2b..9bf0c48 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerRefundOrderServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComShopFlowerRefundOrderServiceImpl.java @@ -35,6 +35,7 @@ import org.springframework.transaction.annotation.Transactional; import javax.annotation.Resource; +import java.text.DecimalFormat; import java.util.*; import java.util.stream.Collectors; @@ -101,7 +102,8 @@ if (R.isOk(sysUserVOR)) { SysUserVO sysUserVO = JSONObject.parseObject(JSONObject.toJSONString(sysUserVOR.getData()), SysUserVO.class); try { - WxUtil.sendNewRefundOrderNotice(sysUserVO.getOpenid(),maService.getAccessToken(),refundOrderNo,comShopFlowerRefundOrderDO.getRefundAmount().toString(),DateUtil.format(comShopFlowerRefundOrderDO.getRefundTime(),"yyyy-MM-dd HH:mm")); + DecimalFormat df = new DecimalFormat("#.00"); + WxUtil.sendNewRefundOrderNotice(sysUserVO.getOpenid(),maService.getAccessToken(),refundOrderNo,df.format(comShopFlowerRefundOrderDO.getRefundAmount()),DateUtil.format(comShopFlowerRefundOrderDO.getRefundTime(),"yyyy-MM-dd HH:mm")); } catch (WxErrorException e) { e.printStackTrace(); } @@ -242,7 +244,8 @@ if (R.isOk(userOpenId)) { String openid = userOpenId.getData().toString(); try { - WxUtil.sendRefundNotice(openid,maService.getAccessToken(),comShopFlowerRefundOrderDO.getRefundOrderNo(),comShopFlowerRefundOrderDO.getRefundAmount().toString(),msg); + DecimalFormat df = new DecimalFormat("#.00"); + WxUtil.sendRefundNotice(openid,maService.getAccessToken(),comShopFlowerRefundOrderDO.getRefundOrderNo(),df.format(comShopFlowerRefundOrderDO.getRefundAmount()),msg); } catch (WxErrorException e) { e.printStackTrace(); } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java index e837558..c973642 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ConvenientMerchantServiceImpl.java @@ -125,6 +125,7 @@ if (isNull(convenientMerchantDO)) { return R.fail("商家不存在"); } + Long createBy = convenientMerchantDO.getCreatedBy(); BeanUtils.copyProperties(convenientMerchantDTO, convenientMerchantDO); if (nonNull(merchantDO) && !merchantDO.getId().equals(convenientMerchantDO.getId())) { R.fail("该微信手机号:" + mobilePhone + "已被使用!请更换"); @@ -152,7 +153,7 @@ serviceIds.forEach(serviceId -> { ConvenientServiceCategoryDO convenientServiceCategoryDO = convenientServiceCategoryDAO.selectById(serviceId); convenientServiceCategoryDAO.createMerchantServiceRelation(Snowflake.getId(), merchantId, serviceId, - convenientServiceCategoryDO.getName(), convenientMerchantDTO.getCreatedBy()); + convenientServiceCategoryDO.getName(), createBy); }); } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidRecordMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidRecordMapper.xml index 15a22d9..2357f2f 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidRecordMapper.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActAcidRecordMapper.xml @@ -441,7 +441,7 @@ <select id="selectColorMarkGroupByMonth" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidColorChartsVO"> SELECT COUNT(1) count_num,date_format(create_time,'%Y-%m') as count_name,color_mark FROM `com_act_acid_record` - WHERE date_format(create_time,'%Y-%m') >= date_format(date_sub(now(), INTERVAL 5 MONTH),'%Y-%m') GROUP BY count_name,color_mark + WHERE date_format(create_time,'%Y-%m') >= date_format(date_sub(now(), INTERVAL 4 MONTH),'%Y-%m') GROUP BY count_name,color_mark </select> </mapper> diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml index c3c88a5..77f0f22 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComActEasyPhotoDOMapper.xml @@ -69,7 +69,8 @@ p.examine_at, c.name communityName, p.urban_status, - p.transfer_reason + p.transfer_reason, + p.handle_status FROM com_act_easy_photo p LEFT JOIN sys_user u ON p.sponsor_id = u.user_id @@ -518,7 +519,8 @@ p.img_width, p.img_height, p.examine_at, - f.id AS fid + f.id AS fid, + p.handle_status FROM com_act_easy_photo p JOIN sys_user u ON p.sponsor_id = u.user_id @@ -610,13 +612,14 @@ <select id="getBanner" resultType="com.panzhihua.common.model.vos.community.easyPhoto.BannerVO"> select * from com_act_dyn where type=1 AND on_top=1 </select> + <select id="selectPhotoAll" resultType="com.panzhihua.common.model.vos.community.StatisticsPhotoVO"> - SELECT count(1) count_num,(case `status` when 1 THEN 'dcl' WHEN 2 THEN 'jxz' WHEN 3 THEN 'ybh' WHEN 4 THEN 'dpj' WHEN 5 THEN 'ywc' ELSE 'qt' END) count_name + SELECT count(1) count_num,(case `status` when 1 THEN '待处理' WHEN 2 THEN '进行中' WHEN 3 THEN '已驳回' WHEN 4 THEN '待评价' WHEN 5 THEN '已完成' ELSE '其他' END) count_name FROM `com_act_easy_photo` where del_tag = 0 GROUP BY `status` </select> <select id="selectPhotoByMonth" resultType="com.panzhihua.common.model.vos.community.StatisticsPhotoVO"> - SELECT count(1) count_num,(case `status` when 1 THEN 'dcl' WHEN 2 THEN 'jxz' WHEN 3 THEN 'ybh' WHEN 4 THEN 'dpj' WHEN 5 THEN 'ywc' ELSE 'qt' END) count_name,date_format(create_at,'%Y-%m') as statistics_date - FROM `com_act_easy_photo` WHERE date_format(create_at,'%Y-%m') >= date_format(date_sub(now(), INTERVAL 10 MONTH),'%Y-%m') and del_tag = 0 GROUP BY statistics_date, `status` + SELECT count(1) count_num,(case `status` when 1 THEN '待处理' WHEN 2 THEN '进行中' WHEN 3 THEN '已驳回' WHEN 4 THEN '待评价' WHEN 5 THEN '已完成' ELSE '其他' END) count_name,date_format(create_at,'%Y-%m') as statistics_date + FROM `com_act_easy_photo` WHERE date_format(create_at,'%Y-%m') >= date_format(date_sub(now(), INTERVAL 9 MONTH),'%Y-%m') and del_tag = 0 GROUP BY statistics_date, `status` </select> </mapper> diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerGoodsMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerGoodsMapper.xml index e71c8aa..80ef98e 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerGoodsMapper.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComShopFlowerGoodsMapper.xml @@ -73,13 +73,16 @@ from com_shop_flower_goods as csg left join com_convenient_merchants as css on css.id = csg.store_id left join com_convenient_goods_scope as cgs on cgs.goods_id = csg.id - where 1=1 and csg.delete_status = 1 and - css.`business_status` = 1 + where 1=1 and csg.delete_status = 1 + <if test='comShopFlowerGoodsDTO.name != null and comShopFlowerGoodsDTO.name !=""'> AND csg.`name` like concat('%',#{comShopFlowerGoodsDTO.name},'%') </if> <if test='comShopFlowerGoodsDTO.status != null '>AND csg.`status` = #{comShopFlowerGoodsDTO.status}</if> <if test='comShopFlowerGoodsDTO.storeId != null '>AND csg.store_id = #{comShopFlowerGoodsDTO.storeId}</if> + <if test='comShopFlowerGoodsDTO.storeId == null '> + and css.`business_status` = 1 + </if> <if test='comShopFlowerGoodsDTO.deliveryType != null '>AND csg.delivery_type like concat('%',#{comShopFlowerGoodsDTO.deliveryType},'%') </if> <if test='comShopFlowerGoodsDTO.categoriesId != null '>AND cgs.goods_category_id = #{comShopFlowerGoodsDTO.categoriesId}</if> order by sale desc,create_at desc -- Gitblit v1.7.1