Merge branch 'huacheng_test' of http://gitlab.nhys.cdnhxx.com/root/zhihuishequ into huacheng_test
| | |
| | | @CurrentUser SysUser sysUser) |
| | | { |
| | | Page<ReplyTemplateEntity> pageParam = new Page<>(pageNum,pageSize); |
| | | List<String> ids= PermissionUtil.getPermission(sysUser,iOrganizationChartService); |
| | | List<String> ids= PermissionUtil.getStairDepartment(sysUser,iOrganizationChartService); |
| | | if(ids==null || ids.size()<1) |
| | | { |
| | | return getDataTable("您没有权限查看该数据"); |
| | |
| | | public TableDataInfo selectConfigListAll(@RequestParam(value = "Name",required = false) String Name, |
| | | @CurrentUser SysUser sysUser) |
| | | { |
| | | List<String> ids= PermissionUtil.getPermission(sysUser,iOrganizationChartService); |
| | | List<String> ids= PermissionUtil.getStairDepartment(sysUser,iOrganizationChartService); |
| | | List<ElseAccessoryEntity> list = iElseAccessoryService.selectConfigList(Name,ids,sysUser.getUserId()); |
| | | int num=iElseAccessoryService.countNum(Name,ids); |
| | | return getDataTable(list,num); |
| | |
| | | @ApiOperation(value = "删除工单",response = GuideRepairOrder.class) |
| | | @DeleteMapping("/delete/{id}") |
| | | @Authorization |
| | | public ResultData deleteConfigById(@PathVariable("id") String id) |
| | | public ResultData deleteConfigById(@PathVariable("id") String id,@CurrentUser SysUser sysUser) |
| | | { |
| | | return toAjax(iGuideRepairOrderService.deleteConfigById(id)); |
| | | if(StringUtils.equals("1",sysUser.getUserType()) || StringUtils.equals("1",sysUser.getIsDivisionHead()) ) |
| | | { |
| | | return toAjax(iGuideRepairOrderService.deleteConfigById(id)); |
| | | } |
| | | return error("只有超管或者部门领导才能删除"); |
| | | } |
| | | |
| | | |
| | |
| | | { |
| | | return error("账户不能为空"); |
| | | } |
| | | |
| | | if(StringUtils.isEmpty(config.getDepartmentId())) |
| | | { |
| | | return error("请选择部门"); |
| | | } |
| | | |
| | | config.setMoreDepartmentIds(config.getDepartmentId()); |
| | | config.setPassword(null); |
| | | config.setUpdateBy(sys.getUserId()+""); |
| | | |
| | |
| | | { |
| | | //导办人员 |
| | | List<String> ids=iOrganizationChartService.getIds(sysUser.getDepartmentId()); |
| | | // List<String> ids=getStairDepartment(sysUser,iOrganizationChartService); |
| | | return ids; |
| | | } |
| | | else if(StringUtils.equals("1", sysUser.getUserType())) |
| | |
| | | AND a.guide_user_id=#{guideUserId} |
| | | </if> |
| | | <if test="matterName != null and matterName != ''"> |
| | | AND (matter_name like concat('%', #{matterName}, '%')) or |
| | | AND ( |
| | | (matter_name like concat('%', #{matterName}, '%')) or |
| | | ( classify_id in ( SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%') ) ) |
| | | or (classify_id in (SELECT id FROM automessage_classify_administration WHERE automessage_classify_administration.parent_id in |
| | | (SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%'))) |
| | | or (select user_name from automessage_sys_user where a.guide_user_id=automessage_sys_user.user_id ) like concat('%', #{matterName}, '%') |
| | | or order_num like concat('%', #{matterName}, '%') or |
| | | or order_num like concat('%', #{matterName}, '%') or |
| | | (select user_name from automessage_sys_user where a.submit_user_id=automessage_sys_user.user_id ) like concat('%', #{matterName}, '%') |
| | | or consult_user_name like concat('%', #{matterName}, '%') or |
| | | guide_department_id in (SELECT id FROM automessage_organization_chart WHERE organization_name like concat('%', #{matterName}, '%') ) ) |
| | | ) |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND a.state=#{status} |
| | |
| | | AND automessage_guide_repair_order.guide_user_id=#{guideUserId} |
| | | </if> |
| | | <if test="matterName != null and matterName != ''"> |
| | | AND (matter_name like concat('%', #{matterName}, '%')) or |
| | | AND ( |
| | | (matter_name like concat('%', #{matterName}, '%')) or |
| | | ( classify_id in ( SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%') ) ) |
| | | or (classify_id in (SELECT id FROM automessage_classify_administration WHERE automessage_classify_administration.parent_id in |
| | | (SELECT id FROM automessage_classify_administration WHERE classify_name like concat('%', #{matterName}, '%'))) |
| | |
| | | or order_num like concat('%', #{matterName}, '%') or |
| | | (select user_name from automessage_sys_user where automessage_guide_repair_order.submit_user_id=automessage_sys_user.user_id ) like concat('%', #{matterName}, '%') |
| | | or consult_user_name like concat('%', #{matterName}, '%') or |
| | | guide_department_id in (SELECT id FROM automessage_organization_chart WHERE organization_name like concat('%', #{matterName}, '%') ) ) |
| | | guide_department_id in (SELECT id FROM automessage_organization_chart WHERE organization_name like concat('%', #{matterName}, '%') ) ) |
| | | ) |
| | | </if> |
| | | <if test="status != null and status != ''"> |
| | | AND automessage_guide_repair_order.state=#{status} |
| | |
| | | * @return 单条数据 |
| | | */ |
| | | @ApiOperation("详情接口") |
| | | @GetMapping("desensitize/{id}") |
| | | public R selectOneDesensitize(@PathVariable("id") Long id) { |
| | | @PostMapping("desensitize") |
| | | public R selectOneDesensitize(Long id) { |
| | | return this.propertyService.comPropertyRepairSelectOneDesensitize(id); |
| | | } |
| | | |
| | |
| | | @GetMapping("orderDetail") |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", required = true) |
| | | public R orderDetail(@RequestParam("orderId") Long orderId) { |
| | | return communityService.orderDetailFlower(orderId); |
| | | return communityService.orderDetailFlower(orderId,null); |
| | | } |
| | | |
| | | @ApiOperation(value = "自提点查询订单详情", response = ComShopFlowerOrderPageVO.class) |
| | | @GetMapping("pointOrderDetail") |
| | | @ApiImplicitParam(name = "orderId", value = "订单id", required = true) |
| | | public R pointOrderDetail(@RequestParam("orderId") Long orderId) { |
| | | String phone = this.getLoginUserInfo().getPhone(); |
| | | return communityService.orderDetailFlower(orderId,phone); |
| | | } |
| | | |
| | | @ApiOperation(value = "取消订单") |
| | |
| | | * @param merchantId |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取自提点") |
| | | @ApiOperation(value = "获取自提点",response = ConvenientElevatingPointVO.class) |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "merchantId", value = "商家Id", required = true), |
| | | @ApiImplicitParam(name = "lat", value = "经度", required = true), @ApiImplicitParam(name = "lng", value = "纬度", required = true)}) |
| | | @GetMapping("/point/findPointByMerchantId") |
| | | public R findPointByMerchantId(@RequestParam("merchantId") Long merchantId, @RequestParam("lat") String lat, @RequestParam("lng") String lng) { |
| | | return communityService.findPointByMerchantId(merchantId, lat, lng); |
| | | } |
| | | /** |
| | | * 获取商家周围 n(km)的自提点数量 |
| | | * |
| | | * @param distance |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取商家周围 n(km)的自提点数量") |
| | | @ApiImplicitParams({@ApiImplicitParam(name = "distance", value = "距离", required = false), |
| | | @ApiImplicitParam(name = "lat", value = "经度", required = true), @ApiImplicitParam(name = "lng", value = "纬度", required = true)}) |
| | | @GetMapping("/point/findPointNumByDistance") |
| | | public R findPointNumByDistance(@RequestParam(value = "distance",required = false) Integer distance, @RequestParam("lat") String lat, @RequestParam("lng") String lng) { |
| | | if (null == distance){ |
| | | return R.ok(0); |
| | | } |
| | | return communityService.findPointNumByDistance(distance, lat, lng); |
| | | } |
| | | |
| | | /** |
| | |
| | | @PostMapping("pageRefundOrder") |
| | | @ApiOperation(value = "退款订单分页查询 用户", response = ComShopFlowerRefundOrderVO.class) |
| | | public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO) { |
| | | if (null == pageComOrderRefundDTO.getStoreId()){ |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfo(); |
| | | if (null != loginUserInfo.getBackstageType() && 5 == loginUserInfo.getBackstageType()){ |
| | | pageComOrderRefundDTO.setStoreId(loginUserInfo.getStoreIdId()); |
| | | }else { |
| | | pageComOrderRefundDTO.setUserId(this.getUserId()); |
| | | } |
| | | return communityService.pageRefundOrder(pageComOrderRefundDTO); |
| | |
| | | @PostMapping("/shipOrderFlower") |
| | | @ApiOperation(value = "订单发货") |
| | | public R shipOrderFlower(@RequestBody ComShopOrderShipDTO orderShipDTO) { |
| | | orderShipDTO.setOperUserAccount(this.getLoginUserInfo().getAccount()); |
| | | return communityService.shipOrderFlower(orderShipDTO); |
| | | } |
| | | } |
| | |
| | | return communityService.noticeList(page,size,propertyId); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.grid.EventGridCommunityAdminVO; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | pageComActDTO.setAreaCode(this.getAreaCode()); |
| | | return communityService.pageCommunity(pageComActDTO); |
| | | } |
| | | @ApiOperation(value = "查询所有社区列表", response = EventGridCommunityAdminVO.class) |
| | | @GetMapping("/community/list") |
| | | public R getCommunityLists() { |
| | | return communityService.getCommunityLists(); |
| | | } |
| | | |
| | | @ApiOperation(value = "所在地地址下拉列表", response = ComMngStructAreaDistrictVO.class) |
| | | @PostMapping("listarea") |
| | |
| | | * 天府通办解密私钥 |
| | | * */ |
| | | public static final String PRIVATE_KEY="MIICeAIBADANBgkqhkiG9w0BAQEFAASCAmIwggJeAgEAAoGBAJJuFUH/4m9H5hCCzxtd9BxpjWlG9gbejqiJpV0XJKaU1V7xDBJasswxPY7Zc15RoxWClPoKPwKrbWKm49dgBJebJq5xd4sLCSbboxRkKxpRiJHMZ4LJjYa5h9Ei9RyfoUzqGHqH4UrDy3m3IwPiP19cIBqoU50shyQf92ZpcGZhAgMBAAECgYEAiadU8pODoUs82x6tZbPALQmJN4PO+wwznfqv6sA74yGdKECAMazz0oMjtGt1SiCCqFD2jcweCftvvELZg3mvNg1V0vRQRD1ZCA8HDp8DXm20d11K3+RX39tR4KgyyM3HsSEhkUDujMxKIpYjyiB5iEtV7Ja9bZ2fROszq+mUIqUCQQDQQf6vWRMLBqfnDcU77vuDGOhXbjkF2ytLxLW3fbKaW3GWvC3n93zPM+mcvWSXgkl448+jFjpMktm1Vn+w+YX3AkEAs/+bbRbod6AcVbLu8C5E44qDRoRpu+LF7Cphp8tlSAIRjm2yGP5acMWGRUtH9MF2QJYPF0PgDzdmUSVqWnCAZwJBALnSuRri4wAKn1SmT+ALfLZcSiyBODZGeppv2ijw6qWahH8YR+ncRaxoyMFHqPMbmM1akJIXqktbGREaLnPOIb8CQQCdJycJaL3Qa98xR4dr9cm5rF6PO96g5w6M8jfO6ztjUkMHymh7f99wpFRlvaN2Y06edyV315ARWPohEPy5N44zAkBlLuDHLm1TkTTAfdlL5r2OcdjpaJYloTdn05Mp3+J+w1zTX8k6Mz8lFZtLUcoMeTfQ9rm/+u2KwxS8NljtSZWH"; |
| | | |
| | | /** |
| | | * 花城小程序appid |
| | | */ |
| | | public static final String HC_APP_ID = "wx118de8a734d269f0"; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty(value = "更新人", hidden = true) |
| | | private Long updatedBy; |
| | | |
| | | @ApiModelProperty(value = "提货点详细地址") |
| | | private String detailAddress; |
| | | } |
| | |
| | | private Date evaluateTime; |
| | | |
| | | /** |
| | | * 评价类型(1.非常满意 2.满意 3.一般 4.不满意 5.糟糕透了) |
| | | * 评价类型(5.非常满意 4.满意 3.一般 3.不满意 1.糟糕透了) |
| | | */ |
| | | @ApiModelProperty(value = "评价类型(1.非常满意 2.满意 3.一般 4.不满意 5.糟糕透了)") |
| | | @ApiModelProperty(value = "评价类型(5.非常满意 4.满意 3.一般 3.不满意 1.糟糕透了)") |
| | | private Integer evaluateType; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "店铺id") |
| | | private Long storeId; |
| | | |
| | | @ApiModelProperty(value = "关键字") |
| | | private String keyWord; |
| | | |
| | | @ApiModelProperty(value = "用户id", hidden = true) |
| | | private Long userId; |
| | | |
| | |
| | | @ApiModelProperty(value = "订单id") |
| | | private Long orderId; |
| | | |
| | | @ApiModelProperty(value = "评价类型(1.非常满意 2.满意 3.一般 4.不满意 5.糟糕透了)") |
| | | @ApiModelProperty(value = "评价类型(5.非常满意 4.满意 3.一般 3.不满意 1.糟糕透了)") |
| | | private Integer evaluateType; |
| | | } |
| | |
| | | private String storeName; |
| | | @ApiModelProperty(value = "店铺Id") |
| | | private Long storeId; |
| | | @ApiModelProperty(value = "商品分类id") |
| | | private Long categoryIds; |
| | | |
| | | @ApiModelProperty(value = "商品状态(1.出售中 2.已下架 3.回收站)", example = "1") |
| | | private Integer status; |
| | |
| | | |
| | | @ApiModelProperty(value = "分页-每页记录数", example = "10") |
| | | private Long pageSize; |
| | | @ApiModelProperty(value = "用户id",hidden = true) |
| | | private Long userId; |
| | | } |
| | |
| | | |
| | | @ApiModelProperty("默认地址") |
| | | private ComShopUserAddressVO comShopUserAddressVO; |
| | | |
| | | @ApiModelProperty("商家id") |
| | | private Long storeIdId; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.panzhihua.common.model.dtos.community.ActivityInviteDTO; |
| | | import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleDetailAppVO; |
| | | import com.panzhihua.common.validated.AddGroup; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import javax.validation.constraints.NotNull; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @program: springcloud_k8s_panzhihuazhihuishequ |
| | | * @description: 社区活动 |
| | | * @author: huang.hongfa weixin hhf9596 qq 959656820 |
| | | * @create: 2020-12-07 14:01 |
| | | **/ |
| | | @Data |
| | | @ApiModel("大屏-社区活动") |
| | | public class ComActActivityBigScreenVO { |
| | | |
| | | @ApiModelProperty("自增id") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long id; |
| | | |
| | | @ApiModelProperty("活动封面") |
| | | private String cover; |
| | | |
| | | @ApiModelProperty("活动类型") |
| | | private String activityType; |
| | | |
| | | @ApiModelProperty("活动名称") |
| | | private String activityName; |
| | | |
| | | @ApiModelProperty("活动状态 1 待发布 2 未开始 3 报名中 4 进行中 5 已结束 6 已取消") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty("发布时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date publishAt; |
| | | |
| | | @ApiModelProperty("活动结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date endAt; |
| | | |
| | | @ApiModelProperty("活动开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date beginAt; |
| | | |
| | | @ApiModelProperty("参加人数") |
| | | private Integer personNum; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author yh |
| | | * 基础数据 |
| | | */ |
| | | @Data |
| | | @ApiModel("统计-基础数据") |
| | | public class ComBasicDataVo { |
| | | @ApiModelProperty(value = "社区数") |
| | | Integer community; |
| | | @ApiModelProperty(value = "商家数") |
| | | Integer merchants; |
| | | @ApiModelProperty(value = "党员数") |
| | | Integer pbMember; |
| | | @ApiModelProperty(value = "报道单位") |
| | | Integer pbUnit; |
| | | @ApiModelProperty(value = "实有人口") |
| | | Integer population; |
| | | @ApiModelProperty(value = "实有房屋") |
| | | Integer populationHouse; |
| | | @ApiModelProperty(value = "社会组织") |
| | | Integer socialOrg; |
| | | @ApiModelProperty(value = "志愿者") |
| | | Integer volunteer; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @title: StatisticsCommVO |
| | | * @projectName: 成都呐喊信息技术有限公司-智慧社区项目 |
| | | * @description: |
| | | * @author: hans |
| | | * @date: 2021/12/06 10:51 |
| | | */ |
| | | @Data |
| | | @ApiModel("统计随手拍") |
| | | public class StatisticsPhotoVO { |
| | | |
| | | @ApiModelProperty("数量") |
| | | private Integer countNum; |
| | | @ApiModelProperty("类型名称") |
| | | private String countName; |
| | | @ApiModelProperty("统计日期") |
| | | private String statisticsDate; |
| | | @ApiModelProperty("百分比") |
| | | private BigDecimal percent = BigDecimal.ZERO; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.acid; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | /** |
| | | * @author yh |
| | | */ |
| | | @Data |
| | | @ApiModel() |
| | | public class ComActAcidColorChartsVO { |
| | | @ApiModelProperty("数量") |
| | | private Integer countNum; |
| | | @ApiModelProperty("类型名称") |
| | | private String countName; |
| | | @ApiModelProperty("健康码颜色") |
| | | private String colorMark; |
| | | @ApiModelProperty("百分比") |
| | | private BigDecimal percent = BigDecimal.ZERO; |
| | | } |
| | |
| | | */ |
| | | @Data |
| | | @ApiModel("便民服自提点") |
| | | public class ConvenientElevatingPointVO { |
| | | public class ConvenientElevatingPointVO implements Comparable<ConvenientElevatingPointVO>{ |
| | | /** |
| | | * 主键id |
| | | */ |
| | |
| | | */ |
| | | @ApiModelProperty(value = "配送商品数量") |
| | | private Integer deliveryGoodsNum; |
| | | |
| | | @ApiModelProperty(value = "提货点详细地址") |
| | | private String detailAddress; |
| | | |
| | | @Override |
| | | public int compareTo(ConvenientElevatingPointVO o) { |
| | | return this.getDistance().compareTo(o.getDistance()); //定义你自己的排序规则 |
| | | } |
| | | } |
| | |
| | | private Integer accountStatus; |
| | | |
| | | @ApiModelProperty("所属社区id") |
| | | private Long communityId; |
| | | private String communityId; |
| | | |
| | | @ApiModelProperty("所属社区名称") |
| | | private String communityName; |
| | |
| | | private String serviceScope; |
| | | |
| | | @ApiModelProperty("服务类型id列表") |
| | | private List<Long> serviceIds; |
| | | private List<String> serviceIds; |
| | | |
| | | @ApiModelProperty("该商家存有商品,最多返回两条") |
| | | private List<ConvenientProductVO> productVOList; |
New file |
| | |
| | | package com.panzhihua.common.model.vos.partybuilding; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @auther yh |
| | | * @create 2022-11-08 17:25:45 |
| | | * @describe 统计党员类型VO |
| | | */ |
| | | @Data |
| | | @ApiModel("统计党员类型VO") |
| | | public class ComPbMemberTypeVO { |
| | | |
| | | /** |
| | | * 人数 |
| | | */ |
| | | @ApiModelProperty("人数") |
| | | private Integer countNum; |
| | | |
| | | /** |
| | | * 类型 |
| | | */ |
| | | @ApiModelProperty("类型") |
| | | private String countName; |
| | | } |
| | |
| | | @ApiModelProperty("商品详情") |
| | | private String details; |
| | | |
| | | @ApiModelProperty("商品详情()富文本") |
| | | private String goodsDescribe; |
| | | |
| | | /** |
| | | * 配送方式(1.商家配送 2.快递物流) |
| | | */ |
| | |
| | | package com.panzhihua.common.model.vos.shop; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | * 评价时间 |
| | | */ |
| | | @ApiModelProperty("评价时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date evaluateTime; |
| | | |
| | | /** |
| | | * 评价类型(1.非常满意 2.满意 3.一般 4.不满意 5.糟糕透了) |
| | | * 评价类型(5.非常满意 4.满意 3.一般 3.不满意 1.糟糕透了) |
| | | */ |
| | | @ApiModelProperty("评价类型(1.非常满意 2.满意 3.一般 4.不满意 5.糟糕透了)") |
| | | @ApiModelProperty("评价类型(5.非常满意 4.满意 3.一般 3.不满意 1.糟糕透了)") |
| | | private Integer evaluateType; |
| | | |
| | | /** |
| | |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | @ApiModelProperty("浏览量") |
| | | private Integer viewNum; |
| | | |
| | | |
| | | /** |
| | | * 评价数量 |
| | | */ |
| | | @ApiModelProperty("评价数量") |
| | | private Integer evaluateNum; |
| | | |
| | | /** |
| | | * 商品规格列表 |
| | |
| | | @ApiModelProperty("商品分类") |
| | | @NotEmpty(groups = {AddGroup.class}, message = "商品分类不能为空") |
| | | private List<Long> categoryIds; |
| | | |
| | | |
| | | @ApiModelProperty("商品描述") |
| | | private String goodsDescribe; |
| | | } |
| | | |
| | | |
| | |
| | | @ApiModelProperty(value = "支付单号") |
| | | private String payNo; |
| | | |
| | | @ApiModelProperty(value = "发货时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date deliveryTime; |
| | | |
| | | @ApiModelProperty(value = "收货时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date receivingTime; |
| | |
| | | |
| | | @ApiModelProperty(value = "商品规格图") |
| | | private String goodsAttrPic; |
| | | |
| | | @ApiModelProperty(value = "取消时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date cancelTime; |
| | | |
| | | @ApiModelProperty(value = "配送时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date deliveryTime; |
| | | |
| | | @ApiModelProperty(value = "送达时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date serviceTime; |
| | | |
| | | @ApiModelProperty(value = "是否可退款按钮显示 1.可退款 2.不可退款") |
| | | private Integer refundable = 1; |
| | | |
| | | @ApiModelProperty(value = "微信交易单号") |
| | | private String wxTardeNo; |
| | | } |
| | |
| | | @ApiModelProperty(value = "自提点信息") |
| | | private ConvenientElevatingPointVO convenientElevatingPointVO; |
| | | |
| | | @ApiModelProperty(value = "物流单号") |
| | | private String logisticsNo; |
| | | |
| | | @ApiModelProperty(value = "物流公司") |
| | | private String logisticsCompany; |
| | | |
| | | } |
| | |
| | | */ |
| | | @ApiModelProperty("商品名称") |
| | | private String goodsName; |
| | | |
| | | /** |
| | | * 商品规格名称 |
| | | */ |
| | | @ApiModelProperty("商品规格名称") |
| | | private String goodsAttrName; |
| | | |
| | | @ApiModelProperty(value = "店铺名称") |
| | | private String storeName; |
| | | |
| | | @ApiModelProperty(value = "订单金额") |
| | | private BigDecimal totalAmount; |
| | | |
| | | @ApiModelProperty(value = "自提点名称") |
| | | private String pointName; |
| | | } |
| | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createAt; |
| | | |
| | | |
| | | @ApiModelProperty("自提点地址") |
| | | private String address; |
| | | |
| | | @ApiModelProperty("自提点名称") |
| | | private String pointName; |
| | | |
| | | } |
| | |
| | | private String goodsDescribe; |
| | | |
| | | @ApiModelProperty("配送方式(1.自提 2.快递)") |
| | | private Integer deliveryType; |
| | | private String deliveryType; |
| | | |
| | | @ApiModelProperty("删除状态(1.未删除 2.已删除)") |
| | | private Integer deleteStatus; |
| | |
| | | |
| | | @ApiModelProperty("规格") |
| | | private List<AddShopFlowerGoodsAttrVO> goodsAttrs; |
| | | |
| | | @ApiModelProperty("所属分类") |
| | | private String categoryName; |
| | | /** |
| | | * 浏览量 |
| | | */ |
| | | @ApiModelProperty("浏览量") |
| | | private Integer viewNum; |
| | | |
| | | /** |
| | | * 规格名称 |
| | | */ |
| | | @ApiModelProperty("规格名称") |
| | | private String goodsAttrName; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.user; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class AreaVOStr implements Serializable { |
| | | @ApiModelProperty("区县名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("区县code") |
| | | private String id; |
| | | |
| | | @ApiModelProperty("下属街道列表") |
| | | private List<StreetVOStr> childList; |
| | | |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.user; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel |
| | | public class StreetVOStr { |
| | | @ApiModelProperty("街道id") |
| | | private String id; |
| | | |
| | | @ApiModelProperty("街道名") |
| | | private String name; |
| | | |
| | | @ApiModelProperty("下属社区列表") |
| | | private List<CommunityVO> childList; |
| | | } |
| | |
| | | private Integer isPartymember; |
| | | |
| | | private String imageUrl; |
| | | @ApiModelProperty(value = "微信小程序唯一标识") |
| | | private String openid; |
| | | |
| | | |
| | | /** |
| | | * 用户类型(用户类型 1 小程序 2 运营平台 3 社区平台 5 商家后台 6 网格综治APP 7 网格综治后台 8大屏 9城管后台 10一键报警app) |
| | |
| | | R pageNeighborByAdmin(@RequestBody ComActNeighborCircleAdminDTO comActNeighborCircleAdminDTO); |
| | | |
| | | /** |
| | | * 统计大屏查询清单列表 |
| | | * |
| | | * @param comActNeighborCircleAdminDTO |
| | | * 请求参数 |
| | | * @return 邻里圈列表 |
| | | */ |
| | | @PostMapping("/neighbor/pageNeighborByBigScreen") |
| | | R pageNeighborByBigScreen(@RequestBody ComActNeighborCircleAdminDTO comActNeighborCircleAdminDTO); |
| | | /** |
| | | * 后台修改邻里圈 |
| | | * |
| | | * @param editNeighborCircleAdminVO |
| | |
| | | * @return 订单详情 |
| | | */ |
| | | @GetMapping("/shopFlower/orderDetail") |
| | | R orderDetailFlower(@RequestParam("orderId") Long orderId); |
| | | R orderDetailFlower(@RequestParam("orderId") Long orderId,@RequestParam(value = "phone",required = false) String phone); |
| | | |
| | | /** |
| | | * 根据订单id取消订单 |
| | |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/selectOrderLineChart") R selectOrderLineChart(@RequestParam("storeId") Long storeId,@RequestParam("type") Integer type,@RequestParam("tab") Integer tab); |
| | | |
| | | /** |
| | | * 统计上架的上下架商品数量 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/shopFlower/countSaleByUserId") |
| | | R countSaleByUserId(@RequestParam("userId") Long userId); |
| | | |
| | | /** |
| | | * 查询统计基础数据 |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectBasicData") |
| | | R selectBasicData(); |
| | | |
| | | /** |
| | | * 统计在职干部特长 |
| | | * @return |
| | | */ |
| | | @GetMapping("/statisticsPbMemberType") |
| | | R statisticsPbMemberType(); |
| | | |
| | | |
| | | /** |
| | | * 统计单位 |
| | | * @return |
| | | */ |
| | | @GetMapping("/selectUnitByNatureName") |
| | | R selectUnitByNatureName(); |
| | | |
| | | /** |
| | | * 大屏-社区活动分页 |
| | | * @return |
| | | */ |
| | | @PostMapping("pageActivityBigScreen") |
| | | R pageActivityBigScreen(@RequestBody PageBaseDTO pageBaseDTO); |
| | | |
| | | /** |
| | | * 疫情防控 健康码统计 |
| | | * @return |
| | | */ |
| | | @GetMapping("/comActAcidRecord/selectColorMarkGroup") |
| | | R selectColorMarkGroup(); |
| | | |
| | | |
| | | @GetMapping("easyphoto/selectStatisticsPhoto") |
| | | R selectStatisticsPhoto(); |
| | | |
| | | /** |
| | | * 获取商家周围 n(km)的自提点数量 |
| | | * |
| | | * @param distance |
| | | * @return |
| | | */ |
| | | @GetMapping("/convenient/point/findPointNumByDistance") |
| | | R findPointNumByDistance(@RequestParam("distance") Integer distance, @RequestParam("lat") String lat, @RequestParam("lng") String lng); |
| | | |
| | | |
| | | } |
| | |
| | | // System.out.println(beforeDays); |
| | | List<String> yearMonths = getYearMonths(); |
| | | System.out.println(yearMonths); |
| | | List<String> latest12Month = getLatest12Month(LocalDate.now(), 10); |
| | | System.out.println(latest12Month); |
| | | |
| | | } |
| | | |
| | |
| | | } |
| | | return months; |
| | | } |
| | | |
| | | //获取当前12个月 |
| | | public static List<String> getLatest12Month(LocalDate date,int num){ |
| | | List<String> monthList = new ArrayList<>(); |
| | | for(int i = 0;i <= num-1; i++){ |
| | | LocalDate localDate = date.minusMonths(i); |
| | | String month = localDate.toString().substring(0,7); |
| | | monthList.add(month); |
| | | } |
| | | return monthList; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | paramMap.put("sign",WXPayUtil.generateSignature(paramMap,PayCpmstant.REFUND_KEY)); |
| | | log.info("微信退款请求参数:{},{},{},{}",url,WXPayUtil.mapToXml(paramMap),mchId,isTest); |
| | | //接收请求返回值 |
| | | String content = HttpClientUtil.doRefund(url,WXPayUtil.mapToXml(paramMap),mchId,isTest); |
| | | log.info("微信退款返回字符串:{}",content); |
| | | Map<String, String> resultMap = PayUtil.doXMLParse(content); |
| | | if (PayCpmstant.RETURN_CODE.equals(resultMap.get(PayCpmstant.RETURN_CODE_CODE)) |
| | | && PayCpmstant.RETURN_CODE.equals(resultMap.get(PayCpmstant.RESULT_CODE_CODE))) { |
| | | log.info("调用微信退款申请接口成功"); |
| | | return JSONObject.toJSONString(resultMap); |
| | | }else{ |
| | | log.error("调用微信退款申请接口失败"); |
| | | return ""; |
| | | } |
| | | return HttpClientUtil.doRefund(url,WXPayUtil.mapToXml(paramMap),mchId,isTest); |
| | | |
| | | } |
| | | } |
| | |
| | | log.error(e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 推送 商家开始配送后 订单配送通知 |
| | | * @param openId 用户openid |
| | | * @param accessToken token会话标识 |
| | | */ |
| | | public static void sendStartShipping(String openId, String accessToken, String orderNo){ |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id("ezwzGs3R5DMuKxTyW8xOIQOIsLpW2sS61ZXsfyll7rw"); |
| | | List<TemplateParam> paras=new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("character_string2", orderNo)); |
| | | paras.add(new TemplateParam("phrase5", "配送中")); |
| | | paras.add(new TemplateParam("thing8","您的订单已开始配送")); |
| | | subscribeDTO.setTemplateParamList(paras); |
| | | try { |
| | | sendSubscribe(accessToken,subscribeDTO); |
| | | }catch (Exception e){ |
| | | log.error("商家开始配送后订阅消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 推送 商家送达后 用取货通知 |
| | | * @param openId 用户openid |
| | | * @param accessToken token会话标识 |
| | | */ |
| | | public static void sendService(String openId, String accessToken, String pointName){ |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id("6RGbNmRrmGNWyeK7UDodYTItNqEnIIdtlgyzeGLI2w8"); |
| | | List<TemplateParam> paras=new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("phrase3", "待收货")); |
| | | paras.add(new TemplateParam("thing7", "您有一个订单已到达自提点,请及时取货")); |
| | | paras.add(new TemplateParam("thing5",pointName)); |
| | | subscribeDTO.setTemplateParamList(paras); |
| | | try { |
| | | sendSubscribe(accessToken,subscribeDTO); |
| | | }catch (Exception e){ |
| | | log.error("取货通知订阅消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | /** |
| | | * 推送 商家发货后 发货通知 |
| | | * @param openId 用户openid |
| | | * @param accessToken token会话标识 |
| | | */ |
| | | public static void sendDeliverGoodsNotice(String openId, String accessToken, String logisticsCompany , String logisticsNo, String orderNo,String deliverTime){ |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id("PuE0cYU9xUW7Y6XpW-wqz4Hlj1w2mnI_LprsUByJnGg"); |
| | | List<TemplateParam> paras=new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("thing2", "您有一个订单已发货")); |
| | | paras.add(new TemplateParam("thing3", logisticsCompany)); |
| | | paras.add(new TemplateParam("character_string4",logisticsNo)); |
| | | paras.add(new TemplateParam("character_string5",orderNo)); |
| | | paras.add(new TemplateParam("time6",deliverTime)); |
| | | subscribeDTO.setTemplateParamList(paras); |
| | | try { |
| | | sendSubscribe(accessToken,subscribeDTO); |
| | | }catch (Exception e){ |
| | | log.error("商家发货后订阅消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 推送 商家处理完退款申请后 订单退款通知 |
| | | * @param openId 用户openid |
| | | * @param accessToken token会话标识 |
| | | */ |
| | | public static void sendRefundNotice(String openId, String accessToken, String refundNo , String refundAmount, String result){ |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id("GxFV_Oj1Pri4NnPkvKGPIPJsPryG8M6DW9mTHTbIrjE"); |
| | | List<TemplateParam> paras=new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("character_string6", refundNo)); |
| | | paras.add(new TemplateParam("amount9", refundAmount)); |
| | | paras.add(new TemplateParam("phrase11",result)); |
| | | subscribeDTO.setTemplateParamList(paras); |
| | | try { |
| | | sendSubscribe(accessToken,subscribeDTO); |
| | | }catch (Exception e){ |
| | | log.error("订单退款通知 订阅消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 推送 新订单提醒 商家收到一个新的订单 |
| | | * @param openId 用户openid |
| | | * @param accessToken token会话标识 |
| | | */ |
| | | public static void sendNewOrderNotice(String openId, String accessToken, String orderNo , String type, String goodsName,String amount,String orderTime){ |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id("3EwAKLw2Xe2o-GDnH-NUGa4nNwqPXsn01hBX8Xp2PbU"); |
| | | List<TemplateParam> paras=new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("character_string1", orderNo)); |
| | | paras.add(new TemplateParam("thing5", type)); |
| | | paras.add(new TemplateParam("thing3",goodsName)); |
| | | paras.add(new TemplateParam("amount4",amount)); |
| | | paras.add(new TemplateParam("time2",orderTime)); |
| | | subscribeDTO.setTemplateParamList(paras); |
| | | try { |
| | | sendSubscribe(accessToken,subscribeDTO); |
| | | }catch (Exception e){ |
| | | log.error("新订单提醒 订阅消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 推送 退款申请通知 商家收到一个退款申请 |
| | | * @param openId 用户openid |
| | | * @param accessToken token会话标识 |
| | | */ |
| | | public static void sendNewRefundOrderNotice(String openId, String accessToken, String refundNo , String refundAmount,String orderTime){ |
| | | WxSubscribeDTO subscribeDTO = new WxSubscribeDTO(); |
| | | subscribeDTO.setTouser(openId); |
| | | subscribeDTO.setTemplate_id("3EwAKLw2Xe2o-GDnH-NUGa4nNwqPXsn01hBX8Xp2PbU"); |
| | | List<TemplateParam> paras=new ArrayList<TemplateParam>(); |
| | | paras.add(new TemplateParam("thing5", "您有一个退款订单")); |
| | | paras.add(new TemplateParam("character_string2", refundNo)); |
| | | paras.add(new TemplateParam("amount3",refundAmount)); |
| | | paras.add(new TemplateParam("time4",orderTime)); |
| | | subscribeDTO.setTemplateParamList(paras); |
| | | try { |
| | | sendSubscribe(accessToken,subscribeDTO); |
| | | }catch (Exception e){ |
| | | log.error("退款申请通知 订阅消息推送失败,失败原因:" + e.getMessage()); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | public static void main(String[] args) { |
| | | |
| | | WxXCXTempSend util = new WxXCXTempSend(); |
New file |
| | |
| | | package com.panzhihua.community_backstage.api; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO; |
| | | import com.panzhihua.common.model.dtos.neighbor.DetailNeighborAllCommentByAdminDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.LoginUserInfoVO; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.*; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidColorChartsVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ActivityAnalysisVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO; |
| | | import com.panzhihua.common.model.vos.neighbor.ComActNeighborCommentByAdminVO; |
| | | import com.panzhihua.common.service.community.CommunityService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * @ClasssName BasicScreenApi |
| | | * @Description TODO |
| | | * @Author yh |
| | | * @Date 2022-11-08 17:25:45 |
| | | * @Version 1.0 |
| | | **/ |
| | | @Slf4j |
| | | @RestController |
| | | @RequestMapping("/basicScreen") |
| | | @Api(tags = {"攀枝花市可视化大屏"}) |
| | | public class BasicScreenApi extends BaseController { |
| | | |
| | | @Resource |
| | | private CommunityService communityService; |
| | | |
| | | |
| | | /** |
| | | * 查询统计基础数据 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("selectBasicData") |
| | | @ApiOperation(value = "统计基础数据", response = ComBasicDataVo.class) |
| | | public R selectBasicData() { |
| | | return communityService.selectBasicData(); |
| | | } |
| | | |
| | | /** |
| | | * 统计在职干部特长 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("statisticsPbMemberType") |
| | | @ApiOperation(value = "在职干部特长") |
| | | public R statisticsPbMemberType() { |
| | | return communityService.statisticsPbMemberType(); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 统计大屏查询清单列表 |
| | | * |
| | | * @param comActNeighborCircleAdminDTO 请求参数 |
| | | * @return 邻里圈列表 |
| | | */ |
| | | @PostMapping("pageNeighborByAdmin") |
| | | @ApiOperation(value = "清单列表分页", response = ComActNeighborCircleAdminVO.class) |
| | | public R pageNeighborByBigScreen(@RequestBody ComActNeighborCircleAdminDTO comActNeighborCircleAdminDTO) { |
| | | return communityService.pageNeighborByBigScreen(comActNeighborCircleAdminDTO); |
| | | } |
| | | |
| | | /** |
| | | * 单位统计 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("selectUnitByNatureName") |
| | | @ApiOperation(value = "单位统计") |
| | | public R selectUnitByNatureName() { |
| | | return communityService.selectUnitByNatureName(); |
| | | } |
| | | |
| | | /** |
| | | * 大屏-社区活动分页 |
| | | * |
| | | * @return |
| | | */ |
| | | @PostMapping("pageActivityBigScreen") |
| | | @ApiOperation(value = "大屏-社区活动分页", response = ComActActivityBigScreenVO.class) |
| | | public R pageActivityBigScreen(@RequestBody PageBaseDTO pageBaseDTO) { |
| | | return communityService.pageActivityBigScreen(pageBaseDTO); |
| | | } |
| | | |
| | | @ApiOperation(value = "单位活动统计 range,year", response = ActivityAnalysisVO.class) |
| | | @GetMapping("activity/analysis") |
| | | public R activityUnitAnalysis(@RequestParam(value = "year", required = false) Integer year, |
| | | @RequestParam(value = "type", required = false) Integer type, |
| | | @RequestParam(value = "range", required = false) Integer range, |
| | | @RequestParam(value = "communityId", required = false) Long communityId, |
| | | @RequestParam(value = "page", required = false) Integer page, |
| | | @RequestParam(value = "size", required = false) Integer size, |
| | | @RequestParam(value = "belongTo", required = false) String belongTo, |
| | | @RequestParam(value = "unitId", required = false) Long unitId) { |
| | | return communityService.institutionalUnitServiceAnalysis(year, type, range, communityId, page, size, belongTo, unitId, this.getLoginUserInfo().getAccount()); |
| | | } |
| | | |
| | | /** |
| | | * 疫情防控 健康码统计 |
| | | * |
| | | * @return |
| | | */ |
| | | @GetMapping("selectColorMarkGroup") |
| | | @ApiOperation(value = "疫情防控 健康码统计", response = ComActAcidColorChartsVO.class) |
| | | public R selectColorMarkGroup() { |
| | | return communityService.selectColorMarkGroup(); |
| | | } |
| | | |
| | | @ApiOperation(value = "清单详情接口", response = ComActNeighborCircleAdminVO.class) |
| | | @GetMapping("/neighbor/detail") |
| | | public R neighborDetail(@RequestParam("id") Long id) { |
| | | return communityService.detailNeighborByAdmin(id); |
| | | } |
| | | |
| | | @ApiOperation(value = "清单详情的所有评论接口", response = ComActNeighborCommentByAdminVO.class) |
| | | @PostMapping("/neighbor/detail/comment") |
| | | public R detailNeighborAllCommentByAdmin(@RequestBody DetailNeighborAllCommentByAdminDTO dto) { |
| | | return communityService.detailNeighborAllCommentByAdmin(dto); |
| | | } |
| | | |
| | | @ApiOperation(value = "活动详情", response = ComActActivityVO.class) |
| | | @GetMapping("detailactivity") |
| | | public R detailActivity(@RequestParam("id") Long id, @RequestParam(value = "pageNum", required = false) Long pageNum, @RequestParam(value = "pageSize", required = false) Long pageSize) { |
| | | return communityService.detailActivity(id, null, pageNum, pageSize); |
| | | } |
| | | |
| | | @ApiOperation(value = "网格治理", response = StatisticsPhotoVO.class) |
| | | @GetMapping("easyphoto/selectStatisticsPhoto") |
| | | public R selectStatisticsPhoto() { |
| | | return communityService.selectStatisticsPhoto(); |
| | | } |
| | | |
| | | @ApiOperation(value = "分页展示社区随手拍", response = ComActEasyPhotoVO.class) |
| | | @PostMapping("pageeasyphoto") |
| | | public R pageEasyPhoto(@RequestBody ComActEasyPhotoVO comActEasyPhotoVO) { |
| | | LoginUserInfoVO loginUserInfo = this.getLoginUserInfoSureNoLogin(); |
| | | if (loginUserInfo != null) { |
| | | comActEasyPhotoVO.setCommunityId(loginUserInfo.getCommunityId()); |
| | | comActEasyPhotoVO.setLogInUserId(loginUserInfo.getUserId()); |
| | | comActEasyPhotoVO.setIsDpcMember(loginUserInfo.getIsDpcMember()); |
| | | } |
| | | return communityService.pageEasyPhotoApplets(comActEasyPhotoVO); |
| | | } |
| | | |
| | | @ApiOperation(value = "随手拍详情", response = ComActEasyPhotoVO.class) |
| | | @GetMapping("easyphoto") |
| | | public R detailEasyPhoto(@RequestParam("id") Long id) { |
| | | Long userId = this.getUserId(); |
| | | return communityService.detailEasyPhoto(id, userId); |
| | | } |
| | | } |
| | |
| | | @ApiOperation(value = "分页查询商品", response = PageShopGoodsVO.class) |
| | | @PostMapping("/goods/page") |
| | | public R pageGoodsList(@RequestBody PageComShopFlowerGoodsDTO pageComShopGoodsDTO) { |
| | | pageComShopGoodsDTO.setUserId(this.getUserId()); |
| | | return communityService.pageFlowerGoodsList(pageComShopGoodsDTO); |
| | | } |
| | | |
| | |
| | | @ApiOperation(value = "订单_详细", response = ComShopFlowerOrderPageVO.class) |
| | | @GetMapping("/order/detail") |
| | | public R detail(@RequestParam("orderId") Long orderId) { |
| | | return communityService.orderDetailFlower(orderId); |
| | | return communityService.orderDetailFlower(orderId,null); |
| | | } |
| | | |
| | | /** |
| | |
| | | @ApiOperation(value = "商家后台-退款订单 分页查询",response = ComShopFlowerRefundOrderVO.class) |
| | | public R pageRefundOrder(@RequestBody PageComOrderRefundDTO pageComOrderRefundDTO){ |
| | | pageComOrderRefundDTO.setBackstageUserId(this.getUserId()); |
| | | pageComOrderRefundDTO.setStoreId(null); |
| | | return communityService.pageRefundOrder(pageComOrderRefundDTO); |
| | | } |
| | | |
| | |
| | | return communityService.selectOrderLineChart(storeId,type,tab); |
| | | } |
| | | |
| | | /** |
| | | * 统计上架的上下架商品数量 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "商家后台-上下架商品数量") |
| | | @GetMapping("/countSale") |
| | | public R countSale(){ |
| | | return communityService.countSaleByUserId(this.getUserId()); |
| | | } |
| | | |
| | | } |
| | |
| | | public R checkCommit(@RequestParam(value = "userId",required = false)Long userId){ |
| | | return this.comActAcidRecordService.checkCommit(userId); |
| | | } |
| | | |
| | | @GetMapping("/selectColorMarkGroup") |
| | | public R selectColorMarkGroup(){ |
| | | return this.comActAcidRecordService.selectColorMarkGroup(); |
| | | } |
| | | } |
| | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.controller.BaseController; |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.community.ActivityInviteDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageActivityInviteDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | |
| | | return automessageSysUserService.selectAutomessageSysUserById(id); |
| | | } |
| | | |
| | | /** |
| | | * 根据id查询重复的社区id集合 |
| | | * @return |
| | | */ |
| | | @GetMapping("selectBasicData") |
| | | public R selectBasicData(){ |
| | | return comActService.selectBasicData(); |
| | | } |
| | | |
| | | /** |
| | | * 统计在职干部特长 |
| | | * @return |
| | | */ |
| | | @GetMapping("statisticsPbMemberType") |
| | | public R statisticsPbMemberType(){ |
| | | return comActService.statisticsPbMemberType(); |
| | | } |
| | | |
| | | /** |
| | | * 统计单位 |
| | | * @return |
| | | */ |
| | | @GetMapping("selectUnitByNatureName") |
| | | public R selectUnitByNatureName(){ |
| | | return comActService.selectUnitByNatureName(); |
| | | } |
| | | |
| | | /** |
| | | * 大屏-社区活动分页 |
| | | * @return |
| | | */ |
| | | @PostMapping("pageActivityBigScreen") |
| | | public R pageActivityBigScreen(@RequestBody PageBaseDTO pageBaseDTO){ |
| | | return comActActivityService.pageActivityBigScreen(pageBaseDTO); |
| | | } |
| | | |
| | | @GetMapping("easyphoto/selectStatisticsPhoto") |
| | | public R selectStatisticsPhoto() { |
| | | return comActEasyPhotoService.selectStatisticsPhoto(); |
| | | } |
| | | |
| | | } |
| | |
| | | public R findPointByMerchantId(@RequestParam("merchantId") Long merchantId, @RequestParam("lat") String lat, @RequestParam("lng") String lng) { |
| | | return convenientElevatingPointService.findPointByMerchantId(merchantId, lat, lng); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取商家周围 n(km)的自提点数量 |
| | | * |
| | | * @param distance |
| | | * @return |
| | | */ |
| | | @GetMapping("/point/findPointNumByDistance") |
| | | public R findPointNumByDistance(@RequestParam("distance") Integer distance, @RequestParam("lat") String lat, @RequestParam("lng") String lng) { |
| | | return convenientElevatingPointService.findPointNumByDistance(distance, lat, lng); |
| | | } |
| | | } |
| | |
| | | } |
| | | |
| | | /** |
| | | * 统计大屏查询清单列表 |
| | | * |
| | | * @param comActNeighborCircleAdminDTO |
| | | * 请求参数 |
| | | * @return 邻里圈列表 |
| | | */ |
| | | @PostMapping("pageNeighborByBigScreen") |
| | | public R pageNeighborByBigScreen(@RequestBody ComActNeighborCircleAdminDTO comActNeighborCircleAdminDTO) { |
| | | return comActNeighborCircleService.pageNeighborByBigScreen(comActNeighborCircleAdminDTO); |
| | | } |
| | | /** |
| | | * 后台添加邻里圈 |
| | | * |
| | | * @param addNeighborCircleAdminVO |
| | |
| | | * @return 订单详情 |
| | | */ |
| | | @GetMapping("orderDetail") |
| | | public R orderDetailFlower(@RequestParam("orderId") Long orderId) { |
| | | return comShopFlowerOrderService.orderDetail(orderId); |
| | | public R orderDetailFlower(@RequestParam("orderId") Long orderId,@RequestParam(value = "phone",required = false) String phone) { |
| | | return comShopFlowerOrderService.orderDetail(orderId,phone); |
| | | } |
| | | |
| | | /** |
| | |
| | | return comShopFlowerOrderService.pageOrderByDeliveryNo(pageComFlowerOrderListDTO); |
| | | } |
| | | |
| | | /** |
| | | * 统计上架的上下架商品数量 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | @GetMapping("/countSaleByUserId") |
| | | R countSaleByUserId(@RequestParam("userId") Long userId){ |
| | | return comShopFlowerGoodsService.countSaleByUserId(userId); |
| | | } |
| | | |
| | | } |
| | |
| | | public static final String ACID_MESSAGE_ROUTING_KEY = "huacheng.acid.message.key"; |
| | | public static final String ACID_MESSAGE_EXCHANGE = "huacheng.acid.message.exchange"; |
| | | |
| | | /** |
| | | * 服务商城订单 |
| | | */ |
| | | public static final String SHOP_ORDER_QUEUE="huacheng.shop.order.queue"; |
| | | public static final String SHOP_ORDER_ROUTING_KEY = "huacheng.shop.order.key"; |
| | | public static final String SHOP_ORDER_EXCHANGE = "huacheng.shop.order.exchange"; |
| | | |
| | | @Bean |
| | | public Queue preOrderQueue(){ |
| | | return new Queue(PreOrder_QUEUE,true,false,false,null); |
| | |
| | | } |
| | | |
| | | |
| | | @Bean |
| | | public Queue shopOrderQueue(){ |
| | | return new Queue(SHOP_ORDER_QUEUE,true,false,false,null); |
| | | } |
| | | |
| | | @Bean |
| | | public Exchange shopOrderExchange(){ |
| | | Map<String, Object> arguments = new HashMap<>(); |
| | | arguments.put("x-delayed-type", ExchangeTypes.DIRECT); |
| | | return new CustomExchange(SHOP_ORDER_EXCHANGE,"x-delayed-message",true,false,arguments); |
| | | } |
| | | |
| | | @Bean |
| | | public Binding shopOrderBinding(){ |
| | | return BindingBuilder.bind(shopOrderQueue()).to(shopOrderExchange()).with(SHOP_ORDER_ROUTING_KEY).noargs(); |
| | | } |
| | | } |
| | | |
| | |
| | | * @return |
| | | */ |
| | | void batchCheck(@Param("batchCheckAcidRecordDTO") BatchCheckAcidRecordDTO batchCheckAcidRecordDTO); |
| | | |
| | | /** |
| | | * 统计所有红 黄 绿码 |
| | | * @return |
| | | */ |
| | | List<ComActAcidColorChartsVO> selectColorMarkGroup(); |
| | | |
| | | /** |
| | | * 按月份统计红 黄 绿码 数量 |
| | | * @return |
| | | */ |
| | | List<ComActAcidColorChartsVO> selectColorMarkGroupByMonth(); |
| | | |
| | | } |
| | |
| | | IPage<ComActActivityVO> pageProjectActivity(@Param("page") Page page, @Param("comActActivityVO") ComActActivityVO comActActivityVO); |
| | | |
| | | List<String> selectOpenIdByActivityId(Long id); |
| | | |
| | | /** |
| | | * 大屏社区活动列表 |
| | | * @param page |
| | | * @return |
| | | */ |
| | | IPage<ComActActivityBigScreenVO> pageActivityBigScreen(@Param("page") Page page); |
| | | |
| | | } |
| | |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActPasswordVo; |
| | | import com.panzhihua.common.model.vos.community.DataCount; |
| | | import com.panzhihua.common.model.vos.partybuilding.ComPbMemberTypeVO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.apache.ibatis.annotations.Select; |
| | |
| | | @Select("SELECT caa.community_id FROM com_act caa WHERE caa.`name` = ( select ca.`name` FROM com_act ca WHERE ca.community_id =#{id})") |
| | | List<Long> selectIds(@Param("id") Long id); |
| | | |
| | | |
| | | /** |
| | | * 统计全部社区/村落数量 |
| | | * @return |
| | | */ |
| | | @Select("SELECT count(1) FROM `com_act` WHERE app_id = 'wx118de8a734d269f0' and community_id not in ( 11 ,22)") |
| | | Integer countCommunity(); |
| | | |
| | | /** |
| | | * 统计实有人口数 |
| | | * @return |
| | | */ |
| | | @Select(" SELECT count(1) FROM com_mng_population WHERE death = 0") |
| | | Integer countPopulation(); |
| | | |
| | | /** |
| | | * 统计实有房屋数 |
| | | * @return |
| | | */ |
| | | @Select(" SELECT count(1) FROM com_mng_population_house") |
| | | Integer countPopulationHouse(); |
| | | |
| | | |
| | | /** |
| | | * 统计报道在职干部 西区+花城 |
| | | * @return |
| | | */ |
| | | @Select(" SELECT sum(a.member) FROM (SELECT count(1) member FROM com_pb_member union all SELECT count(1) member FROM com_pb_member_west) a") |
| | | Integer countPbMember(); |
| | | /** |
| | | * 统计报到单位 |
| | | * @return |
| | | */ |
| | | @Select(" SELECT count(1) FROM com_pb_check_unit") |
| | | Integer countPbUnit(); |
| | | |
| | | /** |
| | | * 统计商家 |
| | | * @return |
| | | */ |
| | | @Select(" SELECT count(1) FROM com_convenient_merchants WHERE is_del = 0") |
| | | Integer countMerchants(); |
| | | |
| | | /** |
| | | * 统计自愿者 |
| | | * @return |
| | | */ |
| | | @Select("SELECT count(1) FROM sys_user WHERE is_volunteer = 1") |
| | | Integer countVolunteer(); |
| | | |
| | | /** |
| | | * 统计社会组织 |
| | | * @return |
| | | */ |
| | | @Select("SELECT count(1) FROM com_act_social_org") |
| | | Integer countSocialOrg(); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.easyPhoto.ExportEasyPhotoDTO; |
| | | import com.panzhihua.common.model.vos.community.ComActEasyPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsCommVO; |
| | | import com.panzhihua.common.model.vos.community.StatisticsPhotoVO; |
| | | import com.panzhihua.common.model.vos.community.TodoEventsVO; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenDpcStatisticsInfo; |
| | | import com.panzhihua.common.model.vos.community.bigscreen.BigScreenEasyPhotoStatisticsInfo; |
| | |
| | | * */ |
| | | List<BannerVO> getBanner(@Param("communityId") Long communityId); |
| | | |
| | | /** |
| | | * 统计所有随手拍,分状态 |
| | | * @return |
| | | */ |
| | | List<StatisticsPhotoVO> selectPhotoAll(); |
| | | |
| | | /** |
| | | * 统计所有随手拍,分状态 |
| | | * @return |
| | | */ |
| | | List<StatisticsPhotoVO> selectPhotoByMonth(); |
| | | |
| | | } |
| | |
| | | |
| | | IPage<ComActNeighborCircleAdminVO> pageNeighborByAdmin(Page page,@Param("neighborCircleAdminDTO") ComActNeighborCircleAdminDTO neighborCircleAdminDTO); |
| | | |
| | | /** |
| | | * 大屏清单查询 |
| | | * @param page |
| | | * @param neighborCircleAdminDTO |
| | | * @return |
| | | */ |
| | | IPage<ComActNeighborCircleAdminVO> pageNeighborByBigScreen(Page page,@Param("neighborCircleAdminDTO") ComActNeighborCircleAdminDTO neighborCircleAdminDTO); |
| | | |
| | | @Select("select * from sys_user where user_id=#{userId}") |
| | | AdministratorsUserVO selectUserByUserId(@Param("userId") Long userId); |
| | | |
| | |
| | | int expertSolveCountCommunity(); |
| | | |
| | | /** |
| | | * 行业分中心专家受理数量 |
| | | * 行业分中心专家受理数量计算 |
| | | * */ |
| | | int expertSolveCountCenter(); |
| | | |
| | |
| | | * @return |
| | | */ |
| | | Integer checkIsVolunteer(@Param("userId") Long userId); |
| | | |
| | | /** |
| | | * 统计在职干部特长 |
| | | * @return |
| | | */ |
| | | List<ComPbMemberTypeVO> statisticsPbMemberType(); |
| | | |
| | | /** |
| | | * 单位类型 |
| | | * @return |
| | | */ |
| | | List<ComPbMemberTypeVO> selectUnitByNatureName(); |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | BigDecimal statisticsScore(@Param("storeId") Long storeId); |
| | | |
| | | Integer selectCountByGoodsId(@Param("goodsId") Long goodsId); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopFlowerGoodsDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComShopFlowerStoreDTO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerGoodsVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO; |
| | | import com.panzhihua.common.model.vos.shop.PageShopFlowerGoodsVO; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerGoodsDO; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @auther yh |
| | |
| | | /** |
| | | * 根据店铺id查询商品列表 |
| | | * |
| | | * @param page 分页参数 |
| | | * @param page 分页参数 |
| | | * @param pageComShopFlowerStoreDTO 请求参数 |
| | | * @return 分页商品列表 |
| | | */ |
| | |
| | | /** |
| | | * 分页查询商品列表 |
| | | * |
| | | * @param page 分页参数 |
| | | * @param page 分页参数 |
| | | * @param comShopFlowerGoodsDTO 请求参数 |
| | | * @return 商品列表 |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 商店内在售商品 |
| | | * |
| | | * @param storeId |
| | | * @return |
| | | */ |
| | | Integer selectCountSaleByStoreId(@Param("storeId") Long storeId); |
| | | |
| | | List<ComShopOrderStoreIdCountVO> countSaleByUserId(@Param("userId") Long userId); |
| | | } |
| | |
| | | |
| | | List<ComShopOrderStoreIdCountVO> selectCountByStoreId(@Param("storeId") Long storeId, @Param("deliveryType") Integer deliveryType); |
| | | |
| | | List<ComShopOrderStoreIdCountVO> selectSumAmountByStoreId(@Param("storeId") Long storeId); |
| | | List<ComShopOrderStoreIdNumVO> selectSumAmountByStoreId(@Param("storeId") Long storeId); |
| | | |
| | | /** |
| | | * 获取商家总营业额 |
| | |
| | | List<ComShopOrderCountVO> selectCountGroupStatus(@Param("storeId") Long storeId); |
| | | |
| | | int updateCancel(@Param("id") Long id, @Param("status") Integer status); |
| | | |
| | | int selectCountRefundNowByOrderId(@Param("orderId") Long orderId); |
| | | } |
| | |
| | | * @param merchantId |
| | | * @return serviceIds |
| | | */ |
| | | List<Long> selectServiceIdsForMerchant(@Param("merchantId") Long merchantId); |
| | | List<String> selectServiceIdsForMerchant(@Param("merchantId") Long merchantId); |
| | | |
| | | /** |
| | | * 查看服务分类是否被引用 |
New file |
| | |
| | | package com.panzhihua.service_community.message; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerOrderVO; |
| | | import com.panzhihua.service_community.dao.ComShopFlowerOrderDAO; |
| | | import com.panzhihua.service_community.dao.ComShopFlowerOrderGoodsDAO; |
| | | import com.panzhihua.service_community.dao.RentingHourseOrderDao; |
| | | import com.panzhihua.service_community.dao.RentingHourseRegisterDao; |
| | | import com.panzhihua.service_community.entity.RentingHourseOrder; |
| | | import com.panzhihua.service_community.entity.RentingHourseRegister; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerOrderDO; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerOrderGoodsDO; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.amqp.rabbit.annotation.RabbitListener; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | | * @author yh |
| | | * 商城订单处理 |
| | | */ |
| | | @Component |
| | | @Slf4j |
| | | public class ShopOrderMessage { |
| | | public static final String DELAYED_QUEUE="huacheng.shop.order.queue"; |
| | | |
| | | @Resource |
| | | private ComShopFlowerOrderDAO comShopFlowerOrderDAO; |
| | | @Resource |
| | | private ComShopFlowerOrderGoodsDAO comShopFlowerOrderGoodsDAO; |
| | | |
| | | @RabbitListener(queues=DELAYED_QUEUE) |
| | | public void cancelOrder(ComShopFlowerOrderVO shopOrderVO){ |
| | | ComShopFlowerOrderDO comShopFlowerOrderDO = comShopFlowerOrderDAO.selectById(shopOrderVO.getOrderId()); |
| | | if (nonNull(comShopFlowerOrderDO)){ |
| | | //30分钟未付款删除订单 |
| | | if (comShopFlowerOrderDO.getStatus() == ComShopFlowerOrderDO.status.dfk){ |
| | | log.info("30分钟超时未支付订单进行删除"); |
| | | comShopFlowerOrderGoodsDAO.delete(new LambdaQueryWrapper<ComShopFlowerOrderGoodsDO>().eq(ComShopFlowerOrderGoodsDO::getOrderId, shopOrderVO.getOrderId())); |
| | | comShopFlowerOrderDAO.deleteById(shopOrderVO.getOrderId()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | } |
| | |
| | | private Date evaluateTime; |
| | | |
| | | /** |
| | | * 评价类型(1.非常满意 2.满意 3.一般 4.不满意 5.糟糕透了) |
| | | * 评价类型(5.非常满意 4.满意 3.一般 3.不满意 1.糟糕透了) |
| | | */ |
| | | @TableField(value = "evaluate_type") |
| | | private Integer evaluateType; |
| | |
| | | /** |
| | | * 商品展示图 |
| | | */ |
| | | @TableField(updateStrategy = FieldStrategy.IGNORED) |
| | | private String images; |
| | | |
| | | /** |
| | |
| | | private String refundOrderNo; |
| | | |
| | | /** |
| | | * 订单状态(1.处理中 2.退款成功 3.退款失败 4.已取消 5.退款中) |
| | | * 订单状态(9.处理中 10.退款成功 11.退款失败 12.已取消 13.退款中) |
| | | */ |
| | | @TableField(value = "status") |
| | | private Integer status; |
| | |
| | | * 提货点地址 |
| | | */ |
| | | private String address; |
| | | |
| | | /** |
| | | * 提货点地址详细地址 |
| | | */ |
| | | private String detailAddress; |
| | | /** |
| | | * 联系人 |
| | | */ |
| | |
| | | R batchCheck(BatchCheckAcidRecordDTO batchCheckAcidRecordDTO); |
| | | |
| | | R checkCommit(Long userId); |
| | | |
| | | /** |
| | | * 疫情防控 健康码统计 |
| | | * @return |
| | | */ |
| | | R selectColorMarkGroup(); |
| | | } |
| | |
| | | import java.util.List; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.community.ActivityInviteDTO; |
| | | import com.panzhihua.common.model.dtos.community.PageActivityInviteDTO; |
| | | import com.panzhihua.common.model.dtos.community.bigscreen.work.ScreenActActivityListDTO; |
| | |
| | | * @return |
| | | */ |
| | | R exportPartyMemberDetail(CommonPage commonPage); |
| | | |
| | | /** |
| | | * 大屏-社区活动分页 |
| | | * @param commonPage |
| | | * @return |
| | | */ |
| | | R pageActivityBigScreen(PageBaseDTO pageBaseDTO); |
| | | } |
| | |
| | | * 获取社区置顶动态banner |
| | | * */ |
| | | R getUserRewardNew(Long userId, Long communityId); |
| | | |
| | | /** |
| | | * 统计随手拍 |
| | | * @return |
| | | */ |
| | | R selectStatisticsPhoto(); |
| | | } |
| | |
| | | R pageNeighborByAdmin(ComActNeighborCircleAdminDTO comActNeighborCircleAdminDTO); |
| | | |
| | | /** |
| | | * 统计大屏查询清单列表 |
| | | * @param neighborCircleAdminDTO |
| | | * @return |
| | | */ |
| | | R pageNeighborByBigScreen(ComActNeighborCircleAdminDTO neighborCircleAdminDTO); |
| | | |
| | | /** |
| | | * 邻里圈_添加 |
| | | * |
| | | * @param addNeighborCircleAdminVO |
| | |
| | | R getCommunityPassword(Long communityId); |
| | | |
| | | R selectIds(Long id); |
| | | |
| | | /** |
| | | * 统计大屏-基础数据 |
| | | * @return |
| | | */ |
| | | R selectBasicData(); |
| | | |
| | | /** |
| | | * 统计在职干部特长 |
| | | * @return |
| | | */ |
| | | R statisticsPbMemberType(); |
| | | |
| | | /** |
| | | * 单位统计 |
| | | * @return |
| | | */ |
| | | R selectUnitByNatureName(); |
| | | |
| | | } |
| | |
| | | */ |
| | | R incrGoodsView(Long goodsId); |
| | | |
| | | /** |
| | | * 统计上架的上下架商品数量 |
| | | * @param userId |
| | | * @return |
| | | */ |
| | | R countSaleByUserId(Long userId); |
| | | |
| | | } |
| | |
| | | * 订单id |
| | | * @return 订单详情 |
| | | */ |
| | | R orderDetail(Long orderId); |
| | | R orderDetail(Long orderId,String phone); |
| | | |
| | | /** |
| | | * 根据订单id取消订单 |
| | |
| | | * @return |
| | | */ |
| | | R findPointByMerchantId(Long merchantId,String lat,String lng); |
| | | |
| | | /** |
| | | * 获取商家周围 n(km)的自提点数量 |
| | | * @param distance |
| | | * @param lat |
| | | * @param lng |
| | | * @return |
| | | */ |
| | | R findPointNumByDistance(Integer distance, String lat, String lng); |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.baomidou.mybatisplus.core.toolkit.ObjectUtils.isNotEmpty; |
| | | import static com.baomidou.mybatisplus.core.toolkit.ObjectUtils.isNull; |
| | |
| | | } |
| | | return 3; |
| | | } |
| | | |
| | | /** |
| | | * 统计红黄绿码 |
| | | * @return |
| | | */ |
| | | public R selectColorMarkGroup(){ |
| | | //所有 |
| | | List<ComActAcidColorChartsVO> comActAcidColorChartsVOS = this.baseMapper.selectColorMarkGroup(); |
| | | int all = comActAcidColorChartsVOS.stream().mapToInt(ComActAcidColorChartsVO::getCountNum).sum(); |
| | | for (ComActAcidColorChartsVO comActAcidColorChartsVO : comActAcidColorChartsVOS) { |
| | | if (0!=all){ |
| | | BigDecimal countNum = new BigDecimal(comActAcidColorChartsVO.getCountNum()); |
| | | BigDecimal allDecimal = new BigDecimal(all); |
| | | BigDecimal percent = countNum.divide(allDecimal,2, BigDecimal.ROUND_HALF_DOWN); |
| | | comActAcidColorChartsVO.setPercent(percent); |
| | | } |
| | | } |
| | | // Map<String, ComActAcidColorChartsVO> circleMap = comActAcidColorChartsVOS |
| | | // .stream() |
| | | // .collect(Collectors.toMap(ComActAcidColorChartsVO::getColorMark, Function.identity())); |
| | | |
| | | //月份 |
| | | List<ComActAcidColorChartsVO> comActAcidColorChartsVOS1 = this.baseMapper.selectColorMarkGroupByMonth(); |
| | | //按颜色分组求和 |
| | | Map<String, IntSummaryStatistics> colorCollect = comActAcidColorChartsVOS1 |
| | | .stream() |
| | | .collect(Collectors.groupingBy(ComActAcidColorChartsVO::getColorMark, |
| | | Collectors.summarizingInt(ComActAcidColorChartsVO::getCountNum))); |
| | | |
| | | for (ComActAcidColorChartsVO comActAcidColorChartsVO : comActAcidColorChartsVOS1) { |
| | | String colorMark = comActAcidColorChartsVO.getColorMark(); |
| | | if (colorCollect.containsKey(colorMark)){ |
| | | IntSummaryStatistics intSummaryStatistics = colorCollect.get(colorMark); |
| | | long sum = intSummaryStatistics.getSum(); |
| | | if (0L!=sum) { |
| | | BigDecimal countNum = new BigDecimal(comActAcidColorChartsVO.getCountNum()); |
| | | BigDecimal sumDecimal = new BigDecimal(sum); |
| | | BigDecimal percent = countNum.divide(sumDecimal, 2, BigDecimal.ROUND_HALF_DOWN); |
| | | comActAcidColorChartsVO.setPercent(percent); |
| | | } |
| | | } |
| | | } |
| | | Map<String, Map<String, ComActAcidColorChartsVO>> chartMap = comActAcidColorChartsVOS1 |
| | | .stream() |
| | | .collect(Collectors.groupingBy(ComActAcidColorChartsVO::getCountName, |
| | | Collectors.toMap(ComActAcidColorChartsVO::getColorMark, Function.identity()))); |
| | | |
| | | Map<String,Object> retMap = new HashMap<>(); |
| | | retMap.put("comActAcidColorChartsVOS",comActAcidColorChartsVOS); |
| | | retMap.put("chartMap",chartMap); |
| | | |
| | | return R.ok(retMap); |
| | | } |
| | | } |
| | |
| | | import cn.binarywang.wx.miniapp.api.WxMaService; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.panzhihua.common.constants.HttpStatus; |
| | | import com.panzhihua.common.model.dtos.PageBaseDTO; |
| | | import com.panzhihua.common.model.dtos.community.ActivityInviteDTO; |
| | | import com.panzhihua.service_community.dao.ComActNeighborCircleDAO; |
| | | import com.panzhihua.service_community.dao.ComActNeighborCircleTopicWestMapper; |
| | |
| | | } |
| | | return partyActivityLines; |
| | | } |
| | | |
| | | @Override |
| | | public R pageActivityBigScreen(PageBaseDTO pageBaseDTO) { |
| | | return R.ok(comActActivityDAO.pageActivityBigScreen(new Page<>(pageBaseDTO.getPageNum(),pageBaseDTO.getPageSize()))); |
| | | } |
| | | } |
| | |
| | | } |
| | | comActDynDAO.updateById(comActDynDO); |
| | | } |
| | | return R.ok(comActDynDO); |
| | | return R.ok(comActDynVO); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.time.LocalDate; |
| | | import java.util.*; |
| | | import java.util.function.Function; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | |
| | | import cn.hutool.core.util.DesensitizedUtil; |
| | | import com.panzhihua.common.model.dtos.common.PageComActEasyPhotoEvaluateDto; |
| | | import com.panzhihua.common.model.vos.common.ComActEasyPhotoHandlerVo; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidColorChartsVO; |
| | | import com.panzhihua.common.model.vos.community.easyPhoto.BannerVO; |
| | | import com.panzhihua.service_community.entity.ComActEasyPhotoEvaluate; |
| | | import com.panzhihua.service_community.entity.ComActEasyPhotoHandler; |
| | |
| | | return R.ok(easyPhotoRewardVO); |
| | | } |
| | | |
| | | @Override |
| | | public R selectStatisticsPhoto(){ |
| | | //所有分组 |
| | | List<StatisticsPhotoVO> statisticsPhotoVOS = this.baseMapper.selectPhotoAll(); |
| | | int all = statisticsPhotoVOS.stream().mapToInt(StatisticsPhotoVO::getCountNum).sum(); |
| | | for (StatisticsPhotoVO statisticsPhotoVO : statisticsPhotoVOS) { |
| | | if (0!=all){ |
| | | BigDecimal countNum = new BigDecimal(statisticsPhotoVO.getCountNum()); |
| | | BigDecimal allDecimal = new BigDecimal(all); |
| | | BigDecimal percent = countNum.divide(allDecimal,2, BigDecimal.ROUND_HALF_DOWN); |
| | | statisticsPhotoVO.setPercent(percent); |
| | | } |
| | | } |
| | | Map<String, StatisticsPhotoVO> circleMap = statisticsPhotoVOS |
| | | .stream() |
| | | .collect(Collectors.toMap(StatisticsPhotoVO::getCountName, Function.identity())); |
| | | |
| | | //按月份查询 |
| | | List<StatisticsPhotoVO> statisticsPhotoVOS1 = this.baseMapper.selectPhotoByMonth(); |
| | | //按类型分组求和 |
| | | Map<String, IntSummaryStatistics> statusCollect = statisticsPhotoVOS1 |
| | | .stream() |
| | | .collect(Collectors.groupingBy(StatisticsPhotoVO::getCountName, |
| | | Collectors.summarizingInt(StatisticsPhotoVO::getCountNum))); |
| | | |
| | | for (StatisticsPhotoVO statisticsPhotoVO : statisticsPhotoVOS1) { |
| | | String countName = statisticsPhotoVO.getCountName(); |
| | | if (statusCollect.containsKey(countName)){ |
| | | IntSummaryStatistics intSummaryStatistics = statusCollect.get(countName); |
| | | long sum = intSummaryStatistics.getSum(); |
| | | if (0L!=sum) { |
| | | BigDecimal countNum = new BigDecimal(statisticsPhotoVO.getCountNum()); |
| | | BigDecimal sumDecimal = new BigDecimal(sum); |
| | | BigDecimal percent = countNum.divide(sumDecimal, 2, BigDecimal.ROUND_HALF_DOWN); |
| | | 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"}; |
| | | List<String> latest12Month = DateUtils.getLatest12Month(LocalDate.now(), 10); |
| | | for (String month : latest12Month) { |
| | | Map<String, StatisticsPhotoVO> map1; |
| | | if(chartMap.containsKey(month)){ |
| | | map1 = chartMap.get(month); |
| | | }else { |
| | | map1 = new HashMap<>(); |
| | | } |
| | | for (String status : statusArr) { |
| | | if (!map1.containsKey(status)){ |
| | | StatisticsPhotoVO statisticsPhotoVO = new StatisticsPhotoVO(); |
| | | statisticsPhotoVO.setCountNum(0); |
| | | statisticsPhotoVO.setStatisticsDate(month); |
| | | statisticsPhotoVO.setCountName(status); |
| | | map1.put(status,statisticsPhotoVO); |
| | | } |
| | | } |
| | | chartMap.put(month,map1); |
| | | } |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | |
| | | }); |
| | | return R.ok(doPager); |
| | | } |
| | | @Override |
| | | public R pageNeighborByBigScreen(ComActNeighborCircleAdminDTO neighborCircleAdminDTO) { |
| | | Page page = new Page(neighborCircleAdminDTO.getPageNum(), neighborCircleAdminDTO.getPageSize()); |
| | | IPage<ComActNeighborCircleAdminVO> doPager = this.baseMapper.pageNeighborByBigScreen(page, neighborCircleAdminDTO); |
| | | return R.ok(doPager); |
| | | } |
| | | |
| | | @Override |
| | | public R addNeighborByAdmin(AddNeighborCircleAdminVO addVO) { |
| | |
| | | public R orderAndSolve(EditNeighborCircleAdminVO editNeighborCircleAdminVO) { |
| | | ComActNeighborCircleDO comActNeighborCircleDO=new ComActNeighborCircleDO(); |
| | | BeanUtils.copyProperties(editNeighborCircleAdminVO,comActNeighborCircleDO); |
| | | if(comActNeighborCircleDO.getSolveStatus()!=null){ |
| | | if(comActNeighborCircleDO.getSolveStatus()!=null && comActNeighborCircleDO.getSolveStatus() == 3){ |
| | | comActNeighborCircleDO.setSolveTime(new Date()); |
| | | } |
| | | if(comActNeighborCircleDO.getOrderStatus()!=null){ |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.Comparator; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | import com.panzhihua.common.model.vos.community.ComActPasswordVo; |
| | | import com.panzhihua.common.model.vos.community.ComBasicDataVo; |
| | | import com.panzhihua.common.model.vos.partybuilding.ComPbMemberTypeVO; |
| | | import com.panzhihua.service_community.dao.ComPbMemberDAO; |
| | | import com.panzhihua.service_community.util.MyAESUtil; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; |
| | |
| | | private ComActDAO comActDAO; |
| | | @Resource |
| | | private ComStreetDAO comStreetDAO; |
| | | @Resource |
| | | private ComPbMemberDAO comPbMemberDAO; |
| | | |
| | | /** |
| | | * 新增社区 |
| | |
| | | } |
| | | return R.ok(comActPasswordVo); |
| | | } |
| | | |
| | | @Override |
| | | public R selectIds(Long id){ |
| | | return R.ok(this.comActDAO.selectIds(id)); |
| | | } |
| | | |
| | | @Override |
| | | public R selectBasicData(){ |
| | | //社区数 |
| | | Integer community = comActDAO.countCommunity(); |
| | | //商家数 |
| | | Integer merchants = comActDAO.countMerchants(); |
| | | //党员数 |
| | | Integer pbMember = comActDAO.countPbMember(); |
| | | //报道单位 |
| | | Integer pbUnit = comActDAO.countPbUnit(); |
| | | //实有人口 |
| | | Integer population = comActDAO.countPopulation(); |
| | | //实有房屋 |
| | | Integer populationHouse = comActDAO.countPopulationHouse(); |
| | | //社会组织 |
| | | Integer socialOrg = comActDAO.countSocialOrg(); |
| | | //志愿者 |
| | | Integer volunteer = comActDAO.countVolunteer(); |
| | | |
| | | ComBasicDataVo comBasicDataVo = new ComBasicDataVo(); |
| | | comBasicDataVo.setCommunity(community); |
| | | comBasicDataVo.setMerchants(merchants); |
| | | comBasicDataVo.setPbMember(pbMember); |
| | | comBasicDataVo.setPbUnit(pbUnit); |
| | | comBasicDataVo.setPopulation(population); |
| | | comBasicDataVo.setPopulationHouse(populationHouse); |
| | | comBasicDataVo.setSocialOrg(socialOrg); |
| | | comBasicDataVo.setVolunteer(volunteer); |
| | | return R.ok(comBasicDataVo); |
| | | } |
| | | |
| | | @Override |
| | | public R statisticsPbMemberType(){ |
| | | List<ComPbMemberTypeVO> comPbMemberTypeVOS = comPbMemberDAO.statisticsPbMemberType(); |
| | | return R.ok(comPbMemberTypeVOS); |
| | | } |
| | | |
| | | public R selectUnitByNatureName(){ |
| | | List<ComPbMemberTypeVO> comPbMemberTypeVOS = comPbMemberDAO.selectUnitByNatureName(); |
| | | return R.ok(comPbMemberTypeVOS); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | 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; |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static java.util.Objects.isNull; |
| | |
| | | shopFlowerGoodsAttrDAO.selectList(new QueryWrapper<ComShopFlowerGoodsAttrDO>().lambda() |
| | | .eq(ComShopFlowerGoodsAttrDO::getGoodsId, shopGoods.getId())); |
| | | 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()); |
| | | goodsAttrVOList.add(goodsAttrVO); |
| | | sale = sale + oneGoodsAttrDO.getSale(); |
| | | stock = stock +oneGoodsAttrDO.getStock(); |
| | | sbr.append(oneGoodsAttrDO.getGoodsAttrName()).append(" "); |
| | | } |
| | | shopGoods.setGoodsAttrName(sbr.toString()); |
| | | shopGoods.setGoodsAttrs(goodsAttrVOList); |
| | | if (CollUtil.isNotEmpty(goodsAttrDOs)){ |
| | | shopGoods.setGoodsPic(goodsAttrDOs.get(0).getAttrPic()); |
| | | } |
| | | //设置商品总浏览量 |
| | | shopGoods.setViewNum(comShopFlowerGoodsViewStatisticsDAO.selectTotalViewNum(shopGoods.getId())); |
| | | String categoryNames = convenientGoodsCategoryDAO.selectCategoryScopeByGoodsId(shopGoods.getId()); |
| | | shopGoods.setCategoryName(categoryNames); |
| | | shopGoods.setStock(stock); |
| | | shopGoods.setSale(sale); |
| | | }); |
| | | } |
| | | return R.ok(comShopStoreVOIPage); |
| | |
| | | List<ComShopFlowerGoodsAttrVO> goodsAttrList = new ArrayList<>(); |
| | | List<ComShopFlowerGoodsAttrDO> goodsAttrDOS = |
| | | shopFlowerGoodsAttrDAO.selectList(new QueryWrapper<ComShopFlowerGoodsAttrDO>().eq("goods_id", goodsId)); |
| | | List<String> images = new ArrayList<>(); |
| | | // List<String> images = new ArrayList<>(); |
| | | int stock = 0; |
| | | for (ComShopFlowerGoodsAttrDO attrDO : goodsAttrDOS) { |
| | | ComShopFlowerGoodsAttrVO goodsAttrVO = new ComShopFlowerGoodsAttrVO(); |
| | | BeanUtils.copyProperties(attrDO, goodsAttrVO); |
| | | String attrPic = attrDO.getAttrPic(); |
| | | images.add(attrPic); |
| | | // images.add(attrPic); |
| | | goodsAttrList.add(goodsAttrVO); |
| | | stock = stock +attrDO.getStock(); |
| | | } |
| | |
| | | ConvenientMerchantDO convenientMerchantDO = convenientMerchantDAO.selectById(goodsDO.getStoreId()); |
| | | ConvenientMerchantVO convenientMerchantVO = new ConvenientMerchantVO(); |
| | | BeanUtils.copyProperties(convenientMerchantDO, convenientMerchantVO); |
| | | |
| | | BigDecimal score = comShopFlowerEvaluateDAO.statisticsScore(convenientMerchantDO.getId()); |
| | | convenientMerchantVO.setScore(null == score ? BigDecimal.ZERO : NumberUtil.round(score, 1)); |
| | | // 设置值 |
| | | ComShopFlowerGoodsVO shopGoods = new ComShopFlowerGoodsVO(); |
| | | BeanUtils.copyProperties(goodsDO, shopGoods); |
| | | shopGoods.setGoodsAttrList(goodsAttrList); |
| | | shopGoods.setConvenientMerchantVO(convenientMerchantVO); |
| | | shopGoods.setImages(StringUtils.join(images,",")); |
| | | // shopGoods.setImages(StringUtils.join(images,",")); |
| | | Integer orderNum = comShopFlowerOrderGoodsDAO.selectCount(new LambdaQueryWrapper<ComShopFlowerOrderGoodsDO>().eq(ComShopFlowerOrderGoodsDO::getGoodsId, goodsId)); |
| | | shopGoods.setOrderNum(orderNum); |
| | | List<ComShopFlowerEvaluateVO> comShopFlowerEvaluateVOList = comShopFlowerEvaluateDAO.selectListLimit(goodsId); |
| | | shopGoods.setShopFlowerEvaluateVOList(comShopFlowerEvaluateVOList); |
| | | Integer evaluateNum = comShopFlowerEvaluateDAO.selectCountByGoodsId(goodsId); |
| | | shopGoods.setEvaluateNum(evaluateNum); |
| | | |
| | | List<Long> categoryIds = convenientGoodsCategoryDAO.selectCategoryIdsForGoods(goodsId); |
| | | shopGoods.setCategoryIds(categoryIds); |
| | |
| | | .delete(new LambdaQueryWrapper<ComShopFlowerGoodsAttrDO>().eq(ComShopFlowerGoodsAttrDO::getGoodsId, id)); |
| | | ComShopFlowerGoodsAttrDO comShopFlowerGoodsAttrDO = new ComShopFlowerGoodsAttrDO(); |
| | | comShopFlowerGoodsAttrDO.setGoodsId(id); |
| | | comShopFlowerGoodsAttrDO.setStoreId(addShopFlowerGoodsVO.getStoreId()); |
| | | comShopFlowerGoodsAttrDO.setStoreId(shopGoodsDO.getStoreId()); |
| | | comShopFlowerGoodsAttrDO.setGoodsName(addShopFlowerGoodsVO.getName()); |
| | | comShopFlowerGoodsAttrDO.setGoodsAttrName("默认"); |
| | | comShopFlowerGoodsAttrDO.setAttrPic(addShopFlowerGoodsVO.getGoodsPic()); |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public R countSaleByUserId(Long userId){ |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS = this.baseMapper.countSaleByUserId(userId); |
| | | Map<String, Integer> collect = comShopOrderStoreIdCountVOS.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCountNum)); |
| | | return R.ok(collect); |
| | | } |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaService; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopFlowerOrderDeliveryDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComFlowerOrderDeliveryDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComFlowerOrderListDTO; |
| | |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientElevatingPointVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerOrderDeliveryVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerOrderPageVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.OrderNoUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.service_community.dao.ComShopFlowerOrderDAO; |
| | | import com.panzhihua.service_community.dao.ComShopFlowerOrderDeliveryDAO; |
| | | import com.panzhihua.service_community.dao.ConvenientElevatingPointDAO; |
| | | import com.panzhihua.service_community.entity.SysUser; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerOrderDO; |
| | | import com.panzhihua.service_community.model.dos.ComShopFlowerOrderDeliveryDO; |
| | | import com.panzhihua.service_community.model.dos.ConvenientElevatingPointDO; |
| | | import com.panzhihua.service_community.service.ComShopFlowerOrderDeliveryService; |
| | | import com.panzhihua.service_community.util.WxMaConfiguration; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static java.util.Objects.nonNull; |
| | | |
| | |
| | | private ComShopFlowerOrderDAO comShopFlowerOrderDAO; |
| | | @Resource |
| | | private ConvenientElevatingPointDAO convenientElevatingPointDAO; |
| | | |
| | | @Resource |
| | | private WxMaConfiguration wxMaConfiguration; |
| | | @Resource |
| | | private UserService userService; |
| | | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | |
| | | List<Long> orderIds = comShopFlowerOrderDeliveryDTO.getOrderIds(); |
| | | if (CollUtil.isNotEmpty(orderIds)){ |
| | | comShopFlowerOrderDAO.updateOrder(orderIds,deliveryId,comShopFlowerOrderDeliveryDO.getDeliveryNo(), ComShopFlowerOrderDO.status.psz,comShopFlowerOrderDeliveryDO.getDeliveryTime()); |
| | | |
| | | //订单配送通知 |
| | | WxMaService maService = wxMaConfiguration.getMaService(Constants.HC_APP_ID); |
| | | List<ComShopFlowerOrderDO> comShopFlowerOrderDOS = comShopFlowerOrderDAO.selectList(new LambdaQueryWrapper<ComShopFlowerOrderDO>().in(ComShopFlowerOrderDO::getId, orderIds)); |
| | | for (ComShopFlowerOrderDO comShopFlowerOrderDO : comShopFlowerOrderDOS) { |
| | | Long userId = comShopFlowerOrderDO.getUserId(); |
| | | R userOpenId = userService.getUserOpenId(userId); |
| | | if (R.isOk(userOpenId)) { |
| | | String openid = userOpenId.getData().toString(); |
| | | try { |
| | | WxUtil.sendStartShipping(openid,maService.getAccessToken(),comShopFlowerOrderDO.getOrderNo()); |
| | | } catch (WxErrorException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | } |
| | | return R.ok(); |
| | | return R.ok(comShopFlowerOrderDeliveryDO.getId()); |
| | | } |
| | | |
| | | @Override |
| | |
| | | comShopFlowerOrderDeliveryDO.setDeliveryStatus(ComShopFlowerOrderDeliveryDO.deliveryStatus.ysd); |
| | | int update = this.baseMapper.updateById(comShopFlowerOrderDeliveryDO); |
| | | if (update > 0){ |
| | | //一个自提订单算一个货 |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = convenientElevatingPointDAO.selectById(comShopFlowerOrderDeliveryDO.getPointId()); |
| | | |
| | | convenientElevatingPointDO.setCumulativeGoodsNum(convenientElevatingPointDO.getCumulativeGoodsNum() + comShopFlowerOrderDeliveryDO.getDeliveryOrderNum()); |
| | | convenientElevatingPointDO.setPrepareGoodsNum(convenientElevatingPointDO.getPrepareGoodsNum()+comShopFlowerOrderDeliveryDO.getDeliveryOrderNum()); |
| | | convenientElevatingPointDAO.updateById(convenientElevatingPointDO); |
| | | |
| | | comShopFlowerOrderDAO.updateOrderStatus(comShopFlowerOrderDeliveryDO.getId(),comShopFlowerOrderDeliveryDO.getServiceTime(),ComShopFlowerOrderDO.status.dsh); |
| | | WxMaService maService = wxMaConfiguration.getMaService(Constants.HC_APP_ID); |
| | | List<ComShopFlowerOrderDO> comShopFlowerOrderDOS = comShopFlowerOrderDAO.selectList(new LambdaQueryWrapper<ComShopFlowerOrderDO>().eq(ComShopFlowerOrderDO::getDeliveryId, id)); |
| | | for (ComShopFlowerOrderDO comShopFlowerOrderDO : comShopFlowerOrderDOS) { |
| | | Long userId = comShopFlowerOrderDO.getUserId(); |
| | | R userOpenId = userService.getUserOpenId(userId); |
| | | if (R.isOk(userOpenId)) { |
| | | String openid = userOpenId.getData().toString(); |
| | | try { |
| | | WxUtil.sendService(openid,maService.getAccessToken(),comShopFlowerOrderDeliveryDO.getPointName()); |
| | | } catch (WxErrorException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | return R.ok(); |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaService; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.date.DatePattern; |
| | | import cn.hutool.core.date.DateUnit; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.model.dtos.shop.*; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientElevatingPointVO; |
| | | import com.panzhihua.common.model.vos.community.convenient.ConvenientMerchantVO; |
| | | import com.panzhihua.common.model.vos.shop.*; |
| | | import com.panzhihua.common.utlis.DateUtils; |
| | | import com.panzhihua.common.utlis.OrderNoUtils; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.common.utlis.WxPayUtils; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.*; |
| | | import com.panzhihua.common.utlis.wx.WXPayUtil; |
| | | import com.panzhihua.service_community.config.RabbitmqConfig; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ComShopFlowerOrderService; |
| | | import com.panzhihua.service_community.util.WxMaConfiguration; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | | import org.springframework.amqp.rabbit.core.RabbitTemplate; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | | |
| | | /** |
| | |
| | | private ComShopFlowerRefundOrderDAO comShopFlowerRefundOrderDAO; |
| | | @Resource |
| | | private ComShopFlowerOrderDeliveryDAO comShopFlowerOrderDeliveryDAO; |
| | | @Resource |
| | | private WxMaConfiguration wxMaConfiguration; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private RabbitTemplate rabbitTemplate; |
| | | |
| | | |
| | | @Value("${hcMin.app.isTest}") |
| | |
| | | ComShopFlowerOrderGoodsDO orderGoodsDO = new ComShopFlowerOrderGoodsDO(); |
| | | orderGoodsDO.setGoodsId(goodsDO.getId()); |
| | | orderGoodsDO.setGoodsName(goodsDO.getName()); |
| | | |
| | | orderGoodsDO.setStoreId(storeId); |
| | | orderGoodsDO.setUserId(userId); |
| | | orderGoodsDO.setAmount(createGoodsDTO.getNum()); |
| | |
| | | if (goodsAttrDO.getStock() < createGoodsDTO.getNum()) { |
| | | return R.fail("该规格库存不足,无法下单"); |
| | | } |
| | | orderGoodsDO.setGoodsAttrName(goodsAttrDO.getGoodsAttrName()); |
| | | orderGoodsDO.setGoodsAttrId(goodsAttrDO.getId()); |
| | | orderGoodsDO.setGoodsAttrPrice(createGoodsDTO.getPrice()); |
| | | orderGoodsDO.setPrice(goodsAttrDO.getPrice()); |
| | |
| | | } catch (Exception e) { |
| | | log.error("调用微信支付异常,异常原因:" + e.getMessage()); |
| | | } |
| | | //发送消息到mq |
| | | rabbitTemplate.convertAndSend("huacheng.shop.order.exchange", "huacheng.shop.order.key", shopOrderVO, message -> { |
| | | //30分钟后 |
| | | message.getMessageProperties().setHeader("x-delay", 1800*1000); |
| | | return message; |
| | | }); |
| | | return R.ok(shopOrderVO); |
| | | } |
| | | |
| | |
| | | ComShopFlowerOrderGoodsVO orderGoodsVO = new ComShopFlowerOrderGoodsVO(); |
| | | BeanUtils.copyProperties(orderGoods, orderGoodsVO); |
| | | // 根据商品规格id查询商品规格 |
| | | ComShopFlowerGoodsAttrDO goodsAttrDO = comShopFlowerGoodsAttrDAO.selectById(orderGoods.getGoodsAttrId()); |
| | | if (goodsAttrDO != null) { |
| | | orderGoodsVO.setGoodsAttr(goodsAttrDO.getGoodsAttrName()); |
| | | } |
| | | // ComShopFlowerGoodsAttrDO goodsAttrDO = comShopFlowerGoodsAttrDAO.selectById(orderGoods.getGoodsAttrId()); |
| | | // if (goodsAttrDO != null) { |
| | | orderGoodsVO.setGoodsAttr(orderGoods.getGoodsAttrName()); |
| | | // } |
| | | orderGoodsVO.setNum(orderGoods.getAmount()); |
| | | orderGoodsVO.setGoodsPic(orderGoods.getGoodsAttrPic()); |
| | | orderGoodsVO.setPrice(orderGoods.getGoodsAttrPrice()); |
| | | orderGoodsVOS.add(orderGoodsVO); |
| | | }); |
| | | orderVo.setGoodsAttrName(orderGoodsDOList.get(0).getGoodsAttrName()); |
| | | } |
| | | orderVo.setOrderGoodsVOList(orderGoodsVOS); |
| | | |
| | |
| | | BeanUtils.copyProperties(convenientMerchantDO, shopStoreVO); |
| | | } |
| | | orderVo.setConvenientMerchantVO(shopStoreVO); |
| | | //已完成、已退款才有评论 TODO |
| | | // if (ComShopFlowerOrderDO.status.ywc == shopOrderDO.getStatus() || ComShopFlowerOrderDO.status.ytk == shopOrderDO.getStatus()) { |
| | | ComShopFlowerEvaluateVO comShopFlowerEvaluateVO = comShopFlowerEvaluateDAO.selectByOrderNo(orderVo.getOrderNo()); |
| | | if (nonNull(comShopFlowerEvaluateVO)) { |
| | | orderVo.setComShopFlowerEvaluateVO(comShopFlowerEvaluateVO); |
| | | //已完成、已退款才有评论 |
| | | if (ComShopFlowerOrderDO.status.ywc == orderVo.getStatus() || ComShopFlowerOrderDO.status.ytk == orderVo.getStatus()) { |
| | | ComShopFlowerEvaluateVO comShopFlowerEvaluateVO = comShopFlowerEvaluateDAO.selectByOrderNo(orderVo.getOrderNo()); |
| | | if (nonNull(comShopFlowerEvaluateVO)) { |
| | | orderVo.setComShopFlowerEvaluateVO(comShopFlowerEvaluateVO); |
| | | } |
| | | } |
| | | // } |
| | | |
| | | //判断是否可以退款 订单是否已超过15天 是否已有退款订单 |
| | | int count = comShopFlowerRefundOrderDAO.selectCountRefundNowByOrderId(orderVo.getOrderId()); |
| | | if (count > 0){ |
| | | orderVo.setRefundable(2); |
| | | }else { |
| | | if (null == orderVo.getReceivingTime()){ |
| | | orderVo.setRefundable(2); |
| | | }else { |
| | | //收货时间往前推15天和当前时间做比较 |
| | | Date date = DateUtils.addDay(orderVo.getReceivingTime(), 15); |
| | | if(date.before(new Date())){ |
| | | orderVo.setRefundable(2); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | }); |
| | | } |
| | | return R.ok(orderPageVOIPage); |
| | |
| | | * @return 订单详情 |
| | | */ |
| | | @Override |
| | | public R orderDetail(Long orderId) { |
| | | |
| | | public R orderDetail(Long orderId, String phone) { |
| | | ComShopFlowerOrderPageVO orderVO = new ComShopFlowerOrderPageVO(); |
| | | // 查询订单信息 |
| | | ComShopFlowerOrderDO shopOrderDO = this.baseMapper.selectById(orderId); |
| | | ComShopFlowerOrderDO shopOrderDO = null; |
| | | if (StrUtil.isEmpty(phone)) { |
| | | // 查询订单信息 |
| | | shopOrderDO = this.baseMapper.selectById(orderId); |
| | | } else { |
| | | //查询自提点信息 |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = convenientElevatingPointDAO.selectOne(new LambdaQueryWrapper<ConvenientElevatingPointDO>().eq(ConvenientElevatingPointDO::getWechatAccount, phone)); |
| | | if (isNull(convenientElevatingPointDO)) { |
| | | return R.ok("订单不在该自提点"); |
| | | } |
| | | Long pointDOId = convenientElevatingPointDO.getId(); |
| | | shopOrderDO = this.baseMapper.selectOne(new LambdaQueryWrapper<ComShopFlowerOrderDO>().eq(ComShopFlowerOrderDO::getId, orderId).eq(ComShopFlowerOrderDO::getPointId, pointDOId)); |
| | | } |
| | | |
| | | |
| | | if (shopOrderDO == null) { |
| | | return R.fail("未查询到订单"); |
| | | } |
| | |
| | | orderGoodsVO.setGoodsPic(orderGoods.getGoodsAttrPic()); |
| | | orderGoodsVO.setPrice(orderGoods.getGoodsAttrPrice()); |
| | | // 查询商品信息判断商品状态 |
| | | ComShopFlowerGoodsDO goodsDO = comShopFlowerGoodsDAO.selectById(orderGoods.getGoodsId()); |
| | | /* ComShopFlowerGoodsDO goodsDO = comShopFlowerGoodsDAO.selectById(orderGoods.getGoodsId()); |
| | | if (goodsDO == null || goodsDO.getDeleteStatus().equals(ComShopFlowerGoodsDO.deleteStatus.yes) |
| | | || goodsDO.getDeleteStatus().equals(ComShopFlowerGoodsDO.status.recovery)) { |
| | | orderGoodsVO.setGoodsStatus(ComShopFlowerOrderGoodsVO.goodsStatus.ysc); |
| | |
| | | orderGoodsVO.setGoodsStatus(ComShopFlowerOrderGoodsVO.goodsStatus.yxj); |
| | | } else if (goodsDO.getStatus().equals(ComShopFlowerGoodsDO.status.sell)) { |
| | | orderGoodsVO.setGoodsStatus(ComShopFlowerOrderGoodsVO.goodsStatus.csz); |
| | | } |
| | | }*/ |
| | | |
| | | // 根据商品规格id查询商品规格 |
| | | ComShopFlowerGoodsAttrDO goodsAttrDO = comShopFlowerGoodsAttrDAO.selectById(orderGoods.getGoodsAttrId()); |
| | | if (goodsAttrDO != null) { |
| | | orderGoodsVO.setGoodsAttr(goodsAttrDO.getGoodsAttrName()); |
| | | } |
| | | // ComShopFlowerGoodsAttrDO goodsAttrDO = comShopFlowerGoodsAttrDAO.selectById(orderGoods.getGoodsAttrId()); |
| | | orderGoodsVO.setGoodsAttr(orderGoods.getGoodsAttrName()); |
| | | orderGoodsVOS.add(orderGoodsVO); |
| | | sbr.append(orderGoods.getGoodsName()).append(" "); |
| | | }); |
| | | orderVO.setGoodsAttrPic(orderGoodsDOList.get(0).getGoodsAttrPic()); |
| | | orderVO.setGoodsAttrName(orderGoodsDOList.get(0).getGoodsAttrName()); |
| | | } |
| | | |
| | | orderVO.setOrderGoodsVOList(orderGoodsVOS); |
| | | orderVO.setGoodsName(sbr.toString()); |
| | | |
| | |
| | | } |
| | | |
| | | // 操作日志 |
| | | List<ComShopFlowerOrderOperateDO> listOperLog = |
| | | /* List<ComShopFlowerOrderOperateDO> listOperLog = |
| | | comShopFlowerOrderOperateDAO.selectList(new LambdaQueryWrapper<ComShopFlowerOrderOperateDO>() |
| | | .eq(ComShopFlowerOrderOperateDO::getOrderNo, shopOrderDO.getOrderNo())); |
| | | List<ComShopFlowerOrderOperateVO> listOperLogVO = new ArrayList<>(listOperLog.size()); |
| | |
| | | BeanUtils.copyProperties(logDO, copyVO); |
| | | listOperLogVO.add(copyVO); |
| | | }); |
| | | orderVO.setLogs(listOperLogVO); |
| | | orderVO.setLogs(listOperLogVO);*/ |
| | | Long pointId = shopOrderDO.getPointId(); |
| | | if (null != pointId) { |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = convenientElevatingPointDAO.selectById(pointId); |
| | |
| | | BeanUtils.copyProperties(convenientElevatingPointDO, convenientElevatingPointVO); |
| | | orderVO.setConvenientElevatingPointVO(convenientElevatingPointVO); |
| | | } |
| | | //已完成、已退款才有评论 TODO |
| | | // if (ComShopFlowerOrderDO.status.ywc == shopOrderDO.getStatus() || ComShopFlowerOrderDO.status.ytk == shopOrderDO.getStatus()) { |
| | | //已完成、已退款才有评论 |
| | | if (ComShopFlowerOrderDO.status.ywc == shopOrderDO.getStatus() || ComShopFlowerOrderDO.status.ytk == shopOrderDO.getStatus()) { |
| | | ComShopFlowerEvaluateVO comShopFlowerEvaluateVO = comShopFlowerEvaluateDAO.selectByOrderNo(shopOrderDO.getOrderNo()); |
| | | if (nonNull(comShopFlowerEvaluateVO)) { |
| | | orderVO.setComShopFlowerEvaluateVO(comShopFlowerEvaluateVO); |
| | | } |
| | | // } |
| | | //设置退款金额 |
| | | ComShopFlowerRefundOrderDO comShopFlowerRefundOrderDO = comShopFlowerRefundOrderDAO.selectOne(new LambdaQueryWrapper<ComShopFlowerRefundOrderDO>().eq(ComShopFlowerRefundOrderDO::getOrderId, shopOrderDO.getOrderNo())); |
| | | if (nonNull(comShopFlowerRefundOrderDO)){ |
| | | orderVO.setRefundAmount(comShopFlowerRefundOrderDO.getRefundAmount()); |
| | | } |
| | | //设置退款金额 |
| | | ComShopFlowerRefundOrderDO comShopFlowerRefundOrderDO = comShopFlowerRefundOrderDAO.selectOne(new LambdaQueryWrapper<ComShopFlowerRefundOrderDO>().eq(ComShopFlowerRefundOrderDO::getOrderId, shopOrderDO.getId())); |
| | | if (nonNull(comShopFlowerRefundOrderDO)) { |
| | | orderVO.setRefundAmount(comShopFlowerRefundOrderDO.getRefundAmount()); |
| | | orderVO.setRefundTime(comShopFlowerRefundOrderDO.getRefundTime()); |
| | | } |
| | | |
| | | //如果状态时取消状态,更新时间为去取消时间 |
| | | if (shopOrderDO.getStatus() == ComShopFlowerOrderDO.status.yqx) { |
| | | orderVO.setCancelTime(shopOrderDO.getUpdateAt()); |
| | | } |
| | | //判断是否可以退款 订单是否已超过15天 是否已有退款订单 |
| | | int count = comShopFlowerRefundOrderDAO.selectCountRefundNowByOrderId(orderId); |
| | | if (count > 0){ |
| | | orderVO.setRefundable(2); |
| | | }else { |
| | | if (null == orderVO.getReceivingTime()){ |
| | | orderVO.setRefundable(2); |
| | | }else { |
| | | //收货时间往前推15天和当前时间做比较 |
| | | Date date = DateUtils.addDay(orderVO.getReceivingTime(), 15); |
| | | if(date.before(new Date())){ |
| | | orderVO.setRefundable(2); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | return R.ok(orderVO); |
| | | } |
| | |
| | | if (shopOrderDO == null) { |
| | | return R.fail("未查询到订单"); |
| | | } |
| | | if (!shopOrderDO.getStatus().equals(ComShopFlowerOrderDO.status.ddps)) { |
| | | return R.fail("已配送订单不可取消"); |
| | | } |
| | | // 取消订单 |
| | | shopOrderDO.setStatus(ComShopFlowerOrderDO.status.yqx); |
| | | //退款 |
| | | String refundNo = WXPayUtil.generateNonceStr(); |
| | | try { |
| | | String refundStr = WxPayUtils.refund(appid, mchId, shopOrderDO.getOrderNo(), shopOrderDO.getPayAmount(), |
| | | shopOrderDO.getPayAmount(), refundNo, isTest); |
| | | log.info("退款请求接口返回参数:{}", refundStr); |
| | | Map<String, String> mapResult = WXPayUtil.xmlToMap(refundStr); |
| | | if (CollUtil.isNotEmpty(mapResult)) { |
| | | String return_code = (String) mapResult.get("return_code"); |
| | | String result_code = (String) mapResult.get("result_code"); |
| | | String return_msg = mapResult.get("return_msg"); |
| | | ComShopFlowerOrderPayDO orderPayDO = new ComShopFlowerOrderPayDO(); |
| | | if (shopOrderDO.getStatus().equals(ComShopFlowerOrderDO.status.ddps)||shopOrderDO.getStatus().equals(ComShopFlowerOrderDO.status.dfh)) { |
| | | // 取消订单 |
| | | shopOrderDO.setStatus(ComShopFlowerOrderDO.status.yqx); |
| | | //退款 |
| | | String refundNo = WXPayUtil.generateNonceStr(); |
| | | try { |
| | | String refundStr = WxPayUtils.refund(appid, mchId, shopOrderDO.getOrderNo(), shopOrderDO.getPayAmount(), |
| | | shopOrderDO.getPayAmount(), refundNo, isTest); |
| | | log.info("退款请求接口返回参数:{}", refundStr); |
| | | Map<String, String> mapResult = WXPayUtil.xmlToMap(refundStr); |
| | | if (CollUtil.isNotEmpty(mapResult)) { |
| | | String return_code = (String) mapResult.get("return_code"); |
| | | String result_code = (String) mapResult.get("result_code"); |
| | | String return_msg = mapResult.get("return_msg"); |
| | | ComShopFlowerOrderPayDO orderPayDO = new ComShopFlowerOrderPayDO(); |
| | | |
| | | orderPayDO.setOrderNo(shopOrderDO.getOrderNo()); |
| | | orderPayDO.setOrderAmount(shopOrderDO.getTotalAmount()); |
| | | orderPayDO.setPayTime(new Date()); |
| | | orderPayDO.setStoreId(shopOrderDO.getStoreId()); |
| | | orderPayDO.setDeliveryType(shopOrderDO.getDeliveryType()); |
| | | orderPayDO.setOrderId(shopOrderDO.getId()); |
| | | orderPayDO.setPayType(ComShopFlowerOrderPayDO.payType.qx); |
| | | if ("SUCCESS".equals(return_code) && return_code.equals(result_code)) { |
| | | //退款成功 |
| | | // 添加订单支付记录表 |
| | | orderPayDO.setPayStatus(ComShopFlowerOrderPayDO.payStatus.yes); |
| | | orderPayDO.setRefundStatus(ComShopFlowerOrderPayDO.refundStatus.tkcg); |
| | | orderPayDO.setOrderNo(shopOrderDO.getOrderNo()); |
| | | orderPayDO.setOrderAmount(shopOrderDO.getTotalAmount()); |
| | | orderPayDO.setPayTime(new Date()); |
| | | orderPayDO.setStoreId(shopOrderDO.getStoreId()); |
| | | orderPayDO.setDeliveryType(shopOrderDO.getDeliveryType()); |
| | | orderPayDO.setOrderId(shopOrderDO.getId()); |
| | | orderPayDO.setPayType(ComShopFlowerOrderPayDO.payType.qx); |
| | | if ("SUCCESS".equals(return_code) && return_code.equals(result_code)) { |
| | | //退款成功 |
| | | // 添加订单支付记录表 |
| | | orderPayDO.setPayStatus(ComShopFlowerOrderPayDO.payStatus.yes); |
| | | orderPayDO.setRefundStatus(ComShopFlowerOrderPayDO.refundStatus.tkcg); |
| | | |
| | | } else { |
| | | //退款失败 |
| | | // 添加订单支付记录表 |
| | | orderPayDO.setPayStatus(ComShopFlowerOrderPayDO.payStatus.no); |
| | | orderPayDO.setRefundStatus(ComShopFlowerOrderPayDO.refundStatus.tksb); |
| | | shopOrderDO.setRemark(shopOrderDO.getRemark() + "_" + return_msg); |
| | | } else { |
| | | //退款失败 |
| | | // 添加订单支付记录表 |
| | | orderPayDO.setPayStatus(ComShopFlowerOrderPayDO.payStatus.no); |
| | | orderPayDO.setRefundStatus(ComShopFlowerOrderPayDO.refundStatus.tksb); |
| | | shopOrderDO.setRemark(shopOrderDO.getRemark() + "_" + return_msg); |
| | | } |
| | | comShopFlowerOrderPayDAO.insert(orderPayDO); |
| | | } |
| | | comShopFlowerOrderPayDAO.insert(orderPayDO); |
| | | } catch (Exception e) { |
| | | log.error("申请退款失败," + e.getMessage()); |
| | | e.printStackTrace(); |
| | | return R.fail("取消订单失败"); |
| | | } |
| | | } catch (Exception e) { |
| | | log.error("申请退款失败," + e.getMessage()); |
| | | e.printStackTrace(); |
| | | return R.fail("取消订单失败"); |
| | | } |
| | | if (this.baseMapper.updateById(shopOrderDO) > 0) { |
| | | // 添加订单操作记录 |
| | | ComShopFlowerOrderOperateDO orderOperateDO = new ComShopFlowerOrderOperateDO(); |
| | | orderOperateDO.setOrderNo(shopOrderDO.getOrderNo()); |
| | | orderOperateDO.setOperationType(ComShopOrderOperateDO.operationType.cancel); |
| | | orderOperateDO.setOperationTime(new Date()); |
| | | if (comShopOrderQueryDTO.getIsAdmin()) { |
| | | orderOperateDO.setOperationContent("管理员" + comShopOrderQueryDTO.getOperUserAccount() + "取消订单"); |
| | | orderOperateDO.setOperationBy("用户" + comShopOrderQueryDTO.getOperUserAccount()); |
| | | if (this.baseMapper.updateById(shopOrderDO) > 0) { |
| | | // 添加订单操作记录 |
| | | ComShopFlowerOrderOperateDO orderOperateDO = new ComShopFlowerOrderOperateDO(); |
| | | orderOperateDO.setOrderNo(shopOrderDO.getOrderNo()); |
| | | orderOperateDO.setOperationType(ComShopOrderOperateDO.operationType.cancel); |
| | | orderOperateDO.setOperationTime(new Date()); |
| | | if (comShopOrderQueryDTO.getIsAdmin()) { |
| | | orderOperateDO.setOperationContent("管理员" + comShopOrderQueryDTO.getOperUserAccount() + "取消订单"); |
| | | orderOperateDO.setOperationBy("用户" + comShopOrderQueryDTO.getOperUserAccount()); |
| | | } else { |
| | | orderOperateDO.setOperationContent("用户取消订单"); |
| | | orderOperateDO.setOperationBy("用户"); |
| | | } |
| | | comShopFlowerOrderOperateDAO.insert(orderOperateDO); |
| | | return R.ok(); |
| | | } else { |
| | | orderOperateDO.setOperationContent("用户取消订单"); |
| | | orderOperateDO.setOperationBy("用户"); |
| | | return R.fail("取消订单失败"); |
| | | } |
| | | comShopFlowerOrderOperateDAO.insert(orderOperateDO); |
| | | return R.ok(); |
| | | } else { |
| | | return R.fail("取消订单失败"); |
| | | }else { |
| | | return R.fail("该订单不可取消"); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | orderOperateDO.setOperationBy("用户"); |
| | | } |
| | | comShopFlowerOrderOperateDAO.insert(orderOperateDO); |
| | | |
| | | //一个自提订单算一个货 |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = convenientElevatingPointDAO.selectById(shopOrderDO.getPointId()); |
| | | convenientElevatingPointDO.setPrepareGoodsNum(convenientElevatingPointDO.getPrepareGoodsNum() - 1); |
| | | convenientElevatingPointDO.setAlreadyGoodsNum(convenientElevatingPointDO.getAlreadyGoodsNum() + 1); |
| | | convenientElevatingPointDAO.updateById(convenientElevatingPointDO); |
| | | return R.ok(); |
| | | } else { |
| | | return R.fail("确认收货失败"); |
| | |
| | | if (comShopOrderDO == null) { |
| | | return R.fail("订单不存在"); |
| | | } |
| | | if (!(comShopOrderDO.getStatus() == 1) || !(comShopOrderDO.getDeliveryStatus() == 1)) { |
| | | if (!(comShopOrderDO.getStatus() == ComShopFlowerOrderDO.status.dfh) || (comShopOrderDO.getDeliveryStatus() == ComShopFlowerOrderDO.deliveryStatus.yes)) { |
| | | return R.fail("订单发货失败,订单状态不允许发货"); |
| | | } |
| | | |
| | |
| | | orderOperateDO.setOrderNo(comShopOrderDO.getOrderNo()); |
| | | orderOperateDO.setOperationType(ComShopFlowerOrderOperateDO.operationType.deliver); |
| | | orderOperateDO.setOperationTime(new Date()); |
| | | if (orderShipDTO.getIsAdmin()) { |
| | | orderOperateDO.setOperationContent(orderShipDTO.getOperUserAccount() + "已发货"); |
| | | orderOperateDO.setOperationBy(orderShipDTO.getOperUserAccount()); |
| | | } else { |
| | | orderOperateDO.setOperationContent(orderShipDTO.getOperUserAccount() + "已发货"); |
| | | orderOperateDO.setOperationBy(orderShipDTO.getOperUserAccount()); |
| | | } |
| | | |
| | | orderOperateDO.setOperationContent(orderShipDTO.getOperUserAccount() + "已发货"); |
| | | orderOperateDO.setOperationBy(orderShipDTO.getOperUserAccount()); |
| | | int inserted = comShopFlowerOrderOperateDAO.insert(orderOperateDO); |
| | | if (inserted != 1) { |
| | | log.error("订单发货日志保存错误"); |
| | | } |
| | | //发货通知 |
| | | WxMaService maService = wxMaConfiguration.getMaService(Constants.HC_APP_ID); |
| | | R userOpenId = userService.getUserOpenId(comShopOrderDO.getUserId()); |
| | | if (R.isOk(userOpenId)) { |
| | | String openid = userOpenId.getData().toString(); |
| | | try { |
| | | WxUtil.sendDeliverGoodsNotice(openid,maService.getAccessToken(),orderShipDTO.getLogisticsCompany(),orderShipDTO.getLogisticsNo(),comShopOrderDO.getOrderNo(), DateUtil.format(new Date(), "yyyy-MM-dd HH:mm")); |
| | | } catch (WxErrorException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return R.ok("发货成功"); |
| | | } |
| | |
| | | log.error("未查询到支付订单,订单回调失败,订单号:" + wxPayNotifyOrderDTO.getOrderTradeNo()); |
| | | return; |
| | | } |
| | | if (ComShopFlowerOrderDO.deliveryType.store == shopOrderDO.getDeliveryType()){ |
| | | if (ComShopFlowerOrderDO.deliveryType.store == shopOrderDO.getDeliveryType()) { |
| | | shopOrderDO.setStatus(ComShopFlowerOrderDO.status.ddps); |
| | | }else { |
| | | } else { |
| | | shopOrderDO.setStatus(ComShopFlowerOrderDO.status.dfh); |
| | | } |
| | | |
| | |
| | | List<ComShopFlowerOrderGoodsDO> orderGoodsList = |
| | | comShopFlowerOrderGoodsDAO.selectList(new QueryWrapper<ComShopFlowerOrderGoodsDO>().lambda() |
| | | .eq(ComShopFlowerOrderGoodsDO::getOrderNo, shopOrderDO.getOrderNo())); |
| | | |
| | | ConvenientMerchantDO storeDO = convenientMerchantDAO.selectById(shopOrderDO.getStoreId()); |
| | | |
| | | if (!orderGoodsList.isEmpty()) { |
| | | int goodsNub = 0; |
| | | for (ComShopFlowerOrderGoodsDO orderGood : orderGoodsList) { |
| | |
| | | } |
| | | |
| | | // 更新店铺销量以及销售额 |
| | | ConvenientMerchantDO storeDO = convenientMerchantDAO.selectById(shopOrderDO.getStoreId()); |
| | | if (storeDO != null) { |
| | | storeDO.setSale(storeDO.getSale() + goodsNub); |
| | | storeDO.setSaleVolume(storeDO.getSaleVolume().add(shopOrderDO.getTotalAmount())); |
| | |
| | | orderPayDO.setOrderId(shopOrderDO.getId()); |
| | | orderPayDO.setPayType(ComShopFlowerOrderPayDO.payType.zf); |
| | | comShopFlowerOrderPayDAO.insert(orderPayDO); |
| | | if (nonNull(storeDO)){ |
| | | WxMaService maService = wxMaConfiguration.getMaService(Constants.HC_APP_ID); |
| | | R sysUserVOR = userService.getSysUserVOByPhone(storeDO.getMobilePhone()); |
| | | if (R.isOk(sysUserVOR)) { |
| | | SysUserVO sysUserVO = JSONObject.parseObject(JSONObject.toJSONString(sysUserVOR.getData()), SysUserVO.class); |
| | | try { |
| | | 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")); |
| | | } catch (WxErrorException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | |
| | | IPage<ComShopFlowerOrderStoreListVO> orderPageVOIPage = this.baseMapper.pageOrderByStoreId(page, pageComFlowerOrderListDTO); |
| | | if (!orderPageVOIPage.getRecords().isEmpty()) { |
| | | orderPageVOIPage.getRecords().forEach(orderVo -> { |
| | | if (null!=orderVo.getPointId()){ |
| | | if (null != orderVo.getPointId()) { |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = convenientElevatingPointDAO.selectById(orderVo.getPointId()); |
| | | ConvenientElevatingPointVO convenientElevatingPointVO = new ConvenientElevatingPointVO(); |
| | | BeanUtils.copyProperties(convenientElevatingPointDO,convenientElevatingPointVO); |
| | | BeanUtils.copyProperties(convenientElevatingPointDO, convenientElevatingPointVO); |
| | | orderVo.setConvenientElevatingPointVO(convenientElevatingPointVO); |
| | | |
| | | } |
| | | }); |
| | | } |
| | |
| | | |
| | | @Override |
| | | public R selectCountByDeliveryType(Integer deliveryType, Long userId) { |
| | | //1.等待配送 2.配送中 3.待收货 4.待评价 5.已完成 6.已取消 7.已退款 8.总订单 |
| | | String[] statusStr = {"ddps", "psz", "dsh", "dpj", "ywc", "yqx", "ytk"}; |
| | | //1.等待配送 2.配送中 3.待收货 4.待评价 5.已完成 6.已取消 7.已退款 8.待发货 |
| | | String[] statusStr = {"ddps", "psz", "dsh", "dpj", "ywc", "yqx", "ytk", "dfh"}; |
| | | ConvenientMerchantVO convenientMerchantVO = convenientMerchantDAO.selectMerchantByUserId(userId); |
| | | List<ComShopOrderCountVO> comShopOrderCountVOS = this.baseMapper.selectCountByDeliveryType(deliveryType, convenientMerchantVO.getId()); |
| | | Map<Integer, Integer> collect = comShopOrderCountVOS.stream().collect(Collectors.toMap(ComShopOrderCountVO::getStatus, ComShopOrderCountVO::getAmount)); |
| | | Map<String, Integer> retMap = new HashMap<>(); |
| | | int amountTotal = 0; |
| | | for (int i = 0; i < statusStr.length; i++) { |
| | | if (collect.containsKey(i)) { |
| | | Integer amount = collect.get(i); |
| | | if (collect.containsKey(i+1)) { |
| | | Integer amount = collect.get(i+1); |
| | | amountTotal = amountTotal + amount; |
| | | retMap.put(statusStr[i], amount); |
| | | } else { |
| | |
| | | R r1 = this.selectCountByDeliveryType(ComShopFlowerOrderDO.deliveryType.express, userId); |
| | | retMap.put("kdddStatus", r1.getData()); |
| | | //营业额 |
| | | List<ComShopOrderStoreIdCountVO> comShopOrderStoreIdCountVOS3 = this.baseMapper.selectSumAmountByStoreId(storeId); |
| | | Map<String, Integer> yyeMap = comShopOrderStoreIdCountVOS3.stream().collect(Collectors.toMap(ComShopOrderStoreIdCountVO::getCountName, ComShopOrderStoreIdCountVO::getCountNum)); |
| | | List<ComShopOrderStoreIdNumVO> comShopOrderStoreIdCountVOS3 = this.baseMapper.selectSumAmountByStoreId(storeId); |
| | | Map<String, BigDecimal> yyeMap = comShopOrderStoreIdCountVOS3.stream().collect(Collectors.toMap(ComShopOrderStoreIdNumVO::getCountName, ComShopOrderStoreIdNumVO::getCountNum)); |
| | | retMap.put("yye", yyeMap); |
| | | //在售商品 |
| | | Integer countSale = comShopFlowerGoodsDAO.selectCountSaleByStoreId(storeId); |
| | |
| | | //退款申请 |
| | | Integer refundOrder = comShopFlowerRefundOrderDAO.selectCountByStoreId(storeId); |
| | | retMap.put("refundOrder", refundOrder); |
| | | |
| | | return R.ok(retMap); |
| | | } |
| | | |
| | |
| | | return R.ok(retMap); |
| | | } |
| | | |
| | | public R selectOrderLineChart(Long storeId, Integer type,Integer tab) { |
| | | if (tab == 1){ |
| | | public R selectOrderLineChart(Long storeId, Integer type, Integer tab) { |
| | | if (tab == 1) { |
| | | if (1 == type) { |
| | | //近15天的订单量 |
| | | int days = 15; |
| | |
| | | } |
| | | return R.ok(retMap); |
| | | } |
| | | }else if (2==tab){ |
| | | } else if (2 == tab) { |
| | | if (1 == type) { |
| | | //近15天的营收 |
| | | int days = 15; |
| | |
| | | ComShopFlowerOrderDeliveryNoListVO comShopFlowerOrderDeliveryNoListVO = new ComShopFlowerOrderDeliveryNoListVO(); |
| | | ComShopFlowerOrderDeliveryDO comShopFlowerOrderDeliveryDO = comShopFlowerOrderDeliveryDAO.selectById(pageComFlowerOrderListDTO.getDeliveryId()); |
| | | ComShopFlowerOrderDeliveryVO comShopFlowerOrderDeliveryVO = new ComShopFlowerOrderDeliveryVO(); |
| | | BeanUtils.copyProperties(comShopFlowerOrderDeliveryDO,comShopFlowerOrderDeliveryVO); |
| | | BeanUtils.copyProperties(comShopFlowerOrderDeliveryDO, comShopFlowerOrderDeliveryVO); |
| | | |
| | | Long pointId = comShopFlowerOrderDeliveryDO.getPointId(); |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = convenientElevatingPointDAO.selectById(pointId); |
| | | ConvenientElevatingPointVO convenientElevatingPointVO = new ConvenientElevatingPointVO(); |
| | | BeanUtils.copyProperties(convenientElevatingPointDO,convenientElevatingPointVO); |
| | | BeanUtils.copyProperties(convenientElevatingPointDO, convenientElevatingPointVO); |
| | | comShopFlowerOrderDeliveryVO.setConvenientElevatingPointVO(convenientElevatingPointVO); |
| | | comShopFlowerOrderDeliveryNoListVO.setComShopFlowerOrderDeliveryVO(comShopFlowerOrderDeliveryVO); |
| | | comShopFlowerOrderDeliveryNoListVO.setPage(orderPageVOIPage); |
| | | return R.ok(comShopFlowerOrderDeliveryNoListVO); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.panzhihua.service_community.service.impl; |
| | | |
| | | import cn.binarywang.wx.miniapp.api.WxMaService; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.panzhihua.common.constants.Constants; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopFlowerRefundOrderDTO; |
| | | import com.panzhihua.common.model.dtos.shop.ComShopOrderQueryDTO; |
| | | import com.panzhihua.common.model.dtos.shop.PageComOrderRefundDTO; |
| | |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerOrderGoodsVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopFlowerRefundOrderVO; |
| | | import com.panzhihua.common.model.vos.shop.ComShopOrderCountVO; |
| | | import com.panzhihua.common.model.vos.user.SysUserVO; |
| | | import com.panzhihua.common.service.user.UserService; |
| | | import com.panzhihua.common.utlis.OrderNoUtils; |
| | | import com.panzhihua.common.utlis.WxPayUtils; |
| | | import com.panzhihua.common.utlis.WxUtil; |
| | | import com.panzhihua.common.utlis.wx.WXPayUtil; |
| | | import com.panzhihua.service_community.dao.*; |
| | | import com.panzhihua.service_community.model.dos.*; |
| | | import com.panzhihua.service_community.service.ComShopFlowerRefundOrderService; |
| | | import com.panzhihua.service_community.util.WxMaConfiguration; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import me.chanjar.weixin.common.error.WxErrorException; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private ComShopFlowerOrderGoodsDAO comShopFlowerOrderGoodsDAO; |
| | | @Resource |
| | | private ComShopFlowerGoodsDAO comShopFlowerGoodsDAO; |
| | | |
| | | @Resource |
| | | private ComShopFlowerGoodsAttrDAO comShopFlowerGoodsAttrDAO; |
| | | @Resource |
| | | private ConvenientMerchantDAO convenientMerchantDAO; |
| | | @Resource |
| | | private WxMaConfiguration wxMaConfiguration; |
| | | @Resource |
| | | private UserService userService; |
| | | @Resource |
| | | private ConvenientElevatingPointDAO convenientElevatingPointDAO; |
| | | |
| | | |
| | | @Override |
| | |
| | | comShopFlowerRefundOrderDO.setStatus(ComShopFlowerRefundOrderDO.status.clz); |
| | | comShopFlowerRefundOrderDO.setDeleteStatus(ComShopFlowerRefundOrderDO.deleteStatus.no); |
| | | this.baseMapper.insert(comShopFlowerRefundOrderDO); |
| | | //商家接受退款信息 |
| | | ConvenientMerchantVO convenientMerchantVO = convenientMerchantDAO.selectMerchantById(comShopFlowerRefundOrderDTO.getStoreId()); |
| | | WxMaService maService = wxMaConfiguration.getMaService(Constants.HC_APP_ID); |
| | | R sysUserVOR = userService.getSysUserVOByPhone(convenientMerchantVO.getMobilePhone()); |
| | | 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")); |
| | | } catch (WxErrorException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | |
| | | IPage<ComShopFlowerRefundOrderVO> pages = this.baseMapper.pageRefundOrder(page, pageComOrderRefundDTO); |
| | | for (ComShopFlowerRefundOrderVO comShopFlowerRefundOrderVO : pages.getRecords()) { |
| | | String orderNo = comShopFlowerRefundOrderVO.getOrderNo(); |
| | | ComShopFlowerOrderDO comShopFlowerOrderDO = comShopFlowerOrderDAO.selectById(comShopFlowerRefundOrderVO.getOrderId()); |
| | | if (nonNull(comShopFlowerOrderDO)){ |
| | | comShopFlowerRefundOrderVO.setTotalAmount(comShopFlowerOrderDO.getTotalAmount()); |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = convenientElevatingPointDAO.selectById(comShopFlowerOrderDO.getPointId()); |
| | | if (nonNull(convenientElevatingPointDO)){ |
| | | comShopFlowerRefundOrderVO.setPointName(convenientElevatingPointDO.getName()); |
| | | } |
| | | } |
| | | |
| | | List<ComShopFlowerOrderGoodsVO> orderGoodsVOS = new ArrayList<>(); |
| | | // 查询订单下商品信息 |
| | | List<ComShopFlowerOrderGoodsDO> orderGoodsDOList = comShopFlowerOrderGoodsDAO |
| | |
| | | orderGoodsVO.setNum(orderGoods.getAmount()); |
| | | orderGoodsVO.setGoodsPic(orderGoods.getGoodsAttrPic()); |
| | | orderGoodsVO.setPrice(orderGoods.getGoodsAttrPrice()); |
| | | |
| | | orderGoodsVO.setGoodsAttr(orderGoods.getGoodsAttrName()); |
| | | orderGoodsVOS.add(orderGoodsVO); |
| | | sbr.append(orderGoods.getGoodsName()).append(" "); |
| | | }); |
| | | comShopFlowerRefundOrderVO.setGoodsAttrName(orderGoodsDOList.get(0).getGoodsAttrName()); |
| | | } |
| | | comShopFlowerRefundOrderVO.setOrderGoodsVOList(orderGoodsVOS); |
| | | comShopFlowerRefundOrderVO.setGoodsName(sbr.toString()); |
| | | |
| | | ConvenientMerchantVO shopStoreVO = new ConvenientMerchantVO(); |
| | | |
| | | // 查询店铺信息 |
| | | /* ConvenientMerchantVO shopStoreVO = new ConvenientMerchantVO(); |
| | | ConvenientMerchantDO shopStoreDO = convenientMerchantDAO.selectById(comShopFlowerRefundOrderVO.getStoreId()); |
| | | if (shopStoreDO != null) { |
| | | BeanUtils.copyProperties(shopStoreDO, shopStoreVO); |
| | | } |
| | | comShopFlowerRefundOrderVO.setConvenientMerchantVO(shopStoreVO); |
| | | */ |
| | | |
| | | } |
| | | return R.ok(pages); |
| | | } |
| | |
| | | |
| | | if (Objects.isNull(comShopFlowerRefundOrderDO)) { |
| | | return R.fail("不存在该退款订单"); |
| | | } |
| | | } ComShopFlowerOrderDO comShopFlowerOrderDO = comShopFlowerOrderDAO.selectById(comShopFlowerRefundOrderDO.getOrderId()); |
| | | |
| | | if (ComShopFlowerRefundOrderDO.handleResult.agree.equals(comShopFlowerRefundOrderDTO.getHandleResult())) { |
| | | //处理退款事宜 |
| | | comShopFlowerRefundOrderDO.setRefundTime(new Date()); |
| | |
| | | //微信处理退款 |
| | | try { |
| | | String refundNo = WXPayUtil.generateNonceStr(); |
| | | ComShopFlowerOrderDO comShopFlowerOrderDO = comShopFlowerOrderDAO.selectById(comShopFlowerRefundOrderDO.getOrderId()); |
| | | String refundStr = WxPayUtils.refund(appid, mchId, comShopFlowerOrderDO.getOrderNo(), comShopFlowerRefundOrderDO.getPayAmount(), |
| | | comShopFlowerRefundOrderDO.getRefundAmount(), refundNo, isTest); |
| | | comShopFlowerRefundOrderDO.getPayAmount(), refundNo, isTest); |
| | | log.info("退款请求接口返回参数:{}" , refundStr); |
| | | Map<String, String> mapResult = WXPayUtil.xmlToMap(refundStr); |
| | | if (CollUtil.isNotEmpty(mapResult)) { |
| | |
| | | //更新订单状态 |
| | | comShopFlowerOrderDO.setStatus(ComShopFlowerOrderDO.status.ytk); |
| | | comShopFlowerOrderDAO.updateById(comShopFlowerOrderDO); |
| | | |
| | | //退款成功发送消息 |
| | | sendRefundNotice(comShopFlowerRefundOrderDO, comShopFlowerOrderDO,"同意退款"); |
| | | }else { |
| | | //退款失败 |
| | | comShopFlowerRefundOrderDO.setStatus(ComShopFlowerRefundOrderDO.status.tksb); |
| | | comShopFlowerRefundOrderDO.setRemark(comShopFlowerRefundOrderDO.getRemark() + "_"+return_msg); |
| | | comShopFlowerRefundOrderDO.setRemark(comShopFlowerRefundOrderDO.getRemark() + "_退款失败"); |
| | | // 添加订单支付记录表 |
| | | orderPayDO.setPayStatus(ComShopFlowerOrderPayDO.payStatus.no); |
| | | orderPayDO.setRefundStatus(ComShopFlowerOrderPayDO.refundStatus.tksb); |
| | | //退款失败发送消息 |
| | | sendRefundNotice(comShopFlowerRefundOrderDO, comShopFlowerOrderDO,"退款失败"); |
| | | } |
| | | comShopFlowerOrderPayDAO.insert(orderPayDO); |
| | | } |
| | |
| | | comShopFlowerRefundOrderDO.setHandleTime(new Date()); |
| | | comShopFlowerRefundOrderDO.setStatus(ComShopFlowerRefundOrderDO.status.tksb); |
| | | comShopFlowerRefundOrderDO.setHandleResult(ComShopFlowerRefundOrderDO.handleResult.refuse); |
| | | //拒绝退款发送消息 |
| | | sendRefundNotice(comShopFlowerRefundOrderDO, comShopFlowerOrderDO,"拒绝退款"); |
| | | } |
| | | this.baseMapper.updateById(comShopFlowerRefundOrderDO); |
| | | return R.ok(); |
| | | } |
| | | |
| | | private void sendRefundNotice(ComShopFlowerRefundOrderDO comShopFlowerRefundOrderDO, ComShopFlowerOrderDO comShopFlowerOrderDO,String msg) { |
| | | WxMaService maService = wxMaConfiguration.getMaService(Constants.HC_APP_ID); |
| | | R userOpenId = userService.getUserOpenId(comShopFlowerOrderDO.getUserId()); |
| | | if (R.isOk(userOpenId)) { |
| | | String openid = userOpenId.getData().toString(); |
| | | try { |
| | | WxUtil.sendRefundNotice(openid,maService.getAccessToken(),comShopFlowerRefundOrderDO.getRefundOrderNo(),comShopFlowerRefundOrderDO.getRefundAmount().toString(),msg); |
| | | } catch (WxErrorException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | if (goodsAttrDO != null) { |
| | | orderGoodsVO.setGoodsAttr(goodsAttrDO.getGoodsAttrName()); |
| | | } |
| | | comShopFlowerRefundOrderVO.setGoodsAttrName(orderGoodsDOList.get(0).getGoodsAttrName()); |
| | | orderGoodsVOS.add(orderGoodsVO); |
| | | sbr.append(orderGoods.getGoodsName()).append(" "); |
| | | }); |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | |
| | | import static java.util.Objects.isNull; |
| | | import static java.util.Objects.nonNull; |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R addPoint(ConvenientElevatingPointDTO convenientElevatingPointDTO) { |
| | | ConvenientElevatingPointDO convenientElevatingPointDODB = this.baseMapper.selectOne(new LambdaQueryWrapper<ConvenientElevatingPointDO>().eq(ConvenientElevatingPointDO::getWechatAccount, convenientElevatingPointDTO.getWechatAccount())); |
| | | if (!Objects.isNull(convenientElevatingPointDODB)){ |
| | | return R.fail("该微信手机号已使用,请更换"); |
| | | } |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = new ConvenientElevatingPointDO(); |
| | | BeanUtils.copyProperties(convenientElevatingPointDTO, convenientElevatingPointDO); |
| | | String communityId = convenientElevatingPointDTO.getCommunityId(); |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public R putPoint(ConvenientElevatingPointDTO convenientElevatingPointDTO) { |
| | | ConvenientElevatingPointDO convenientElevatingPointDODB = this.baseMapper.selectOne(new LambdaQueryWrapper<ConvenientElevatingPointDO>().eq(ConvenientElevatingPointDO::getWechatAccount, convenientElevatingPointDTO.getWechatAccount())); |
| | | |
| | | Long id = convenientElevatingPointDTO.getId(); |
| | | ConvenientElevatingPointDO convenientElevatingPointDO = this.baseMapper.selectById(id); |
| | | if (isNull(convenientElevatingPointDO)) { |
| | | return R.fail("自提点不存在"); |
| | | } |
| | | if (nonNull(convenientElevatingPointDODB) && !convenientElevatingPointDODB.getId().equals(convenientElevatingPointDO.getId())) { |
| | | R.fail("该微信手机号:" + convenientElevatingPointDTO.getWechatAccount() + "已被使用!请更换"); |
| | | } |
| | | String communityId = convenientElevatingPointDTO.getCommunityId(); |
| | | if (nonNull(communityId)) { |
| | |
| | | String maxLng = around.get("maxLng").toString(); |
| | | List<ConvenientElevatingPointDO> convenientElevatingPointDOS = this.baseMapper.selectList( |
| | | new LambdaQueryWrapper<ConvenientElevatingPointDO>() |
| | | .ge(ConvenientElevatingPointDO::getLat, minLng) |
| | | .le(ConvenientElevatingPointDO::getLat, maxLng) |
| | | .ge(ConvenientElevatingPointDO::getLon, minLat) |
| | | .le(ConvenientElevatingPointDO::getLon, maxLat)); |
| | | .ge(ConvenientElevatingPointDO::getLat, Double.parseDouble(minLng)) |
| | | .le(ConvenientElevatingPointDO::getLat, Double.parseDouble(maxLng)) |
| | | .ge(ConvenientElevatingPointDO::getLon, Double.parseDouble(minLat)) |
| | | .le(ConvenientElevatingPointDO::getLon, Double.parseDouble(maxLat)) |
| | | .eq(ConvenientElevatingPointDO::getBusinessStatus,1)); |
| | | List<ConvenientElevatingPointVO> convenientElevatingPointVOS = new ArrayList<>(); |
| | | convenientElevatingPointDOS.forEach(f -> { |
| | | ConvenientElevatingPointVO convenientElevatingPointVO = new ConvenientElevatingPointVO(); |
| | |
| | | convenientElevatingPointVO.setDistance(distance); |
| | | convenientElevatingPointVOS.add(convenientElevatingPointVO); |
| | | }); |
| | | Collections.sort(convenientElevatingPointVOS); |
| | | return R.ok(convenientElevatingPointVOS); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public R findPointNumByDistance(Integer distance, String lat, String lng) { |
| | | Map<Object, Object> around = MapDistance.getAround(lat, lng, distance * 1000d); |
| | | String maxLat = around.get("maxLat").toString(); |
| | | String minLat = around.get("minLat").toString(); |
| | | String minLng = around.get("minLng").toString(); |
| | | String maxLng = around.get("maxLng").toString(); |
| | | List<ConvenientElevatingPointDO> convenientElevatingPointDOS = this.baseMapper.selectList( |
| | | new LambdaQueryWrapper<ConvenientElevatingPointDO>() |
| | | .ge(ConvenientElevatingPointDO::getLat, Double.parseDouble(minLng)) |
| | | .le(ConvenientElevatingPointDO::getLat, Double.parseDouble(maxLng)) |
| | | .ge(ConvenientElevatingPointDO::getLon, Double.parseDouble(minLat)) |
| | | .le(ConvenientElevatingPointDO::getLon, Double.parseDouble(maxLat)) |
| | | .eq(ConvenientElevatingPointDO::getBusinessStatus,1)); |
| | | List<ConvenientElevatingPointVO> convenientElevatingPointVOS = new ArrayList<>(); |
| | | convenientElevatingPointDOS.forEach(f -> { |
| | | ConvenientElevatingPointVO convenientElevatingPointVO = new ConvenientElevatingPointVO(); |
| | | BeanUtils.copyProperties(f, convenientElevatingPointVO); |
| | | Double distancem = MapDistance.distanceOfTwoPoints(lat, lng, f.getLon(), f.getLat()); |
| | | convenientElevatingPointVO.setDistance(distancem); |
| | | convenientElevatingPointVOS.add(convenientElevatingPointVO); |
| | | }); |
| | | Collections.sort(convenientElevatingPointVOS); |
| | | return R.ok(convenientElevatingPointVOS.size()); |
| | | } |
| | | } |
| | |
| | | @Override |
| | | public R getMerchant(Long merchantId) { |
| | | ConvenientMerchantVO convenientMerchantVO = this.baseMapper.selectMerchantById(merchantId); |
| | | List<Long> serviceIds = convenientServiceCategoryDAO.selectServiceIdsForMerchant(merchantId); |
| | | List<String> serviceIds = convenientServiceCategoryDAO.selectServiceIdsForMerchant(merchantId); |
| | | convenientMerchantVO.setServiceIds(serviceIds); |
| | | return R.ok(convenientMerchantVO); |
| | | } |
| | |
| | | Long merchantId = merchantDO.getId(); |
| | | ConvenientMerchantVO convenientMerchantVO = new ConvenientMerchantVO(); |
| | | BeanUtils.copyProperties(merchantDO, convenientMerchantVO); |
| | | List<Long> serviceIds = convenientServiceCategoryDAO.selectServiceIdsForMerchant(merchantId); |
| | | List<String> serviceIds = convenientServiceCategoryDAO.selectServiceIdsForMerchant(merchantId); |
| | | convenientMerchantVO.setServiceIds(serviceIds); |
| | | Date nowDate = new Date(); |
| | | SimpleDateFormat mothFormat = new SimpleDateFormat("yyyy-MM"); |
| | |
| | | return R.fail("商家不存在"); |
| | | } |
| | | Long merchantId = convenientMerchantVO.getId(); |
| | | List<Long> serviceIds = convenientServiceCategoryDAO.selectServiceIdsForMerchant(merchantId); |
| | | List<String> serviceIds = convenientServiceCategoryDAO.selectServiceIdsForMerchant(merchantId); |
| | | convenientMerchantVO.setServiceIds(serviceIds); |
| | | BigDecimal score = comShopFlowerEvaluateDAO.statisticsScore(merchantId); |
| | | convenientMerchantVO.setScore(null == score ? BigDecimal.ZERO : NumberUtil.round(score, 1)); |
| | |
| | | //趵突泉:117.00999000000002 36.66123 |
| | | //103.962128,30.57568 |
| | | //103.957232,30.636726 |
| | | System.out.println(getDistance("30.57568","103.962128","30.636726","103.957232")); |
| | | // System.out.println(getDistance("30.57568","103.962128","30.636726","103.957232")); |
| | | |
| | | //103.842654,30.560987 |
| | | System.out.println(getAround("107.075277", "30.456085", 5000d)); |
| | | System.out.println(getAround("104.082679", "30.592872", 900000d)); |
| | | //117.01028712333508(Double), 117.22593287666493(Double), |
| | | //36.44829619896034(Double), 36.92138380103966(Double) |
| | | //104.03035080138962(String), 104.12020319861038(String), 30.271352899925574(String), 30.64081710007443(String) |
| | | distanceOfTwoPoints("30.57568","103.962128","30.636726","103.957232"); |
| | | // distanceOfTwoPoints("30.57568","103.962128","30.636726","103.957232"); |
| | | } |
| | | |
| | | } |
| | |
| | | GROUP BY status |
| | | </select> |
| | | |
| | | <select id="selectColorMarkGroup" |
| | | resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidColorChartsVO"> |
| | | SELECT count(1) count_num,color_mark FROM `com_act_acid_record` GROUP BY color_mark |
| | | </select> |
| | | <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 |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <select id="selectOpenIdByActivityId" resultType="String"> |
| | | select distinct openid from com_act_act_sign t LEFT JOIN sys_user t1 on t.user_id = t1.user_id where t.activity_id =#{id} and t.status = 1 |
| | | </select> |
| | | |
| | | |
| | | <select id="pageActivityBigScreen" |
| | | resultType="com.panzhihua.common.model.vos.community.ComActActivityBigScreenVO"> |
| | | SELECT a.id,a.cover,a.activity_type,a.activity_name,a.`status`,a.begin_at,a.end_at,a.publish_at, |
| | | (SELECT count(1) FROM com_act_act_sign s WHERE s.activity_id = a.id) as person_num |
| | | FROM com_act_activity a |
| | | WHERE a.type = 1 ORDER BY a.create_at desc |
| | | </select> |
| | | </mapper> |
| | |
| | | <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 |
| | | 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> |
| | | |
| | | </mapper> |
| | |
| | | </if> |
| | | order by canc.create_at desc |
| | | </select> |
| | | |
| | | <select id="pageNeighborByBigScreen" parameterType="com.panzhihua.common.model.dtos.neighbor.ComActNeighborCircleAdminDTO" |
| | | resultType="com.panzhihua.common.model.vos.neighbor.ComActNeighborCircleAdminVO"> |
| | | SELECT |
| | | nc.*, |
| | | u.`nick_name` AS releaseName,u.image_url,canct.`name` as topicName ,u.`type` as userType |
| | | ,u.name as communityName,nc.solve_status |
| | | FROM |
| | | com_act_neighbor_circle nc |
| | | LEFT JOIN sys_user u ON nc.release_id = u.user_id |
| | | LEFT JOIN com_act_neighbor_circle_topic as canct ON canct.id = nc.topic_id |
| | | <where> |
| | | nc.belong_type in (2,3) and is_del = 2 |
| | | |
| | | <if test='neighborCircleAdminDTO.keyWord != null and neighborCircleAdminDTO.keyWord != ""'> |
| | | and (canct.`name` like concat(#{neighborCircleAdminDTO.keyWord},'%') or |
| | | u.`nick_name` like concat(#{neighborCircleAdminDTO.keyWord},'%') or |
| | | nc.`release_content` like concat(#{neighborCircleAdminDTO.keyWord},'%') ) |
| | | </if> |
| | | |
| | | <if test='neighborCircleAdminDTO.status != null '> |
| | | and nc.status = #{neighborCircleAdminDTO.status} |
| | | </if> |
| | | <!-- <if test='neighborCircleAdminDTO.belongType != null '>--> |
| | | <!-- and nc.belong_type = #{neighborCircleAdminDTO.belongType}--> |
| | | <!-- </if>--> |
| | | <if test="neighborCircleAdminDTO.solveStatus !=null"> |
| | | <if test="neighborCircleAdminDTO.solveStatus ==1"> |
| | | and nc.solve_status in (0,1) |
| | | </if> |
| | | <if test="neighborCircleAdminDTO.solveStatus ==2"> |
| | | and nc.solve_status =2 |
| | | </if> |
| | | <if test="neighborCircleAdminDTO.solveStatus ==3"> |
| | | and nc.solve_status in(3,4) |
| | | </if> |
| | | </if> |
| | | </where> |
| | | order by nc.create_at desc |
| | | </select> |
| | | </mapper> |
| | |
| | | LEFT JOIN com_shop_flower_order csfo ON ccep.id = csfo.point_id |
| | | LEFT JOIN com_shop_flower_order_goods og ON og.order_id = csfo.id |
| | | WHERE |
| | | csfo.`status` = 1 |
| | | csfo.`status` = 1 and ccep.business_status = 1 |
| | | <if test="pageComFlowerOrderDeliveryDTO.storeId != null"> |
| | | and csfo.store_id = #{pageComFlowerOrderDeliveryDTO.storeId} |
| | | </if> |
| | |
| | | LEFT JOIN com_shop_flower_order csfo ON ccep.id = csfo.point_id |
| | | LEFT JOIN com_shop_flower_order_goods og ON og.order_id = csfo.id |
| | | WHERE |
| | | csfo.`status` = 1 |
| | | csfo.`status` = 1 and ccep.business_status = 1 |
| | | <if test="pageComFlowerOrderListDTO.storeId != null"> |
| | | and csfo.store_id = #{pageComFlowerOrderListDTO.storeId} |
| | | </if> |
| | |
| | | (SELECT count(id) FROM com_sanshuo_event_info |
| | | where is_end <> 1 |
| | | AND user_event_status not in(3,4) |
| | | AND event_process_status > 1 |
| | | AND event_process_status not in (9) |
| | | AND event_process_status not in (1,9) |
| | | AND app_id='wx0cef797390444b75' |
| | | <if test="dto.type == 2"> |
| | | AND current_process_type in (1,5) |
| | |
| | | <mapper namespace="com.panzhihua.service_community.dao.ComPbMemberDAO"> |
| | | |
| | | <select id="selectById" resultType="com.panzhihua.common.model.vos.partybuilding.ComPbMemberVO"> |
| | | select t.*,t2.name as orgName from com_pb_member t left join com_mng_population t1 on t.id_card = t1.card_no_str left join com_pb_org t2 on t.org_id = t2.id where t1.card_no_str =#{idCard} |
| | | select t.*,t2.name as orgName from com_pb_member t left join com_mng_population t1 on t.id_card = t1.card_no_str |
| | | left join com_pb_org t2 on t.org_id = t2.id where t1.card_no_str =#{idCard} |
| | | </select> |
| | | |
| | | <select id="selectActivityCountMonth" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine"> |
| | | select ( select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and release_time >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) y, |
| | | (select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and DATE_FORMAT( LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) countY |
| | | <select id="selectActivityCountMonth" |
| | | resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityLine"> |
| | | select ( select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and |
| | | release_time >= DATE_FORMAT( CONCAT(#{year},'-',#{date},'-00'), '%Y-%m-00 00:00:00') and DATE_FORMAT( |
| | | LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) y, |
| | | (select count(id) from com_pb_activity where status!=6 and community_id = ${communityId} and DATE_FORMAT( |
| | | LAST_DAY(CONCAT(#{year},'-',#{date},'-00')), '%Y-%m-%d 23:59:59') >=release_time) countY |
| | | </select> |
| | | |
| | | <select id="selectActivityTop" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenActivityTop"> |
| | | select t.name,t.photo_path as url,t1.name as orgName,t2.integral_available_party as score from com_pb_member t LEFT JOIN com_pb_org t1 on t.org_id= t1.id LEFT JOIN com_act_integral_user t2 on t.user_id = t2.user_id where t.community_id = ${communityId} and t2.status = 1 order by integral_available_party desc |
| | | select t.name,t.photo_path as url,t1.name as orgName,t2.integral_available_party as score from com_pb_member t |
| | | LEFT JOIN com_pb_org t1 on t.org_id= t1.id LEFT JOIN com_act_integral_user t2 on t.user_id = t2.user_id where |
| | | t.community_id = ${communityId} and t2.status = 1 order by integral_available_party desc |
| | | </select> |
| | | |
| | | <select id="bigScreenServiceData" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData"> |
| | | <select id="bigScreenServiceData" |
| | | resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceData"> |
| | | select (select count(*) from com_act_work_guide ) guide, |
| | | (select count(*) from com_act_announcement where community_id = ${communityId}) announcement, |
| | | (select count(*) from com_elder_auth_elderlies where community_id = ${communityId}) eldersAuth, |
| | | (select count(*) from com_convenient_merchants where (community_id = ${communityId} OR community_id = 0) and is_del =0) convenient, |
| | | (select count(*) from com_convenient_merchants where (community_id = ${communityId} OR community_id = 0) and |
| | | is_del =0) convenient, |
| | | (select count(*) from renting_hourse_register where community_id = ${communityId}) rentingHouse, |
| | | (select count(*) from com_property_alarm where community_id = ${communityId}) oneButton, |
| | | (select count(*) from com_pension_auth_pensioners where community_id = ${communityId} ) pensionAuth, |
| | |
| | | (select count(*) from com_property where community_id = ${communityId} ) property |
| | | </select> |
| | | |
| | | <select id="bigScreenServiceUser" resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceUser"> |
| | | <select id="bigScreenServiceUser" |
| | | resultType="com.panzhihua.common.model.vos.community.bigscreen.BigScreenServiceUser"> |
| | | select t.name AS villageName, IF(t1.num IS NULL,0,t1.num) as num |
| | | from com_mng_village t left join ( |
| | | select count(*) num,village_id |
| | | from com_mng_population |
| | | where act_id = #{communityId} GROUP BY village_id |
| | | select count(*) num,village_id |
| | | from com_mng_population |
| | | where act_id = #{communityId} GROUP BY village_id |
| | | ) t1 on t.village_id = t1.village_id where t.community_id = ${communityId} |
| | | </select> |
| | | <select id="checkIsPbMember" resultType="java.lang.Integer"> |
| | | SELECT |
| | | (SELECT COUNT(id) FROM com_pb_member WHERE phone = (SELECT phone FROM sys_user WHERE user_id = #{userId}) AND audit_result = 1) |
| | | (SELECT COUNT(id) FROM com_pb_member WHERE phone = (SELECT phone FROM sys_user WHERE user_id = #{userId}) AND |
| | | audit_result = 1) |
| | | + |
| | | (SELECT COUNT(id) FROM com_pb_member_west WHERE phone = (SELECT phone FROM sys_user WHERE user_id = #{userId}) AND audit_result = 1) |
| | | (SELECT COUNT(id) FROM com_pb_member_west WHERE phone = (SELECT phone FROM sys_user WHERE user_id = #{userId}) |
| | | AND audit_result = 1) |
| | | </select> |
| | | <select id="checkIsVolunteer" resultType="java.lang.Integer"> |
| | | SELECT COUNT(id) FROM com_mng_volunteer_mng WHERE state = 2 AND phone = (SELECT phone FROM sys_user WHERE user_id = #{userId}) |
| | | SELECT COUNT(id) FROM com_mng_volunteer_mng WHERE state = 2 AND phone = (SELECT phone FROM sys_user WHERE |
| | | user_id = #{userId}) |
| | | </select> |
| | | <select id="statisticsPbMemberType" |
| | | resultType="com.panzhihua.common.model.vos.partybuilding.ComPbMemberTypeVO"> |
| | | SELECT count(1) count_num, '统计调查' as count_name FROM com_pb_member WHERE find_in_set('统计调查',specialty_name) |
| | | UNION ALL |
| | | SELECT count(1) count_num, '法律援助' as count_name FROM com_pb_member WHERE find_in_set('法律援助',specialty_name) |
| | | UNION ALL |
| | | SELECT count(1) count_num, '志愿活动' as count_name FROM com_pb_member WHERE find_in_set('志愿活动',specialty_name) |
| | | UNION ALL |
| | | SELECT count(1) count_num, '尊老爱幼' as count_name FROM com_pb_member WHERE find_in_set('尊老爱幼',specialty_name) |
| | | UNION ALL |
| | | SELECT count(1) count_num, '宣讲宣教' as count_name FROM com_pb_member WHERE find_in_set('宣讲宣教',specialty_name) |
| | | UNION ALL |
| | | SELECT count(1) count_num, '心理关爱' as count_name FROM com_pb_member WHERE find_in_set('心理关爱',specialty_name) |
| | | UNION ALL |
| | | SELECT count(1) count_num, '设施维修' as count_name FROM com_pb_member WHERE find_in_set('设施维修',specialty_name) |
| | | UNION ALL |
| | | SELECT count(1) count_num, '其他' as count_name FROM com_pb_member WHERE find_in_set('其他',specialty_name) |
| | | </select> |
| | | <select id="selectUnitByNatureName" resultType="com.panzhihua.common.model.vos.partybuilding.ComPbMemberTypeVO"> |
| | | SELECT count(1) count_num,'企事业单位' as count_name FROM com_pb_check_unit WHERE nature_name = '企事业单位' |
| | | UNION ALL |
| | | SELECT count(1) count_num,'机关单位' as count_name FROM com_pb_check_unit WHERE nature_name = '机关单位' |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="statisticsScore" resultType="java.math.BigDecimal"> |
| | | SELECT (sum(e.evaluate_type)/count(1)) AS pf FROM `com_shop_flower_evaluate` e LEFT JOIN com_shop_flower_goods g ON e.goods_id = g.id WHERE g.store_id = #{storeId} GROUP BY g.store_id |
| | | </select> |
| | | |
| | | <select id="selectCountByGoodsId" resultType="java.lang.Integer"> |
| | | SELECT count(1) FROM com_shop_flower_evaluate e WHERE e.goods_id = #{goodsId} |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | storeName,c.name,c.store_id,c.goods_pic,c.images,c.status,c.sale,c.original_price,c.price,c.unit,c.order,c.stock,c.details,c.remark,c.goods_describe,c.delivery_type,c.delete_status,c.create_at,c.update_at |
| | | from com_shop_flower_goods c |
| | | left join com_convenient_merchants ccm on c.store_id=ccm.id |
| | | left join com_convenient_goods_scope as cgs on cgs.goods_id = c.id |
| | | where c.delete_status = 1 and ccm.is_del = 0 |
| | | <if test='pageComShopFlowerGoodsDTO.storeName != null and pageComShopFlowerGoodsDTO.storeName.trim() != ""'> |
| | | and ccm.name like concat('%',#{pageComShopFlowerGoodsDTO.storeName},'%') |
| | |
| | | <if test='pageComShopFlowerGoodsDTO.status != null'> |
| | | and c.status like concat('%',#{pageComShopFlowerGoodsDTO.status},'%') |
| | | </if> |
| | | <if test='pageComShopFlowerGoodsDTO.categoryIds != null '> |
| | | AND cgs.goods_category_id = #{pageComShopFlowerGoodsDTO.categoryIds} |
| | | </if> |
| | | <if test='pageComShopFlowerGoodsDTO.userId != null'> |
| | | and ccm.user_id = #{pageComShopFlowerGoodsDTO.userId} |
| | | </if> |
| | | |
| | | order by c.create_at desc |
| | | </select> |
| | |
| | | </select> |
| | | <select id="pageShopGoodByApps" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerGoodsVO"> |
| | | select csg.id,csg.`name`,csg.store_id,csg.goods_pic,csg.images,csg.`status`,csg.sale,csg.original_price |
| | | ,csg.price,csg.unit,csg.`order`,csg.stock,csg.details,csg.delivery_type, csg.create_at, |
| | | (SELECT count(fog.id) FROM com_shop_flower_order_goods as fog WHERE fog.goods_id = 1) as order_num |
| | | ,csg.price,csg.unit,csg.`order`,csg.details,csg.delivery_type, csg.create_at, |
| | | (SELECT count(fog.id) FROM com_shop_flower_order_goods as fog WHERE fog.goods_id = csg.id) as order_num, |
| | | (SELECT ifnull(sum(ga.stock),0) from com_shop_flower_goods_attr ga where ga.goods_id = csg.id ) as stock |
| | | 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 |
| | |
| | | </select> |
| | | |
| | | |
| | | <select id="countSaleByUserId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> |
| | | SELECT count(1) AS count_num, 'sale' AS count_name FROM com_shop_flower_goods g LEFT JOIN com_convenient_merchants m on g.store_id = m.id WHERE g.delete_status = 1 and m.user_id = #{userId} and g.`status` = 1 |
| | | union all |
| | | SELECT count(1) AS count_num, 'noSale' AS count_name FROM com_shop_flower_goods g LEFT JOIN com_convenient_merchants m on g.store_id = m.id WHERE g.delete_status = 1 and m.user_id = #{userId} and g.`status` = 2 |
| | | </select> |
| | | </mapper> |
| | |
| | | |
| | | <select id="pageOrderList" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerOrderPageVO"> |
| | | select id as orderId,order_no,store_id,`status`,pay_status,receiver_id,total_amount as |
| | | orderTotal,pay_amount,delivery_type,remark,create_at from com_shop_flower_order as cso |
| | | where cso.delete_status = 1 |
| | | orderTotal,pay_amount,delivery_type,remark,create_at, logistics_company, logistics_no,receiving_time from com_shop_flower_order as cso |
| | | where cso.delete_status = 1 and cso.`status` != 0 |
| | | <if test="comOrderListDTO.userId != null"> |
| | | and cso.user_id = #{comOrderListDTO.userId} |
| | | </if> |
| | |
| | | sr.pay_time, sr.delivery_type, sr.delivery_status, sr.logistics_company, |
| | | sr.logistics_no, sr.create_at, uad.name as receiver_name, uad.phone as receiver_phone, |
| | | group_concat(og.goods_name) |
| | | as goodsName, ss.name as store_name ,ccep.address |
| | | as goodsName, ss.name as store_name ,ccep.address,ccep.`name` point_name |
| | | FROM com_shop_flower_order sr LEFT JOIN com_shop_flower_order_goods og ON sr.id = og.order_id |
| | | LEFT JOIN com_shop_flower_goods_attr ga ON og.goods_attr_id = ga.id |
| | | LEFT JOIN sys_user su ON sr.user_id = su.user_id |
| | | LEFT JOIN com_shop_flower_user_address uad ON sr.receiver_id = uad.id |
| | | LEFT JOIN com_convenient_merchants ss ON sr.store_id = ss.id |
| | | LEFT JOIN com_convenient_elevating_point ccep on ccep.id = sr.point_id |
| | | WHERE sr.delete_status = 1 |
| | | WHERE sr.delete_status = 1 and sr.`status` != 0 |
| | | <if test='pageComShopOrderSearchDTO.userId != null'> |
| | | AND sr.user_id = #{pageComShopOrderSearchDTO.userId} |
| | | </if> |
| | |
| | | a.city_name, |
| | | a.district_name, |
| | | a.detail_address, |
| | | o.point_id |
| | | o.point_id, |
| | | o.logistics_company, |
| | | o.logistics_no |
| | | FROM |
| | | com_shop_flower_order o |
| | | LEFT JOIN com_shop_flower_order_goods g ON o.id = g.order_id |
| | | LEFT JOIN com_shop_flower_user_address a ON a.id = o.receiver_id |
| | | WHERE 1=1 |
| | | WHERE 1=1 and o.`status` != 0 |
| | | <if test="comOrderListDTO.deliveryType != null"> |
| | | and o.delivery_type = #{comOrderListDTO.deliveryType} |
| | | </if> |
| | |
| | | <if test="comOrderListDTO.deliveryId != null"> |
| | | and o.delivery_id = #{comOrderListDTO.deliveryId} |
| | | </if> |
| | | <if test="comOrderListDTO.status != null"> |
| | | and o.status = #{comOrderListDTO.status} |
| | | </if> |
| | | order by o.create_at desc |
| | | |
| | | </select> |
| | | <select id="pageOrderByDeliveryNo" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerOrderStoreListVO"> |
| | |
| | | com_shop_flower_order o |
| | | LEFT JOIN com_shop_flower_order_goods g ON o.id = g.order_id |
| | | LEFT JOIN com_shop_flower_user_address a ON a.id = o.receiver_id |
| | | WHERE 1=1 and o.delivery_type = 1 |
| | | WHERE 1=1 and o.delivery_type = 1 and o.`status` != 0 |
| | | <if test="comOrderListDTO.storeId != null"> |
| | | and o.store_id = #{comOrderListDTO.storeId} |
| | | </if> |
| | | <if test="comOrderListDTO.deliveryId != null"> |
| | | and o.delivery_id = #{comOrderListDTO.deliveryId} |
| | | </if> |
| | | |
| | | order by o.create_at desc |
| | | </select> |
| | | <select id="selectCountByDeliveryType" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderCountVO"> |
| | | SELECT count(1) amount , `status` FROM com_shop_flower_order WHERE delivery_type = #{deliveryType} and store_id = #{storeId} GROUP BY `status` |
| | | SELECT count(1) amount , `status` FROM com_shop_flower_order WHERE delivery_type = #{deliveryType} and store_id = #{storeId} and `status` != 0 GROUP BY `status` |
| | | </select> |
| | | <select id="selectCountByStoreId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> |
| | | |
| | | SELECT count(1) as count_num,'dayCount' as count_name FROM com_shop_flower_order WHERE TO_DAYS(create_at)=TO_DAYS(NOW()) |
| | | SELECT count(1) as count_num,'dayCount' as count_name FROM com_shop_flower_order WHERE TO_DAYS(create_at)=TO_DAYS(NOW()) and `status` != 0 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | |
| | | and delivery_type = #{deliveryType} |
| | | </if> |
| | | union all |
| | | SELECT count(1) as count_num,'monthCount' as count_name FROM com_shop_flower_order WHERE DATE_FORMAT(create_at,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') |
| | | SELECT count(1) as count_num,'monthCount' as count_name FROM com_shop_flower_order WHERE DATE_FORMAT(create_at,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') and `status` != 0 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | |
| | | and delivery_type = #{deliveryType} |
| | | </if> |
| | | union all |
| | | SELECT count(1) as count_num,'yearCount' as count_name FROM com_shop_flower_order where YEAR(create_at) =YEAR(NOW()) |
| | | SELECT count(1) as count_num,'yearCount' as count_name FROM com_shop_flower_order where YEAR(create_at) =YEAR(NOW()) and `status` != 0 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | |
| | | and delivery_type = #{deliveryType} |
| | | </if> |
| | | union all |
| | | SELECT count(1) as count_num,'allCount' as count_name FROM com_shop_flower_order WHERE 1=1 |
| | | <if test="storeId != null"> |
| | | SELECT count(1) as count_num,'allCount' as count_name FROM com_shop_flower_order WHERE `status` != 0 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | <if test="deliveryType != null"> |
| | |
| | | </if> |
| | | </select> |
| | | <select id="selectSumAmountByStoreId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num,'dayAmount' as count_name FROM com_shop_flower_order WHERE TO_DAYS(create_at)=TO_DAYS(NOW()) and `status` not in (6,7) |
| | | <if test="storeId != null"> |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdNumVO"> |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num,'dayAmount' as count_name FROM com_shop_flower_order WHERE TO_DAYS(create_at)=TO_DAYS(NOW()) and `status` not in (6,7) and `status` != 0 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num,'monthAmount' as count_name FROM com_shop_flower_order WHERE DATE_FORMAT(create_at,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') and `status` not in (6,7) |
| | | <if test="storeId != null"> |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num,'monthAmount' as count_name FROM com_shop_flower_order WHERE DATE_FORMAT(create_at,'%Y%m')=DATE_FORMAT(CURDATE(),'%Y%m') and `status` not in (6,7) and `status` != 0 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num,'yearAmount' as count_name FROM com_shop_flower_order where YEAR(create_at) =YEAR(NOW()) and `status` not in (6,7) |
| | | <if test="storeId != null"> |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num,'yearAmount' as count_name FROM com_shop_flower_order where YEAR(create_at) =YEAR(NOW()) and `status` not in (6,7) and `status` != 0 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num,'allAmount' as count_name FROM com_shop_flower_order WHERE `status` not in (6,7) |
| | | <if test="storeId != null"> |
| | | SELECT IFNULL(sum(pay_amount),0) as count_num,'allAmount' as count_name FROM com_shop_flower_order WHERE `status` not in (6,7) and `status` != 0 |
| | | <if test="storeId != null"> |
| | | and store_id = #{storeId} |
| | | </if> |
| | | </select> |
| | |
| | | </select> |
| | | <select id="selectSumOrderAndAmountByStoreId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdNumVO"> |
| | | SELECT count(1) count_num ,'pddd' as count_name FROM `com_shop_flower_order` WHERE delivery_type =1 and delete_status = 1 and pay_status = 2 and store_id = #{storeId} |
| | | SELECT count(1) count_num ,'pddd' as count_name FROM `com_shop_flower_order` WHERE delivery_type =1 and delete_status = 1 and pay_status = 2 and store_id = #{storeId} and `status` != 0 |
| | | union all |
| | | SELECT count(1) count_num ,'kddd' as count_name FROM `com_shop_flower_order` WHERE delivery_type =2 and delete_status = 1 and pay_status = 2 and store_id = #{storeId} |
| | | SELECT count(1) count_num ,'kddd' as count_name FROM `com_shop_flower_order` WHERE delivery_type =2 and delete_status = 1 and pay_status = 2 and store_id = #{storeId} and `status` != 0 |
| | | union all |
| | | SELECT count(1) count_num ,'tkdd' as count_name FROM `com_shop_flower_order` WHERE delete_status = 1 and pay_status = 2 and `status` in (6,7) and store_id = #{storeId} |
| | | SELECT count(1) count_num ,'tkdd' as count_name FROM `com_shop_flower_order` WHERE delete_status = 1 and pay_status = 2 and `status` = 7 and store_id = #{storeId} and `status` != 0 |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) count_num ,'yysr' as count_name FROM `com_shop_flower_order` WHERE `status` not in (6,7) and store_id = #{storeId} |
| | | SELECT IFNULL(sum(pay_amount),0) count_num ,'yysr' as count_name FROM `com_shop_flower_order` WHERE `status` not in (6,7) and store_id = #{storeId} and `status` != 0 |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) count_num ,'tkje' as count_name FROM `com_shop_flower_order` WHERE `status` in (6,7) and store_id = #{storeId} |
| | | SELECT IFNULL(sum(pay_amount),0) count_num ,'tkje' as count_name FROM `com_shop_flower_order` WHERE `status` =7 and store_id = #{storeId} and `status` != 0 |
| | | union all |
| | | SELECT IFNULL(sum(pay_amount),0) count_num ,'ktxje' as count_name FROM `com_shop_flower_order` WHERE `status` in (4,5) and create_at <= date_sub(now(), INTERVAL 15 DAY) and store_id = #{storeId} |
| | | SELECT IFNULL(sum(pay_amount),0) count_num ,'ktxje' as count_name FROM `com_shop_flower_order` WHERE `status` in (4,5) and create_at <= date_sub(now(), INTERVAL 15 DAY) and store_id = #{storeId} and `status` != 0 |
| | | |
| | | |
| | | </select> |
| | |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> |
| | | SELECT count(1) count_num, date_format(create_at,'%Y-%m-%d') as count_name FROM com_shop_flower_order |
| | | WHERE date_format(create_at,'%Y-%m-%d') >= date_format(date_sub(now(), INTERVAL #{days} DAY),'%Y-%m-%d') |
| | | and store_id = #{storeId} |
| | | and store_id = #{storeId} and `status` != 0 |
| | | GROUP BY count_name |
| | | </select> |
| | | <select id="selectCountOrderMonthByStoreId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdCountVO"> |
| | | SELECT count(1) count_num, date_format(create_at,'%Y-%m') as count_name FROM com_shop_flower_order |
| | | WHERE date_format(create_at,'%Y-%m') >= date_format(now(),'%Y-01') and store_id = #{storeId} GROUP BY count_name |
| | | WHERE date_format(create_at,'%Y-%m') >= date_format(now(),'%Y-01') and store_id = #{storeId} and `status` != 0 GROUP BY count_name |
| | | </select> |
| | | <select id="selectOrderSumPayDayByStoreId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdNumVO"> |
| | | SELECT IFNULL(sum(pay_amount),0) count_num, date_format(create_at,'%Y-%m-%d') as count_name FROM com_shop_flower_order |
| | | WHERE date_format(create_at,'%Y-%m-%d') >= date_format(date_sub(now(), INTERVAL #{days} DAY),'%Y-%m-%d') |
| | | and store_id = #{storeId} and `status` not in (6,7) |
| | | and store_id = #{storeId} and `status` not in (6,7) and `status` != 0 |
| | | GROUP BY count_name |
| | | </select> |
| | | <select id="selectOrderSumMonthByStoreId" |
| | | resultType="com.panzhihua.common.model.vos.shop.ComShopOrderStoreIdNumVO"> |
| | | SELECT IFNULL(sum(pay_amount),0) count_num, date_format(create_at,'%Y-%m') as count_name FROM com_shop_flower_order |
| | | WHERE date_format(create_at,'%Y-%m') >= date_format(now(),'%Y-01') and store_id = #{storeId} and `status` not in (6,7) GROUP BY count_name |
| | | WHERE date_format(create_at,'%Y-%m') >= date_format(now(),'%Y-01') and store_id = #{storeId} and `status` not in (6,7) and `status` != 0 GROUP BY count_name |
| | | </select> |
| | | |
| | | |
| | |
| | | goods_name, create_at |
| | | </sql> |
| | | <select id="selectSumAmount" resultType="java.lang.Integer"> |
| | | SELECT sum(amount) FROM `com_shop_flower_order_goods` WHERE store_id = #{storeId} |
| | | SELECT sum(g.amount) FROM `com_shop_flower_order_goods` g LEFT JOIN com_shop_flower_order o ON o.id = g.order_id WHERE g.store_id = #{storeId} and o.`status` != 0 |
| | | </select> |
| | | </mapper> |
| | |
| | | refund_time, handle_result, remark,cancel_time |
| | | </sql> |
| | | <select id="pageRefundOrder" resultType="com.panzhihua.common.model.vos.shop.ComShopFlowerRefundOrderVO"> |
| | | select ro.* from com_shop_flower_refund_order ro left join com_convenient_merchants cm on ro.store_id = cm.id where 1=1 |
| | | select ro.*,cm.name as store_name from com_shop_flower_refund_order ro |
| | | left join com_convenient_merchants cm on ro.store_id = cm.id |
| | | left join com_shop_flower_order_goods g on g.order_id = ro.order_id |
| | | where 1=1 |
| | | <if test="pageComOrderRefundDTO.status != null"> |
| | | and ro.status = #{pageComOrderRefundDTO.status} |
| | | </if> |
| | |
| | | <if test="pageComOrderRefundDTO.backstageUserId != null"> |
| | | and cm.user_id = #{pageComOrderRefundDTO.backstageUserId} |
| | | </if> |
| | | <if test="pageComOrderRefundDTO.keyWord != null"> |
| | | and ( |
| | | cm.`name` like concat(#{pageComOrderRefundDTO.keyWord}, '%' ) or |
| | | ro.order_no like concat(#{pageComOrderRefundDTO.keyWord}, '%' ) or |
| | | g.goods_name like concat(#{pageComOrderRefundDTO.keyWord}, '%' ) |
| | | ) |
| | | </if> |
| | | order by ro.create_at desc |
| | | </select> |
| | | <select id="selectCountByStoreId" resultType="java.lang.Integer"> |
| | | select count(1) from com_shop_flower_refund_order where 1=1 |
| | |
| | | <update id="updateCancel"> |
| | | update com_shop_flower_refund_order set `status` = #{status},cancel_time = NOW() where id = #{id} |
| | | </update> |
| | | <select id="selectCountRefundNowByOrderId" resultType="int"> |
| | | SELECT count(1) FROM com_shop_flower_refund_order WHERE order_id = #{orderId} and `status` in (9,10,13) and delete_status = 1 |
| | | </select> |
| | | </mapper> |
| | |
| | | <select id="selectServiceScopeByMerchantId" resultType="java.lang.String"> |
| | | SELECT GROUP_CONCAT(`service_name`) serviceScope FROM com_convenient_service_scope WHERE merchant_id = #{merchantId} |
| | | </select> |
| | | <select id="selectServiceIdsForMerchant" resultType="java.lang.Long"> |
| | | <select id="selectServiceIdsForMerchant" resultType="java.lang.String"> |
| | | SELECT service_category_id FROM com_convenient_service_scope WHERE merchant_id = #{merchantId} |
| | | </select> |
| | | <select id="checkCategoryIsUsing" resultType="java.lang.Integer"> |
| | |
| | | |
| | | List<StreetVOS> selectStreetByAreaCode(Integer code); |
| | | |
| | | List<StreetVOStr> selectStreetByAreaCodeStr(Integer code); |
| | | |
| | | List<StreetVO> selectStreetsByAreaCode(Integer code); |
| | | |
| | | ComActAcidCheckRecordVO selectComActAcidCheckRecordById(Long id); |
| | |
| | | int checkPoint(String phone); |
| | | |
| | | ComShopUserAddressVO selectDefaultAddressVO(@Param("userId") String userId); |
| | | |
| | | Long selectStoreIdIdByUserId(@Param("userId") Long userId); |
| | | } |
| | |
| | | if (nonNull(sysUser)){ |
| | | loginUserInfoVO.setBackstageUserId(sysUser.getUserId()); |
| | | loginUserInfoVO.setBackstageType(5); |
| | | Long storeId = userDao.selectStoreIdIdByUserId(sysUser.getUserId()); |
| | | loginUserInfoVO.setStoreIdId(storeId); |
| | | |
| | | } |
| | | //是否为物业公司账号 |
| | | if (nonNull(sysUserDO.getPhone())){ |
| | |
| | | if (sysUserDO.getBindingCheckUnitId() != null) { |
| | | loginUserInfoVO.setBackstageType(4); |
| | | } |
| | | //判断是否是商家账号 |
| | | Long storeId = userDao.selectStoreIdIdByUserId(sysUserDO.getUserId()); |
| | | if (null != storeId){ |
| | | loginUserInfoVO.setBackstageUserId(sysUserDO.getUserId()); |
| | | loginUserInfoVO.setBackstageType(5); |
| | | loginUserInfoVO.setStoreIdId(storeId); |
| | | } |
| | | |
| | | return R.ok(loginUserInfoVO); |
| | | } |
| | | |
| | |
| | | @Override |
| | | public R getAllCommunityList() { |
| | | List<Integer> areaList = areaCodeList(); |
| | | List<AreaVOS> areaVOList = new ArrayList<>(); |
| | | List<AreaVOStr> areaVOList = new ArrayList<>(); |
| | | for (Integer code : areaList) { |
| | | AreaVOS areaVO = new AreaVOS(); |
| | | areaVO.setId(code); |
| | | AreaVOStr areaVO = new AreaVOStr(); |
| | | areaVO.setId(code+""); |
| | | areaVO.setName(areaCodeToName(code.longValue())); |
| | | List<StreetVOS> streetVOS = userDao.selectStreetByAreaCode(code); |
| | | Iterator<StreetVOS> iterator = streetVOS.listIterator(); |
| | | List<StreetVOStr> streetVOS = userDao.selectStreetByAreaCodeStr(code); |
| | | Iterator<StreetVOStr> iterator = streetVOS.listIterator(); |
| | | while (iterator.hasNext()) { |
| | | StreetVOS vo = iterator.next(); |
| | | List<CommunityVO> communityVOS = userDao.selectCommunityByStreetId(vo.getId(), 3); |
| | | StreetVOStr vo = iterator.next(); |
| | | List<CommunityVO> communityVOS = userDao.selectCommunityByStreetId(Long.parseLong(vo.getId()), 3); |
| | | vo.setChildList(communityVOS); |
| | | |
| | | } |
| | |
| | | <select id="selectDefaultAddressVO" resultType="com.panzhihua.common.model.vos.shop.ComShopUserAddressVO"> |
| | | select * from com_shop_flower_user_address where user_id = #{userId} and is_default = 1 and delete_status = 2 |
| | | </select> |
| | | <select id="selectStoreIdIdByUserId" resultType="java.lang.Long"> |
| | | select id from com_convenient_merchants where user_id = #{userId} and is_del = 0 |
| | | </select> |
| | | <select id="selectStreetByAreaCodeStr" resultType="com.panzhihua.common.model.vos.user.StreetVOStr"> |
| | | select street_id as id,name as name from com_street where area_code=#{code} and app_id ='wx118de8a734d269f0' |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | boolean tfLogin = requestURI.contains("tfLogin"); |
| | | boolean noToken = requestURI.contains("noToken"); |
| | | boolean listadvertisement = requestURI.contains("listadvertisement"); |
| | | boolean basicScreen = requestURI.contains("basicScreen"); |
| | | // boolean bigscreen = requestURI.contains("/bigscreen/party"); |
| | | // boolean pageworkguide = !requestURI.contains("workguide/pageworkguide"); |
| | | // boolean detailworkguide = !requestURI.contains("workguide/detailworkguide"); |
| | |
| | | safeboxRequestWrapper.addHeader("appid",request.getHeader("appid")); |
| | | if (login || doc || css || js || ui || swagger || ico || docs || error || refreshToken || useragreement || wxPay |
| | | // ||wxCgi||isShop||listadvertisement||noToken||bigscreen) { |
| | | || wxCgi || isShop || listadvertisement || noToken||uuRepay||kaphtcha||uuPush||tfLogin||batteryActivityPayNotify||batteryPayNotify|| wsPush) { |
| | | || wxCgi || isShop || listadvertisement || noToken||uuRepay||kaphtcha||uuPush||tfLogin||batteryActivityPayNotify||batteryPayNotify|| wsPush || basicScreen) { |
| | | // 什么也不做 |
| | | } else { |
| | | // 获取请求头中JWT的Token |