Merge branch 'developer' into hive2.0
77 files deleted
391 files modified
344 files added
| | |
| | | .project |
| | | .classpath |
| | | .settings |
| | | .metadata |
| | | .metadata |
| | | .gitignore |
| | |
| | | <env>prd</env> |
| | | </properties> |
| | | </profile> |
| | | <profile> |
| | | <id>xcx</id> |
| | | <properties> |
| | | <env>xcx</env> |
| | | </properties> |
| | | </profile> |
| | | <profile> |
| | | <id>lhx</id> |
| | | <properties> |
| | | <env>lhx</env> |
| | | </properties> |
| | | </profile> |
| | | </profiles> |
| | | <dependencies> |
| | | |
| | |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-websocket</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.sun.mail</groupId> |
| | | <artifactId>javax.mail</artifactId> |
| | | <version>1.6.2</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | |
| | | <artifactId>mapstruct</artifactId> |
| | | <version>1.3.0.Final</version> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.baomidou</groupId> |
| | | <artifactId>mybatis-plus-boot-starter</artifactId> |
| | | <version>3.2.0</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>cn.hutool</groupId> |
| | | <artifactId>hutool-all</artifactId> |
| | | <version>5.3.1</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.google.guava</groupId> |
| | | <artifactId>guava</artifactId> |
| | | <version>26.0-jre</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-configuration-processor</artifactId> |
| | | <optional>true</optional> |
| | | </dependency> |
| | | </dependencies> |
| | | <build> |
| | |
| | | <directory>src/main/resources</directory> |
| | | <filtering>true</filtering> |
| | | <excludes> |
| | | |
| | | <exclude>config/dev/*</exclude> |
| | | <exclude>config/prd/*</exclude> |
| | | <exclude>config/test/*</exclude> |
| | | <exclude>config/xcx/*</exclude> |
| | | |
| | | <!-- --> |
| | | <exclude>config/config.json</exclude> |
| | | <exclude>config/application.properties</exclude> |
| | | <exclude>config/system.properties</exclude> |
| | | |
| | | |
| | | |
| | | |
| | | <exclude>**/*.woff</exclude> |
| | | <exclude>**/*.woff2</exclude> |
| | | <exclude>**/*.ttf</exclude> |
| | |
| | | <include>**/*.xls</include> |
| | | </includes> |
| | | </resource> |
| | | <resource> |
| | | <directory>src/main/resources/config/${env}</directory> |
| | | <targetPath>BOOT-INF/classes/config</targetPath> |
| | | </resource> |
| | | |
| | | </resources> |
| | | <plugins> |
| | | <plugin> |
| | |
| | | <artifactId>mapstruct-processor</artifactId> |
| | | <version>1.3.0.Final</version> |
| | | </path> |
| | | <path> |
| | | <groupId>org.projectlombok</groupId> |
| | | <artifactId>lombok</artifactId> |
| | | <version>1.18.12</version> |
| | | </path> |
| | | </annotationProcessorPaths> |
| | | </configuration> |
| | | </plugin> |
| | |
| | | package com.matrix; |
| | | |
| | | |
| | | import java.io.FileWriter; |
| | | import java.io.IOException; |
| | | import java.math.BigDecimal; |
| | | |
| | | public class TestClass { |
| | | public static void main(String[] args) throws IOException { |
| | |
| | | // printer.printRecord(cells); |
| | | // } |
| | | // printer.flush(); |
| | | // printer.close(); |
| | | // printer.close(); |
| | | long t2 = System.currentTimeMillis(); |
| | | System.out.println("CSV: " + (t2 - t1)); |
| | | } |
| | |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.context.annotation.ComponentScan; |
| | | import org.springframework.scheduling.annotation.EnableAsync; |
| | | |
| | | /** |
| | | * spring boot入口 |
| | |
| | | * @author jiangyouyao |
| | | */ |
| | | @SpringBootApplication |
| | | |
| | | @ComponentScan(basePackages = {"com.matrix.**"}) |
| | | |
| | | @EnableAsync |
| | | public class ZqErpApplication { |
| | | |
| | | public static void main(String[] args) { |
| New file |
| | |
| | | package com.matrix.beauty.followup.dao; |
| | | |
| | | import com.matrix.beauty.followup.entry.SysFollowup; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.dto.FollowupListDto; |
| | | import com.matrix.system.hive.dto.FollowuListDto; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @description 跟进 |
| | | * @author |
| | | * @date 2021-01-10 15:15 |
| | | */ |
| | | public interface SysFollowupDao{ |
| | | |
| | | public int insert(@Param("item") SysFollowup sysFollowup); |
| | | |
| | | public int batchInsert(@Param("list") List<SysFollowup> sysFollowupList); |
| | | |
| | | public int updateByMap(Map<String, Object> modifyMap); |
| | | |
| | | public int updateByModel(@Param("record")SysFollowup sysFollowup); |
| | | |
| | | public int deleteByIds(@Param("list") List<String> list); |
| | | |
| | | public int deleteById(Long id); |
| | | |
| | | public int deleteByModel(@Param("record") SysFollowup sysFollowup); |
| | | |
| | | public List<SysFollowup> selectInPage(@Param("record") SysFollowup sysFollowup, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | public List<SysFollowup> selectByModel(@Param("record") SysFollowup sysFollowup); |
| | | |
| | | public int selectTotalRecord(@Param("record") SysFollowup sysFollowup); |
| | | |
| | | public SysFollowup selectById(Long id); |
| | | |
| | | public SysFollowup selectForUpdate(Long id); |
| | | |
| | | void updateZan(@Param("id")Long id, @Param("zans")String zans); |
| | | |
| | | List<SysFollowup> selectByAppDto(FollowupListDto followupListDto); |
| | | |
| | | List<SysFollowup> findVipFollowuByPage(FollowuListDto followuListDto); |
| | | } |
| New file |
| | |
| | | package com.matrix.beauty.followup.entry; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.common.bean.EntityDTOExt; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.hive.bean.SysFollowupComment; |
| | | import com.matrix.system.hive.bean.SysVipAlbum; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 跟进 |
| | | * @author |
| | | * @date 2021-01-10 15:15 |
| | | */ |
| | | public class SysFollowup extends EntityDTOExt{ |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | |
| | | /** |
| | | * 员工ID |
| | | */ |
| | | private Long staffId; |
| | | |
| | | |
| | | /** |
| | | * 客户ID |
| | | */ |
| | | @NotNull(message = "客户ID不能为空") |
| | | @ApiModelProperty(value = "客户ID", example = "10") |
| | | private Long vipId; |
| | | |
| | | |
| | | /** |
| | | * 订单id |
| | | */ |
| | | @ApiModelProperty(value = "订单id", example = "10") |
| | | private Long orderId; |
| | | |
| | | |
| | | /** |
| | | * 服务单id |
| | | */ |
| | | @ApiModelProperty(value = "服务单id", example = "10") |
| | | private Long serviceId; |
| | | |
| | | |
| | | /** |
| | | * 门店id |
| | | */ |
| | | private Long shopId; |
| | | |
| | | |
| | | /** |
| | | * 公司id |
| | | */ |
| | | private Long companyId; |
| | | |
| | | |
| | | /** |
| | | * 下次跟进时间 |
| | | */ |
| | | @ApiModelProperty(value = "下次跟进时间", example = "2021-01-02 12:22") |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | private Date nextNotifyTime; |
| | | |
| | | |
| | | /** |
| | | * 跟进内容 |
| | | */ |
| | | @NotNull(message = "跟进内容不能为空") |
| | | @ApiModelProperty(value = "跟进内容", example = "") |
| | | private String content; |
| | | |
| | | |
| | | /** |
| | | * 可见范围1公开,2仅自己可见 |
| | | */ |
| | | @NotNull(message = "可见范围不能为空") |
| | | @ApiModelProperty(value = "可见范围1公开,2仅自己可见", example = "") |
| | | private Integer visible; |
| | | |
| | | |
| | | /** |
| | | * 订单摘要信息 |
| | | */ |
| | | @ApiModelProperty(value = "订单摘要信息", example = "") |
| | | private String orderAbstract; |
| | | |
| | | /** |
| | | * 点赞人ids |
| | | */ |
| | | @ApiModelProperty(value = "点赞人ids", example = "1,2") |
| | | private String zans; |
| | | |
| | | @Extend |
| | | @ApiModelProperty(value = "点赞人列表",example ="") |
| | | private List<SysUsers> zanUsers; |
| | | |
| | | @Extend |
| | | @ApiModelProperty(value = "图片集合", example = "") |
| | | private List<SysVipAlbum> albums; |
| | | |
| | | @Extend |
| | | @ApiModelProperty(value = "评论集合",example ="") |
| | | private List<SysFollowupComment> followupComments; |
| | | |
| | | @Extend |
| | | @ApiModelProperty(value = "员工名称",example ="") |
| | | private String staffName; |
| | | |
| | | @Extend |
| | | @ApiModelProperty(value = "员工头像",example ="") |
| | | private String staffPhoto; |
| | | |
| | | @Extend |
| | | @ApiModelProperty(value = "客户名称",example ="") |
| | | private String vipName; |
| | | |
| | | public String getStaffName() { |
| | | return staffName; |
| | | } |
| | | |
| | | public void setStaffName(String staffName) { |
| | | this.staffName = staffName; |
| | | } |
| | | |
| | | public String getStaffPhoto() { |
| | | return staffPhoto; |
| | | } |
| | | |
| | | public void setStaffPhoto(String staffPhoto) { |
| | | this.staffPhoto = staffPhoto; |
| | | } |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | public List<SysFollowupComment> getFollowupComments() { |
| | | return followupComments; |
| | | } |
| | | |
| | | public void setFollowupComments(List<SysFollowupComment> followupComments) { |
| | | this.followupComments = followupComments; |
| | | } |
| | | |
| | | public Integer getVisible() { |
| | | return visible; |
| | | } |
| | | |
| | | public void setVisible(Integer visible) { |
| | | this.visible = visible; |
| | | } |
| | | |
| | | public List<SysUsers> getZanUsers() { |
| | | return zanUsers; |
| | | } |
| | | |
| | | public void setZanUsers(List<SysUsers> zanUsers) { |
| | | this.zanUsers = zanUsers; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getStaffId() { |
| | | return staffId; |
| | | } |
| | | |
| | | public void setStaffId(Long staffId) { |
| | | this.staffId = staffId; |
| | | } |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public Long getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(Long orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public Long getServiceId() { |
| | | return serviceId; |
| | | } |
| | | |
| | | public void setServiceId(Long serviceId) { |
| | | this.serviceId = serviceId; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public List<SysVipAlbum> getAlbums() { |
| | | return albums; |
| | | } |
| | | |
| | | public void setAlbums(List<SysVipAlbum> albums) { |
| | | this.albums = albums; |
| | | } |
| | | |
| | | public Date getNextNotifyTime() { |
| | | return nextNotifyTime; |
| | | } |
| | | |
| | | public SysFollowup setNextNotifyTime(Date nextNotifyTime) { |
| | | this.nextNotifyTime=nextNotifyTime; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | public String getContent() { |
| | | return content; |
| | | } |
| | | |
| | | public SysFollowup setContent(String content) { |
| | | this.content=content; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | public String getOrderAbstract() { |
| | | return orderAbstract; |
| | | } |
| | | |
| | | public SysFollowup setOrderAbstract(String orderAbstract) { |
| | | this.orderAbstract=orderAbstract; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | public String getZans() { |
| | | return zans; |
| | | } |
| | | |
| | | public SysFollowup setZans(String zans) { |
| | | this.zans=zans; |
| | | return this; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.beauty.followup.service; |
| | | |
| | | import com.matrix.beauty.followup.dao.SysFollowupDao; |
| | | import com.matrix.beauty.followup.entry.SysFollowup; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysOrderItem; |
| | | import com.matrix.system.hive.bean.SysVipAlbum; |
| | | import com.matrix.system.hive.dao.SysBeauticianStateDao; |
| | | import com.matrix.system.hive.dao.SysOrderItemDao; |
| | | import com.matrix.system.hive.dao.SysVipAlbumDao; |
| | | import com.matrix.system.hive.dto.FollowuListDto; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | |
| | | @Service |
| | | public class SysFollowupService { |
| | | @Autowired |
| | | SysFollowupDao followupDao; |
| | | |
| | | @Autowired |
| | | SysOrderItemDao orderItemDao; |
| | | |
| | | @Autowired |
| | | private SysVipAlbumDao vipAlbumDao; |
| | | |
| | | @Autowired |
| | | private SysBeauticianStateDao beauticianStateDao; |
| | | |
| | | public void save(SysFollowup followup){ |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | followup.setCreateBy(user.getSuName()); |
| | | followup.setUpdateBy(user.getSuName()); |
| | | followup.setStaffId(user.getSuId()); |
| | | followup.setCompanyId(user.getCompanyId()); |
| | | followup.setShopId(user.getShopId()); |
| | | //处理订单摘要 |
| | | if(followup.getOrderId()!=null){ |
| | | List<SysOrderItem> sysOrderItems = orderItemDao.selectByOrderId(followup.getOrderId()); |
| | | String abs=""; |
| | | if(sysOrderItems.size()>1){ |
| | | abs= sysOrderItems.get(0).getShoppingGoods().getName()+"等"+sysOrderItems.size()+"件商品"; |
| | | }else{ |
| | | abs= sysOrderItems.get(0).getShoppingGoods().getName(); |
| | | } |
| | | followup.setOrderAbstract(abs); |
| | | } |
| | | //服务单摘要 |
| | | if(followup.getServiceId()!=null){ |
| | | List<SysBeauticianState> sysBeauticianStates = beauticianStateDao.selectBySerIds(followup.getServiceId()); |
| | | String abs=""; |
| | | if(sysBeauticianStates.size()>1){ |
| | | abs= sysBeauticianStates.get(0).getProjInfo().getName()+"等"+sysBeauticianStates.size()+"项服务"; |
| | | }else{ |
| | | abs= sysBeauticianStates.get(0).getProjInfo().getName(); |
| | | } |
| | | followup.setOrderAbstract(abs); |
| | | } |
| | | |
| | | followupDao.insert(followup); |
| | | //插入图片 |
| | | List<SysVipAlbum> albums=followup.getAlbums(); |
| | | if(CollectionUtils.isNotEmpty(albums)){ |
| | | for (SysVipAlbum vipAlbum:albums){ |
| | | if(StringUtils.isNotBlank(vipAlbum.getImg())){ |
| | | vipAlbum.setCreateBy(user.getSuName()); |
| | | vipAlbum.setUpdateBy(user.getSuName()); |
| | | vipAlbum.setSource(SysVipAlbum.SOURCE_FOLLOW); |
| | | vipAlbum.setVipId(followup.getVipId()); |
| | | vipAlbum.setSourceId(followup.getId()); |
| | | vipAlbumDao.insert(vipAlbum); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | public List<SysFollowup> findVipFollowuByPage(FollowuListDto followuListDto) { |
| | | //todo 等订单改造版本合并后用验证工具加参数校验 |
| | | |
| | | return followupDao.findVipFollowuByPage(followuListDto); |
| | | } |
| | | } |
| New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: MessageManager.java |
| | | * packageName: com.matrix.component.asyncmessage |
| | | * date: 2021-10-18 14:01 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix.component.asyncmessage; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.core.Ordered; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.*; |
| | | import java.util.concurrent.ConcurrentLinkedQueue; |
| | | import java.util.concurrent.locks.ReentrantLock; |
| | | import java.util.regex.Pattern; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: AsyncMessageManager |
| | | * @packageName: com.matrix.component.asyncmessage |
| | | * @description: 异步消息管理者 |
| | | * @data: 2021-10-18 14:01 |
| | | **/ |
| | | @Component |
| | | @Order(Ordered.HIGHEST_PRECEDENCE) |
| | | public class AsyncMessageManager implements ApplicationRunner { |
| | | |
| | | @Autowired |
| | | private List<MessageHandler> obs; |
| | | |
| | | private Map<String, List<MessageHandler>> routes; |
| | | |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | if (CollectionUtil.isNotEmpty(obs)) { |
| | | routes = obs.stream().collect(Collectors.groupingBy(MessageHandler::getRouteKey)); |
| | | LogUtil.info("异步消息绑定成功,检测到{} 个消费者,共计{}组", obs.size(), routes.size()); |
| | | } else { |
| | | LogUtil.info("未检测到异步消息处理类"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * map 参数的字符串表示,方便快速拼装消息参数 |
| | | * @param routeKey |
| | | * @param mapStr |
| | | */ |
| | | public void sendMsg(String routeKey, String mapStr,Object... args){ |
| | | |
| | | if(StringUtils.isBlank(mapStr)){ |
| | | throw new IllegalArgumentException("mapStr格式错误:例如:\\\"orderId=123,price=88\\\",mapStr="+mapStr); |
| | | } |
| | | mapStr=String.format(mapStr,args); |
| | | |
| | | Map<String, Object> param =new HashMap<>(); |
| | | String[] paramStr = mapStr.split(","); |
| | | Arrays.asList(paramStr).forEach(item->{ |
| | | String[] keyValueArr = item.split("="); |
| | | param.put(keyValueArr[0],keyValueArr[1]); |
| | | }); |
| | | sendMsg(routeKey,param); |
| | | } |
| | | |
| | | /** |
| | | * 根据route 发送消息到对应的消费者 |
| | | * 这个方法本质上还是同步执行,没有完成效率上的异步解耦,这里做观察者模式主要是为了扩展业务,减少对第三方消息组件的依赖 |
| | | * 而不是解决性能问题,如果后续需要解决性能问题,在加一个消息队列,然后启动线程从队列中进行消息的消费。 |
| | | * @param routeKey |
| | | * @param param |
| | | */ |
| | | public void sendMsg(String routeKey, Map<String, Object> param) { |
| | | |
| | | if(StringUtils.isBlank(routeKey)){ |
| | | LogUtil.warn("发送异步消息失败:routeKey为空"); |
| | | return; |
| | | } |
| | | |
| | | //匹配观察者 |
| | | List<MessageHandler> lisener = new ArrayList<>(); |
| | | for (Map.Entry<String, List<MessageHandler>> routesEntry : routes.entrySet()) { |
| | | if (Pattern.matches(routesEntry.getKey(), routeKey)) { |
| | | lisener.addAll(routesEntry.getValue()); |
| | | } |
| | | } |
| | | |
| | | //通知观察者 |
| | | if (CollectionUtil.isNotEmpty(lisener)) { |
| | | LogUtil.info("发送异步消息,routeKey={},匹配观察者{}个",routeKey,lisener.size()); |
| | | for (MessageHandler messageHandler : lisener) { |
| | | try{ |
| | | messageHandler.handle(param); |
| | | }catch (Throwable t){ |
| | | LogUtil.error("{},处理类执行异常:routeKey={},message={}", messageHandler.getName(),routeKey,t.getMessage()); |
| | | } |
| | | } |
| | | }else{ |
| | | LogUtil.warn("未匹配到routeKey={},的消费者",routeKey); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: MessageHandler.java |
| | | * packageName: com.matrix.component.asyncmessage |
| | | * date: 2021-10-18 13:59 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix.component.asyncmessage; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: MessageHandler |
| | | * @packageName: com.matrix.component.asyncmessage |
| | | * @description: 异步消息处理接口 |
| | | * @data: 2021-10-18 13:59 |
| | | **/ |
| | | public interface MessageHandler { |
| | | |
| | | /** |
| | | * 处理类的名字 |
| | | * @return |
| | | */ |
| | | String getName(); |
| | | |
| | | /** |
| | | * 返回任务的路由key,当有对应key的事件发生时,消息管理器会触发handle方法。 |
| | | * key 支持正则表达式 |
| | | * @return |
| | | */ |
| | | String getRouteKey(); |
| | | |
| | | /** |
| | | * 实际任务处理方法 |
| | | * @param param |
| | | */ |
| | | void handle(Map<String,Object> param); |
| | | |
| | | } |
| New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: TestMessageHander.java |
| | | * packageName: com.matrix.component.asyncmessage |
| | | * date: 2021-10-18 16:05 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix.component.asyncmessage; |
| | | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: TestMessageHander |
| | | * @packageName: com.matrix.component.asyncmessage |
| | | * @description: 测试观察者 |
| | | * @data: 2021-10-18 16:05 |
| | | **/ |
| | | @Component |
| | | public class TestMessageHander implements MessageHandler{ |
| | | |
| | | @Override |
| | | public String getName() { |
| | | return "测试观察者"; |
| | | } |
| | | |
| | | @Override |
| | | public String getRouteKey() { |
| | | return "testkey"; |
| | | } |
| | | |
| | | @Override |
| | | public void handle(Map<String, Object> param) { |
| | | try { |
| | | Thread.sleep(1000*5); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | LogUtil.debug(param.toString()); |
| | | } |
| | | } |
| New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: TestMessageHander.java |
| | | * packageName: com.matrix.component.asyncmessage |
| | | * date: 2021-10-18 16:05 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix.component.asyncmessage; |
| | | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: TestMessageHander |
| | | * @packageName: com.matrix.component.asyncmessage |
| | | * @description: 测试观察者 |
| | | * @data: 2021-10-18 16:05 |
| | | **/ |
| | | @Component |
| | | public class TestMessageHander2 implements MessageHandler{ |
| | | |
| | | @Override |
| | | public String getName() { |
| | | return "测试观察者"; |
| | | } |
| | | |
| | | @Override |
| | | public String getRouteKey() { |
| | | return "55y"; |
| | | } |
| | | |
| | | @Override |
| | | public void handle(Map<String, Object> param) { |
| | | try { |
| | | Thread.sleep(1000*5); |
| | | } catch (InterruptedException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | LogUtil.debug(param.toString()); |
| | | } |
| | | } |
| | |
| | | package com.matrix.core.rabbitmq; |
| | | package com.matrix.component.rabbitmq; |
| | | |
| | | import com.matrix.core.exception.GlobleExceptionResolver; |
| | | import com.matrix.core.tools.LogUtil; |
| | |
| | | |
| | | } catch (Exception e) { |
| | | LogUtil.error("消费者执行抛出异常", e); |
| | | String messageBody = message == null ? "" : new String(message.getBody()); |
| | | GlobleExceptionResolver.sendNoticeToAdmin(e, "routingKey=" + routingKey+",messageBody=" + messageBody,null ); |
| | | } |
| | | } |
| | | |
| | |
| | | /** |
| | | * 处理类在spring中的bean名称 |
| | | */ |
| | | private com.matrix.core.rabbitmq.DeliverCallbackAdapter handerAdapter; |
| | | private DeliverCallbackAdapter handerAdapter; |
| | | |
| | | /** |
| | | * 自动确认 默认为true |
| | |
| | | this.queue = queue; |
| | | this.routingKey = routingKey; |
| | | if(hander!=null){ |
| | | this.handerAdapter = new com.matrix.core.rabbitmq.DeliverCallbackAdapter(hander,routingKey); |
| | | this.handerAdapter = new DeliverCallbackAdapter(hander,routingKey); |
| | | } |
| | | |
| | | } |
| | |
| | | this.queue = queue; |
| | | this.routingKey = routingKey; |
| | | if(hander!=null){ |
| | | this.handerAdapter = new com.matrix.core.rabbitmq.DeliverCallbackAdapter(hander,routingKey); |
| | | this.handerAdapter = new DeliverCallbackAdapter(hander,routingKey); |
| | | } |
| | | this.autoAck=autoAck; |
| | | |
| | |
| | | return handerAdapter; |
| | | } |
| | | |
| | | public void setHander(com.matrix.core.rabbitmq.DeliverCallbackAdapter hander) { |
| | | public void setHander(DeliverCallbackAdapter hander) { |
| | | this.handerAdapter = hander; |
| | | } |
| | | } |
| | |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.CommandLineRunner; |
| | | import org.springframework.stereotype.Component; |
| | | import redis.clients.jedis.Jedis; |
| | | import redis.clients.jedis.JedisPool; |
| | | import redis.clients.jedis.JedisPoolConfig; |
| | |
| | | * @date 2019年2月25日 |
| | | */ |
| | | |
| | | @Component |
| | | public class RedisClient implements CommandLineRunner { |
| | | |
| | | /** |
| | |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.hive.plugin.message.StringUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | |
| | | /** |
| | |
| | | * @email 935090232@qq.com |
| | | * @date 2018年1月19日 |
| | | */ |
| | | @Component |
| | | public class RedisUserLoginUtils { |
| | | |
| | | @Autowired |
| | |
| | | * @date:2018年1月19日下午3:17:14 |
| | | */ |
| | | public void loginOut() { |
| | | String toke = getUserToken(); |
| | | redisClient.removeObject(toke); |
| | | String token = getUserToken(); |
| | | redisClient.removeObject(token); |
| | | } |
| | | |
| | | |
| | | |
| | | public void updateUserInfo(Object obj) { |
| | | String token = getUserToken(); |
| | | redisClient.saveValue(token, obj); |
| | | LogUtil.debug("更新redis用户"); |
| | | } |
| | | } |
| | |
| | | import com.google.zxing.MultiFormatWriter; |
| | | import com.google.zxing.common.BitMatrix; |
| | | import com.google.zxing.qrcode.decoder.ErrorCorrectionLevel; |
| | | import com.matrix.core.tools.PropertiesUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.imageio.ImageIO; |
| | | import java.awt.*; |
| | |
| | | import java.util.Date; |
| | | import java.util.Hashtable; |
| | | |
| | | |
| | | @Component |
| | | public class CodeUtil { |
| | | |
| | | |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | | |
| | | @Value("${static_resource_url}") |
| | | private String staticResourceUrl; |
| | | |
| | | |
| | | private static final String CHARSET = "utf-8"; |
| | | private static final String FORMAT_NAME = "JPG"; |
| | | // 二维码尺寸 |
| | |
| | | * 是否压缩LOGO |
| | | * @throws Exception |
| | | */ |
| | | public static void encode(String content, String imgPath, String destPath, |
| | | public static void encode(String content, String imgPath, String destPath, |
| | | boolean needCompress) throws Exception { |
| | | BufferedImage image = CodeUtil.createImage(content, imgPath, |
| | | needCompress,null); |
| | |
| | | ImageIO.write(image, FORMAT_NAME, new File(destPath+"/"+file)); |
| | | } |
| | | |
| | | public static String encode(String content, String imgPath, boolean needCompress, |
| | | public String encode(String content, String imgPath, boolean needCompress, |
| | | String title) throws Exception { |
| | | BufferedImage image = CodeUtil.createImage(content, imgPath, |
| | | needCompress,title); |
| | | // 图片保存目录路径 |
| | | String savePath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH); |
| | | String savePath = fileStoragePath; |
| | | // 图片保存目录URL |
| | | String saveUrl = PropertiesUtil.getString(AppConstance.NGINX_URL); |
| | | String saveUrl = staticResourceUrl; |
| | | // 以账号ID命名创建文件夹 |
| | | savePath+="qrCode" + File.separatorChar; |
| | | saveUrl+="qrCode" + File.separatorChar; |
| | |
| | | |
| | | import java.awt.*; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.FileNotFoundException; |
| | | import java.io.IOException; |
| | | import java.io.*; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.MalformedURLException; |
| | | import java.net.URL; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.regex.Matcher; |
| | |
| | | System.out.println("系统字体数:" + fontCount); |
| | | } |
| | | |
| | | |
| | | public static void downloadPicture(String imgUrl,String savePath) { |
| | | URL url = null; |
| | | int imageNumber = 0; |
| | | try { |
| | | |
| | | InputStream inputStream = null; |
| | | HttpURLConnection httpURLConnection = (HttpURLConnection) new URL(imgUrl).openConnection(); |
| | | httpURLConnection.setRequestMethod("GET"); |
| | | httpURLConnection.setRequestProperty("User-Agent", "Mozilla/5.0 (Windows NT 6.1; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/77.0.3865.90 Safari/537.36"); |
| | | httpURLConnection.setRequestProperty("Accept-Encoding", "gzip"); |
| | | httpURLConnection.setRequestProperty("Referer","no-referrer"); |
| | | httpURLConnection.setRequestProperty("Content-Type","application/x-www-form-urlencoded"); |
| | | httpURLConnection.setConnectTimeout(15000); |
| | | httpURLConnection.setReadTimeout(20000); |
| | | inputStream = httpURLConnection.getInputStream(); |
| | | |
| | | |
| | | |
| | | FileOutputStream fileOutputStream = new FileOutputStream(new File(savePath)); |
| | | ByteArrayOutputStream output = new ByteArrayOutputStream(); |
| | | byte[] buffer = new byte[1024]; |
| | | int length; |
| | | while ((length = inputStream.read(buffer)) > 0) { |
| | | output.write(buffer, 0, length); |
| | | } |
| | | byte[] context=output.toByteArray(); |
| | | fileOutputStream.write(output.toByteArray()); |
| | | inputStream.close(); |
| | | fileOutputStream.close(); |
| | | } catch (MalformedURLException e) { |
| | | e.printStackTrace(); |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.component.tools; |
| | | |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | |
| | | import java.util.Objects; |
| | | import java.util.Set; |
| | | |
| | | public class JSONUtil { |
| | | |
| | | /** |
| | | * 用第二个json对象覆盖第一个json对象的值,并返回一个新的json对象 |
| | | * |
| | | * @param source |
| | | * @param target |
| | | * @return |
| | | */ |
| | | public static JSONObject extend(JSONObject source, JSONObject target) { |
| | | |
| | | Objects.requireNonNull(source); |
| | | Objects.requireNonNull(target); |
| | | JSONObject jsonObject = JSON.parseObject(source.toJSONString()); |
| | | |
| | | Set<String> set = target.keySet(); |
| | | |
| | | set.stream().forEach(key -> { |
| | | jsonObject.put(key, target.get(key)); |
| | | |
| | | }); |
| | | |
| | | return jsonObject; |
| | | |
| | | } |
| | | } |
| | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.PropertiesUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import org.apache.http.HttpResponse; |
| | |
| | | import org.apache.http.entity.StringEntity; |
| | | import org.apache.http.impl.client.CloseableHttpClient; |
| | | import org.apache.http.impl.client.HttpClientBuilder; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.http.*; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.client.RestTemplate; |
| | | |
| | | import java.io.*; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | @Component |
| | | public class WxacodeUtil { |
| | | /** |
| | | * 小程序秘钥 |
| | | */ |
| | | private static final String XCX_SECRET = "xcx_secret"; |
| | | /** |
| | | * 小程序appid |
| | | */ |
| | | private static final String XCX_APPID = "xcx_appid"; |
| | | |
| | | |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | | |
| | | @Value("${static_resource_url}") |
| | | private String staticResourceUrl; |
| | | |
| | | |
| | | /** |
| | | * token获取地址 |
| | | */ |
| | |
| | | */ |
| | | private static final String GET_WXACODE ="https://api.weixin.qq.com/wxa/getwxacodeunlimit?access_token="; |
| | | |
| | | public static String getWxacode(String scene,String page,String fileName) throws Exception { |
| | | public String getWxacode(String scene,String page,String fileName,String appid,String secret) throws Exception { |
| | | LogUtil.debug("scene={},page={},fileName={}",scene,page,fileName); |
| | | //获取token |
| | | String appid = PropertiesUtil.getString(XCX_APPID); |
| | | String secret = PropertiesUtil.getString(XCX_SECRET); |
| | | String result1 = get(TOKEN_URL.replace("APPID", appid).replace("SECRET", secret)); |
| | | String access_token = JSONObject.parseObject(result1).getString("access_token"); |
| | | if(StringUtils.isNotBlank(access_token)) { |
| | |
| | | HttpResponse response; |
| | | response = httpClient.execute(httpPost); |
| | | InputStream inputStream = response.getEntity().getContent(); |
| | | /*Object inputObj= response.getEntity().getContent(); |
| | | if(inputObj instanceof InputStream){ |
| | | String strError = streamToString(inputStream,"GBK"); |
| | | LogUtil.info("-------------二维码生成------"+strError); |
| | | return "error:" + strError; |
| | | }*/ |
| | | |
| | | // 图片保存目录路径 |
| | | String baseSavePath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH); |
| | | String baseSavePath = fileStoragePath; |
| | | File targetFile = new File(baseSavePath); |
| | | if(!targetFile.exists()){ |
| | | targetFile.mkdirs(); |
| | | } |
| | | |
| | | /*String inputstreamtofile = inputstreamtofile(inputStream, targetFile); |
| | | if(null != inputstreamtofile){ |
| | | return inputstreamtofile; |
| | | }*/ |
| | | |
| | | // 创建图片文件夹 |
| | | baseSavePath += "wxacode" + File.separatorChar; |
| | |
| | | String qrcodePath = baseSavePath + fileName + ".png"; |
| | | FileOutputStream out = new FileOutputStream(qrcodePath); |
| | | LogUtil.debug("qrcodePath:{}",qrcodePath); |
| | | //本地调试创建(不用删) |
| | | /*String filePath = "e:/test.png"; |
| | | File file = new File(filePath); |
| | | if (!file.exists()) { |
| | | file.mkdir(); |
| | | } |
| | | FileOutputStream outs = new FileOutputStream(file);*/ |
| | | |
| | | byte[] buffer = new byte[1024]; |
| | | int bytesRead = 0; |
| | | while((bytesRead = inputStream.read(buffer, 0, 1024)) != -1) { |
| | | out.write(buffer, 0, bytesRead); |
| | | //outs.write(buffer, 0, bytesRead); |
| | | |
| | | } |
| | | out.flush(); |
| | | out.close(); |
| | | //outs.flush(); |
| | | //outs.close(); |
| | | |
| | | return qrcodePath; |
| | | } else { |
| | |
| | | import com.matrix.component.ueditor.hunter.ImageHunter; |
| | | import com.matrix.component.ueditor.upload.Uploader; |
| | | import com.matrix.component.ueditor.define.State; |
| | | |
| | | import java.util.Map; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | private String actionType = null; |
| | | |
| | | private ConfigManager configManager = null; |
| | | private UeditorProperties ueditorProperties = null; |
| | | |
| | | public ActionEnter ( HttpServletRequest request, String rootPath ) { |
| | | public ActionEnter (HttpServletRequest request, String rootPath , UeditorProperties ueditorProperties) { |
| | | |
| | | this.request = request; |
| | | this.rootPath = rootPath; |
| | | this.actionType = request.getParameter( "action" ); |
| | | this.contextPath = request.getContextPath(); |
| | | this.configManager = ConfigManager.getInstance( this.rootPath, this.contextPath, request.getRequestURI() ); |
| | | this.ueditorProperties=ueditorProperties; |
| | | this.configManager = ConfigManager.getInstance( this.rootPath, this.contextPath, request.getRequestURI() ,ueditorProperties ); |
| | | |
| | | } |
| | | |
| | |
| | | import java.net.URISyntaxException; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.ResourceBundle; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.matrix.component.tools.JSONUtil; |
| | | import com.matrix.component.ueditor.define.ActionMap; |
| | | import com.matrix.core.tools.EnvironmentHolder; |
| | | import com.matrix.system.common.constance.PropertiesConstance; |
| | | import org.apache.commons.io.IOUtils; |
| | | import org.json.JSONArray; |
| | | import org.json.JSONObject; |
| | | |
| | | import com.matrix.core.tools.PropertiesUtil; |
| | | |
| | | /** |
| | | * 配置管理器 |
| | | * |
| | | * |
| | | * @author hancong03@baidu.com |
| | | * |
| | | */ |
| | |
| | | private final static String SCRAWL_FILE_NAME = "scrawl"; |
| | | // 远程图片抓取filename定义 |
| | | private final static String REMOTE_FILE_NAME = "remote"; |
| | | |
| | | private final static String FILES_TORAGE_PATH ="file_storage_path"; |
| | | |
| | | |
| | | |
| | | private UeditorProperties ueditorProperties = null; |
| | | |
| | | /* |
| | | * 通过一个给定的路径构建一个配置管理器, 该管理器要求地址路径所在目录下必须存在config.properties文件 |
| | | */ |
| | | private ConfigManager(String rootPath, String contextPath, String uri) throws FileNotFoundException, IOException { |
| | | private ConfigManager(String rootPath, String contextPath, String uri, UeditorProperties ueditorProperties ) throws FileNotFoundException, IOException { |
| | | |
| | | rootPath = rootPath.replace("\\", "/"); |
| | | |
| | | this.ueditorProperties=ueditorProperties; |
| | | this.rootPath = rootPath; |
| | | this.contextPath = contextPath; |
| | | if (contextPath.length() > 0) { |
| | |
| | | |
| | | /** |
| | | * 配置管理器构造工厂 |
| | | * |
| | | * |
| | | * @param rootPath |
| | | * 服务器根路径 |
| | | * @param contextPath |
| | | * 服务器所在项目路径 |
| | | * @param uri |
| | | * 当前访问的uri |
| | | * @param ueditorProperties |
| | | * @return 配置管理器实例或者null |
| | | */ |
| | | public static ConfigManager getInstance(String rootPath, String contextPath, String uri) { |
| | | public static ConfigManager getInstance(String rootPath, String contextPath, String uri, UeditorProperties ueditorProperties) { |
| | | |
| | | try { |
| | | return new ConfigManager(rootPath, contextPath, uri); |
| | | return new ConfigManager(rootPath, contextPath, uri,ueditorProperties); |
| | | } catch (Exception e) { |
| | | return null; |
| | | } |
| | |
| | | } |
| | | |
| | | conf.put("savePath", savePath); |
| | | conf.put("rootPath", PropertiesUtil.getString(this.FILES_TORAGE_PATH)); |
| | | |
| | | String fileStoragePath = EnvironmentHolder.getPropertis(PropertiesConstance.FILE_STORAGE_PATH); |
| | | conf.put("rootPath",fileStoragePath); |
| | | |
| | | return conf; |
| | | |
| | |
| | | //String configContent = this.readFile(this.getConfigPath()); |
| | | String configContent = this.filter(IOUtils.toString(this.getClass().getClassLoader().getResourceAsStream("config/config.json"))); |
| | | |
| | | |
| | | try { |
| | | JSONObject jsonConfig = new JSONObject(configContent); |
| | | |
| | | com.alibaba.fastjson.JSONObject extend = JSONUtil.extend( |
| | | JSON.parseObject(configContent), |
| | | JSON.parseObject(JSON.toJSONString(ueditorProperties))); |
| | | jsonConfig=new JSONObject(extend.toJSONString()); |
| | | |
| | | this.jsonConfig = jsonConfig; |
| | | } catch (Exception e) { |
| | | this.jsonConfig = null; |
| New file |
| | |
| | | package com.matrix.component.ueditor; |
| | | |
| | | import lombok.Data; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Data |
| | | @Component |
| | | @ConfigurationProperties(prefix = "ueditor") |
| | | public class UeditorProperties { |
| | | |
| | | /** |
| | | * 图片访问路径前缀 |
| | | */ |
| | | private String imageUrlPrefix; |
| | | /* 上传保存路径,可以自定义保存路径和文件名格式 */ |
| | | /* {filename} 会替换成原文件名,配置这项需要注意中文乱码问题 */ |
| | | /* {rand:6} 会替换成随机数,后面的数字是随机数的位数 */ |
| | | /* {time} 会替换成时间戳 */ |
| | | /* {yyyy} 会替换成四位年份 */ |
| | | /* {yy} 会替换成两位年份 */ |
| | | /* {mm} 会替换成两位月份 */ |
| | | /* {dd} 会替换成两位日期 */ |
| | | /* {hh} 会替换成两位小时 */ |
| | | /* {ii} 会替换成两位分钟 */ |
| | | /* {ss} 会替换成两位秒 */ |
| | | /* 非法字符 \ : * ? " < > | */ |
| | | /* 具请体看线上文档: fex.baidu.com/ueditor/#use-format_upload_filename */ |
| | | private String imagePathFormat; |
| | | |
| | | |
| | | |
| | | |
| | | /* 涂鸦图片上传配置项 */ |
| | | private String scrawlPathFormat; |
| | | private String scrawlUrlPrefix; |
| | | |
| | | /* 截图工具上传 */ |
| | | private String snapscreenPathFormat; |
| | | private String snapscreenUrlPrefix; |
| | | |
| | | /* 抓取远程图片配置 */ |
| | | private String catcherPathFormat; |
| | | private String catcherUrlPrefix; |
| | | |
| | | /* 上传视频配置 */ |
| | | private String videoPathFormat; |
| | | private String videoUrlPrefix; |
| | | |
| | | /* 上传文件配置 */ |
| | | private String filePathFormat; |
| | | private String fileUrlPrefix; |
| | | |
| | | /* 列出指定目录下的图片 */ |
| | | private String imageManagerListPath; |
| | | /* 列出指定目录下的文件 */ |
| | | private String fileManagerListPath; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.component.websoket; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 扫码登录接收参数 |
| | | */ |
| | | @Data |
| | | public class ScanQrCodeLoginDto { |
| | | |
| | | /** |
| | | * 登录操作 1.登录 |
| | | */ |
| | | public static final Integer LOGIN_OPERATION_LOGIN=1; |
| | | |
| | | /** |
| | | * 登录操作 2取消登录 |
| | | */ |
| | | public static final Integer LOGIN_OPERATION_CANCEL=2; |
| | | /** |
| | | * 指令类型 1,已扫码 |
| | | */ |
| | | public static final Integer MSG_TYPE_SCAN=1; |
| | | /** |
| | | * 指令类型 2登录确认 |
| | | */ |
| | | public static final Integer MSG_TYPE_LOGIN=2; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 网页客户端id,浏览器生成 |
| | | */ |
| | | String webClientId; |
| | | |
| | | /** |
| | | * 二维码登录key |
| | | */ |
| | | String loginQrCodeKey; |
| | | |
| | | /** |
| | | * app登录用户ID |
| | | */ |
| | | Long appUserId; |
| | | |
| | | /** |
| | | * 登录操作 1.登录,2取消登录 |
| | | */ |
| | | Integer loginOperation; |
| | | |
| | | /** |
| | | * 指令类型 1,已扫码,2登录确认, |
| | | */ |
| | | Integer msgType; |
| | | |
| | | |
| | | } |
| | |
| | | private static final List<WebSoketMessageObserver> observerList=new ArrayList<>(); |
| | | |
| | | |
| | | |
| | | public WebSocketPushHandler(){ |
| | | LogUtil.info("WebSocketPushHandler初始化"); |
| | | //注册观察者 |
| | | addObserver(new WebSoketMessageRabbitObserver()); |
| | | //addObserver(new WebSoketMessageRabbitObserver()); |
| | | addObserver(new WebSoketScanQrCodeLoginObserver()); |
| | | } |
| | | /** |
| | | * 用户进入系统监听 |
| New file |
| | |
| | | package com.matrix.component.websoket; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import net.sf.json.JSONObject; |
| | | import org.springframework.web.socket.CloseStatus; |
| | | import org.springframework.web.socket.TextMessage; |
| | | import org.springframework.web.socket.WebSocketSession; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 扫码登录soket处理类 |
| | | * @author jyy |
| | | */ |
| | | public class WebSoketScanQrCodeLoginObserver implements WebSoketMessageObserver { |
| | | |
| | | |
| | | private static Map<String,Long> scanCash=new HashMap<>(); |
| | | |
| | | |
| | | @Override |
| | | public void userConnection(WebSocketSession session) { |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void handleTextMessage(WebSocketSession session, TextMessage message) { |
| | | |
| | | |
| | | ScanQrCodeLoginDto commonMessage = (ScanQrCodeLoginDto) JSONObject.toBean(JSONObject.fromObject(message.getPayload()), ScanQrCodeLoginDto.class); |
| | | |
| | | if(ScanQrCodeLoginDto.MSG_TYPE_LOGIN.equals(commonMessage.getMsgType())){ |
| | | //todo 添加安全校验代码 |
| | | scanCash.put(SecureUtil.md5(commonMessage.getLoginQrCodeKey()),commonMessage.getAppUserId()); |
| | | JSONObject jsonObject=new JSONObject(); |
| | | jsonObject.put("loginOperation",commonMessage.getLoginOperation()); |
| | | jsonObject.put("msgType",commonMessage.getMsgType()); |
| | | WebSocketPushHandler.sendMessageToUser(commonMessage.getWebClientId(), new TextMessage(jsonObject.toString())); |
| | | }else if(ScanQrCodeLoginDto.MSG_TYPE_SCAN.equals(commonMessage.getMsgType())){ |
| | | JSONObject jsonObject=new JSONObject(); |
| | | jsonObject.put("msgType",commonMessage.getMsgType()); |
| | | WebSocketPushHandler.sendMessageToUser(commonMessage.getWebClientId(), new TextMessage(jsonObject.toString())); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void afterConnectionClosed(WebSocketSession session, CloseStatus status) { |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取扫码的用户id |
| | | * @param webClientId |
| | | * @return |
| | | */ |
| | | public static Long getScanCashValue(String webClientId){ |
| | | return scanCash.remove(SecureUtil.md5(webClientId)); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | private String signType = ""; |
| | | private String paySign = ""; |
| | | |
| | | public BrandWCPayRequestData(String prepay_id,String appID,String paySecret){ |
| | | public BrandWCPayRequestData(String prepay_id, String appID, String paySecret){ |
| | | //默认必须设置 |
| | | setAppId(appID); |
| | | //随机字符串,不长于32 位 |
| | |
| | | |
| | | import com.matrix.component.wechat.externalInterface.common.RandomStringGenerator; |
| | | import com.matrix.component.wechat.externalInterface.common.Signature; |
| | | import com.matrix.component.wechat.externalInterface.common.WechatConfigure; |
| | | |
| | | import java.lang.reflect.Field; |
| | | import java.util.HashMap; |
| | |
| | | /** |
| | | * 商户号 |
| | | */ |
| | | private String mch_id = ""; |
| | | private String mchid = ""; |
| | | |
| | | private String mch_appid = ""; |
| | | |
| | | /** |
| | | * 商户企业付款单号 |
| | | */ |
| | | private String partner_trade_no = ""; |
| | | |
| | | /** |
| | | * 随机字符串 |
| | | */ |
| | | private String nonce_str = ""; |
| | | |
| | | |
| | | private String check_name = ""; |
| | | |
| | | |
| | | /** |
| | | * 签名 |
| | | */ |
| | | private String sign = ""; |
| | | /** |
| | | * 收款方银行卡号 |
| | | */ |
| | | private String enc_bank_no = ""; |
| | | /** |
| | | * 收款方用户名 |
| | | */ |
| | | private String enc_true_name = ""; |
| | | /** |
| | | * 收款方开户行 |
| | | */ |
| | | private String bank_code = ""; |
| | | |
| | | /** |
| | | * 付款金额 RMB(分) |
| | | */ |
| | |
| | | * 备注 |
| | | */ |
| | | private String desc = ""; |
| | | |
| | | private String openid = ""; |
| | | |
| | | |
| | | public JsApiPayComReqData() { |
| | |
| | | * @param desc 描述 |
| | | * @param outTradeNo 商户企业付款单号 |
| | | * @param totalFee 付款金额 |
| | | * @param bankNo 银行卡号 |
| | | * @param bankTrueName 收款号姓名 |
| | | * @param bankCode 收款号开户行 |
| | | */ |
| | | public JsApiPayComReqData(String mchID,String paySecret ,String desc, String outTradeNo, int totalFee, String bankNo, String bankTrueName, String bankCode) { |
| | | public JsApiPayComReqData(String mchID,String mch_appid,String paySecret ,String desc, String outTradeNo, int totalFee, |
| | | String openid, String check_name, String bankCode) { |
| | | setMch_appid(mch_appid); |
| | | //默认必须设置 |
| | | setMch_id(mchID); |
| | | setMchid(mchID); |
| | | setDesc(desc); |
| | | setPartner_trade_no(outTradeNo); |
| | | setAmount(totalFee); |
| | | setOpenid(openid); |
| | | setCheck_name(check_name); |
| | | //随机字符串,不长于32 位 |
| | | setNonce_str(RandomStringGenerator.getRandomStringByLength(32)); |
| | | //根据API给的签名规则进行签名 【 必须要放在本方法的最后】 |
| | | String sign = Signature.getSign(toMap(),paySecret); |
| | | setSign(sign);//把签名数据设置到Sign这个属性中 |
| | | // setEnc_bank_no(); |
| | | // setEnc_true_name(); |
| | | // setBank_code(); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | public String getMch_id() { |
| | | return mch_id; |
| | | public String getMch_appid() { |
| | | return mch_appid; |
| | | } |
| | | |
| | | public void setMch_id(String mch_id) { |
| | | this.mch_id = mch_id; |
| | | public void setMch_appid(String mch_appid) { |
| | | this.mch_appid = mch_appid; |
| | | } |
| | | |
| | | public String getEnc_bank_no() { |
| | | return enc_bank_no; |
| | | public String getCheck_name() { |
| | | return check_name; |
| | | } |
| | | |
| | | public void setEnc_bank_no(String enc_bank_no) { |
| | | this.enc_bank_no = enc_bank_no; |
| | | public void setCheck_name(String check_name) { |
| | | this.check_name = check_name; |
| | | } |
| | | |
| | | public String getEnc_true_name() { |
| | | return enc_true_name; |
| | | public String getMchid() { |
| | | return mchid; |
| | | } |
| | | |
| | | public void setEnc_true_name(String enc_true_name) { |
| | | this.enc_true_name = enc_true_name; |
| | | } |
| | | |
| | | public String getBank_code() { |
| | | return bank_code; |
| | | } |
| | | |
| | | public void setBank_code(String bank_code) { |
| | | this.bank_code = bank_code; |
| | | public void setMchid(String mchid) { |
| | | this.mchid = mchid; |
| | | } |
| | | |
| | | public String getNonce_str() { |
| | |
| | | this.partner_trade_no = partner_trade_no; |
| | | } |
| | | |
| | | public String getOpenid() { |
| | | return openid; |
| | | } |
| | | |
| | | public void setOpenid(String openid) { |
| | | this.openid = openid; |
| | | } |
| | | |
| | | public int getAmount() { |
| | | return amount; |
| | | } |
| | |
| | | * @return 预支付订单返回的结果对象(该结果对象已封装),在H5页面使用该对象信息 |
| | | * @throws Exception |
| | | */ |
| | | public BrandWCPayRequestData createOrder(String desc,String outTradeNo, int price, String openId,String attach) throws Exception { |
| | | public BrandWCPayRequestData createOrder(String desc, String outTradeNo, int price, String openId, String attach) throws Exception { |
| | | Long companyId=HostInterceptor.getCompanyId(); |
| | | BusParameterSettings notifyUrl = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_NOTIFYURL, companyId); |
| | | return buildBrandWCPayRequestData(desc, outTradeNo, price, openId, attach, notifyUrl); |
| | | } |
| | | |
| | | /** |
| | | * 创建充值订单 |
| | | */ |
| | | public BrandWCPayRequestData createRechargeOrder(String desc, String outTradeNo, int price, String openId, String attach) throws Exception { |
| | | Long companyId=HostInterceptor.getCompanyId(); |
| | | BusParameterSettings notifyUrl = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_RECHARGE_NOTIFYURL, companyId); |
| | | return buildBrandWCPayRequestData(desc, outTradeNo, price, openId, attach, notifyUrl); |
| | | } |
| | | |
| | | |
| | | |
| | | private BrandWCPayRequestData buildBrandWCPayRequestData(String desc, String outTradeNo, int price, String openId, String attach, BusParameterSettings notifyUrl) throws Exception { |
| | | // 创建微信支付预付接口 |
| | | JsApiPayBusiness jsApiPayBusiness = new JsApiPayBusiness(); |
| | | String idAddr = getIpAddr(WebUtil.getRequest()); |
| | |
| | | |
| | | BusParameterSettings mchID = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_MCHID, companyId); |
| | | BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, companyId); |
| | | BusParameterSettings notifyUrl = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_NOTIFYURL, companyId); |
| | | |
| | | |
| | | BusParameterSettings appId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId); |
| | | |
| | |
| | | LogUtil.error("创建微信支付订单失败msg={}",result.getReturn_msg()); |
| | | throw new GlobleException("创建微信支付订单失败,请检查程序配置"); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /**@Description 支付后,向微信发送请求、查询订单,看订单是否真的支付成功了 |
| | | @date 2017年6月27日 |
| | | @atuhor jiangyouyao |
| | |
| | | * @param openid |
| | | * @return |
| | | */ |
| | | public JsApiPayComResData comPay(String desc, String outTradeNo,int totalFee, String openid){ |
| | | public JsApiPayComResData comPay(String desc, String outTradeNo,int totalFee, String openid,Long companyId){ |
| | | JsApiPayComResData result=null; |
| | | //boolean flag=false; |
| | | try { |
| | | JsApiPayBusiness jsApiPayBusiness = new JsApiPayBusiness(); |
| | | // TODO 企业付款 |
| | | Long companyId=HostInterceptor.getCompanyId(); |
| | | |
| | | BusParameterSettings mchID = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_MCHID, companyId); |
| | | BusParameterSettings appId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId); |
| | | BusParameterSettings paySecret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_SECRET, companyId); |
| | | |
| | | BusParameterSettings certLocalPath = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.WECHARPAY_CERTLOCAL_PATH, companyId); |
| | | |
| | | JsApiPayComReqData jsApiPayComReqData=new JsApiPayComReqData(mchID.getParamValue(),paySecret.getParamValue(),"","",0,"","",""); |
| | | JsApiPayComReqData jsApiPayComReqData=new JsApiPayComReqData(mchID.getParamValue(), |
| | | appId.getParamValue(), |
| | | paySecret.getParamValue(), |
| | | desc,outTradeNo,totalFee,openid,"NO_CHECK",""); |
| | | JsApiPayComService jsApiPayComService=new JsApiPayComService(); |
| | | |
| | | HttpsRequest2 request2= (HttpsRequest2) jsApiPayComService.getServiceRequest(); |
| | | request2.setCertLocalPath(certLocalPath.getParamValue()); |
| | | request2.setMchId(mchID.getParamValue()); |
| | | |
| | | |
| | | result = jsApiPayBusiness.payComOrder(jsApiPayComService, jsApiPayComReqData); |
| | | |
| | | LogUtil.info("#提现,企业付款到个人---result:{}",result); |
| | | if (result.getResult_code().equals("SUCCESS")) { |
| | | return result; |
| New file |
| | |
| | | package com.matrix.config; |
| | | |
| | | |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import org.springframework.web.cors.CorsConfiguration; |
| | | import org.springframework.web.cors.UrlBasedCorsConfigurationSource; |
| | | import org.springframework.web.filter.CorsFilter; |
| | | |
| | | /** |
| | | * @author JIANGYOUYAO |
| | | * @date 2021/5/29 0029 |
| | | */ |
| | | @Configuration |
| | | public class CrossOriginConfig { |
| | | |
| | | private CorsConfiguration buildConfig() { |
| | | CorsConfiguration corsConfiguration = new CorsConfiguration(); |
| | | corsConfiguration.addAllowedOrigin("*"); |
| | | corsConfiguration.addAllowedHeader("*"); |
| | | corsConfiguration.addAllowedMethod("*"); |
| | | corsConfiguration.setAllowCredentials(true); |
| | | return corsConfiguration; |
| | | } |
| | | |
| | | @Bean |
| | | public CorsFilter corsFilter() { |
| | | UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource(); |
| | | source.registerCorsConfiguration("/**", buildConfig()); |
| | | return new CorsFilter(source); |
| | | } |
| | | |
| | | } |
| | |
| | | * @description 容器添加组件 |
| | | * @date 2019-06-14 15:50 |
| | | */ |
| | | @Configuration |
| | | @PropertySource("classpath:config/system.properties") |
| | | @Configuration() |
| | | public class MvcCoreConfig implements WebMvcConfigurer { |
| | | |
| | | @Autowired |
| | |
| | | .excludePathPatterns("/plugin/**") |
| | | .excludePathPatterns("/swagger**/**") |
| | | .excludePathPatterns("/webjars/**"); |
| | | |
| | | // 用户认证拦截 |
| | | registry.addInterceptor(userLoginInterceptor) |
| | | .addPathPatterns("/**") |
| | | .excludePathPatterns("/common/**") |
| | | .excludePathPatterns("/resource/**") |
| | | .excludePathPatterns("/swagger**/**") |
| | | .excludePathPatterns("/webjars/**") |
| | | .excludePathPatterns("/api/**"); |
| | | .addPathPatterns("/admin/**"); |
| | | |
| | | // url权限拦截 |
| | | registry.addInterceptor(suAuthorityInterceptor).addPathPatterns("/**/su/**"); |
| | | |
| | | //小程序公司与域名对应关系拦截 |
| | | registry.addInterceptor(hostInterceptor).addPathPatterns("/**/wxapi/**") |
| | | .excludePathPatterns("/wxCommon/wxapi/wxpayCallback"); |
| | | .addPathPatterns("/api/common/wxLogin/**") |
| | | .addPathPatterns("/api/common/bindUser") |
| | | .addPathPatterns("/api/user/xcxloginOut/**") |
| | | .excludePathPatterns("/wxCommon/wxapi/wxpayCallback") |
| | | .excludePathPatterns("/wxCommon/wxapi/rechargeCallBack"); |
| | | } |
| | | |
| | | |
| New file |
| | |
| | | package com.matrix.config; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2021-02-22 |
| | | **/ |
| | | @Configuration |
| | | @MapperScan("com.matrix.system.*.dao") |
| | | public class MybatisPlusConfig { |
| | | |
| | | @Bean |
| | | public PaginationInterceptor paginationInterceptor(){ |
| | | return new PaginationInterceptor(); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | /* |
| | | package com.matrix.config; |
| | | |
| | | |
| | |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplateFactory; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.system.shopXcx.mqTask.*; |
| | | import com.matrix.system.shopXcx.mqTask.OrderOutSotoreTask; |
| | | import com.matrix.system.shopXcx.mqTask.SalesOrderRefundTask; |
| | | import com.matrix.system.shopXcx.mqTask.SalesOrderTask; |
| | | import com.matrix.system.shopXcx.mqTask.TemplateMsgTask; |
| | | import com.matrix.system.wechart.templateMsg.Task.UniformMsgSentTask; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.context.annotation.Bean; |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Configuration |
| | | */ |
| | | /** |
| | | * 小型应用弃用rabbitmq,直接通过观察者模式对消息进行同步消费 参考 AsyncMessageManager |
| | | *//* |
| | | |
| | | //@Configuration |
| | | public class RabbitMqConfig { |
| | | |
| | | @Value("${rabbitmq.host}") |
| | |
| | | |
| | | public static final String MQ_EXCHANGE_A = "hive_exchange_A"; |
| | | |
| | | @Bean |
| | | VipCreateTask VipCreateTask() { |
| | | return new VipCreateTask(); |
| | | } |
| | | //订阅模式 |
| | | public static final String MQ_EXCHANGE_TOPIC = "hive_exchange_fanout"; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @Bean |
| | | OrderTask OrderrCreateTask() { |
| | | return new OrderTask(); |
| | | SalesOrderTask SalesOrderTask() { |
| | | return new SalesOrderTask(); |
| | | } |
| | | @Bean |
| | | SalesOrderRefundTask SalesOrderRefundTask() { |
| | | return new SalesOrderRefundTask(); |
| | | } |
| | | |
| | | @Bean |
| | |
| | | |
| | | //声明一个交换机 |
| | | rabiitMqTemplate.exchangeDeclare(MQ_EXCHANGE_A+evn, "direct"); |
| | | rabiitMqTemplate.exchangeDeclare(MQ_EXCHANGE_A+"cf", "direct"); |
| | | rabiitMqTemplate.exchangeDeclare(MQ_EXCHANGE_TOPIC +evn, "topic"); |
| | | |
| | | List<MqTask> taskList = new ArrayList<>(); |
| | | |
| | | //注册RabbitMq任务 |
| | | taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.CREATE_VIP + evn, MQTaskRouting.CREATE_VIP + evn, VipCreateTask())); |
| | | taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.CREATE_ORDER + evn,MQTaskRouting.CREATE_ORDER + evn,OrderrCreateTask())); |
| | | taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.SEND_TEMPLATE_MSG + evn,MQTaskRouting.SEND_TEMPLATE_MSG + evn, TemplateMsgTask())); |
| | | taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.ORDER_OUT_SOTORE + evn,MQTaskRouting.ORDER_OUT_SOTORE + evn, OrderOutSotoreTask())); |
| | | taskList.add(new MqTask(MQ_EXCHANGE_A + evn, MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG + evn,MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG + evn, UniformMsgSentTask())); |
| | | |
| | | |
| | | |
| | | rabiitMqTemplate.binding(taskList); |
| | | |
| | |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | */ |
| | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
| | | import org.springframework.context.annotation.Bean; |
| | | import org.springframework.context.annotation.Configuration; |
| | | import springfox.documentation.builders.ApiInfoBuilder; |
| | |
| | | .required(false).build(); |
| | | parameters.add(parameterBuilder.build()); |
| | | return new Docket(DocumentationType.SWAGGER_2).apiInfo(apiInfo()).enable(swaggerEnable).select().apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) |
| | | .paths(PathSelectors.any()).build().globalOperationParameters(parameters); |
| | | .paths(PathSelectors.ant("/api/**")).build().globalOperationParameters(parameters).groupName("HIVE"); |
| | | // .ignoredParameterTypes(MemberEntity.class); |
| | | } |
| | | |
| | |
| | | .version("1.0") |
| | | .build(); |
| | | } |
| | | |
| | | @Bean |
| | | public Docket wxRestApi(){ |
| | | // 添加请求参数,我们这里把token作为请求头部参数传入后端 |
| | | ParameterBuilder parameterBuilder = new ParameterBuilder(); |
| | | List<Parameter> parameters = new ArrayList<Parameter>(); |
| | | parameterBuilder.name("token").description("令牌").modelRef(new ModelRef("string")).parameterType("header") |
| | | .required(true).build(); |
| | | parameters.add(parameterBuilder.build()); |
| | | |
| | | ParameterBuilder parameterBuilder2 = new ParameterBuilder(); |
| | | parameterBuilder2.name("companyCode").description("公司编码tangqiaqia.jyymatrix.cc").modelRef(new ModelRef("string")).parameterType("header") |
| | | .required(true).build(); |
| | | parameters.add(parameterBuilder2.build()); |
| | | |
| | | return new Docket(DocumentationType.SWAGGER_2).apiInfo(wxApiInfo()).enable(swaggerEnable).select().apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) |
| | | .paths(PathSelectors.ant("/wxapi/**")).build().globalOperationParameters(parameters).groupName("小程序接口"); |
| | | // .ignoredParameterTypes(MemberEntity.class); |
| | | } |
| | | |
| | | private ApiInfo wxApiInfo(){ |
| | | return new ApiInfoBuilder() |
| | | .title("Hive Wx") |
| | | .description("This is a restful api document of Hive Wx.") |
| | | .version("1.0") |
| | | .build(); |
| | | } |
| | | |
| | | |
| | | @Bean |
| | | public Docket ERPApi(){ |
| | | // 添加请求参数,我们这里把token作为请求头部参数传入后端 |
| | | ParameterBuilder parameterBuilder = new ParameterBuilder(); |
| | | List<Parameter> parameters = new ArrayList<Parameter>(); |
| | | parameterBuilder.name("token").description("令牌").modelRef(new ModelRef("string")).parameterType("header") |
| | | .required(true).build(); |
| | | parameters.add(parameterBuilder.build()); |
| | | |
| | | |
| | | return new Docket(DocumentationType.SWAGGER_2).apiInfo(ERPApiInfo()).enable(swaggerEnable).select().apis(RequestHandlerSelectors.withClassAnnotation(Api.class)) |
| | | .paths(PathSelectors.ant("/admin/**")).build().globalOperationParameters(parameters).groupName("ERP接口"); |
| | | } |
| | | |
| | | private ApiInfo ERPApiInfo(){ |
| | | return new ApiInfoBuilder() |
| | | .title("Hive ERP") |
| | | .description("This is a restful api document of Hive ERP.") |
| | | .version("1.0") |
| | | .build(); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.config; |
| | | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | @EnableScheduling |
| | | @ConditionalOnProperty(name = "scheduling.enabled", havingValue= "true") |
| | | public class TaskScheduleConfig { |
| | | |
| | | public TaskScheduleConfig(){ |
| | | LogUtil.debug("**********定时任务启动**********"); |
| | | } |
| | | } |
| | |
| | | LogUtil.info("注册WebSocket处理类"); |
| | | registry.addHandler(createWebSocketPushHandler(), "/webSocketServer") |
| | | .addInterceptors(createHhandshakeInterceptor()).setAllowedOrigins("*"); |
| | | |
| | | registry.addHandler(createWebSocketPushHandler(), "/sockjs/webSocketServer") |
| | | .addInterceptors(createHhandshakeInterceptor()).withSockJS(); |
| | | |
| New file |
| | |
| | | package com.matrix.core.enums; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 通过统一获取key,value的能力 |
| | | */ |
| | | public interface EnumApiShowAble { |
| | | |
| | | |
| | | /** |
| | | * 获取枚举的唯一编码 |
| | | * @return |
| | | */ |
| | | String getEnumCode(); |
| | | |
| | | /** |
| | | * 获取枚举对外展示对象列表 |
| | | * @return |
| | | */ |
| | | List<EnumsShowVo> getEnumsShowVos(); |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.core.enums; |
| | | |
| | | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.core.Ordered; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.net.JarURLConnection; |
| | | import java.net.URL; |
| | | import java.net.URLConnection; |
| | | import java.util.*; |
| | | import java.util.jar.JarEntry; |
| | | import java.util.jar.JarFile; |
| | | |
| | | |
| | | @Component |
| | | @Order(Ordered.HIGHEST_PRECEDENCE) |
| | | public class EnumsManager implements ApplicationRunner { |
| | | private final List<String> CLASS_NAME = new ArrayList<>(); |
| | | private ClassLoader classLoader; |
| | | private static final String SUFFIX = ".class"; |
| | | |
| | | private Map<String, List<EnumsShowVo>> showAbleMap = new HashMap<>(); |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | | LogUtil.info("扫描自定义枚举------------------"); |
| | | initEnum("com.matrix"); |
| | | LogUtil.info("扫描自定义枚举结束==============="); |
| | | } |
| | | |
| | | public List<EnumsShowVo> getShowEnum(String emumCode) { |
| | | return showAbleMap.get(emumCode); |
| | | } |
| | | |
| | | |
| | | private void initEnum(String... packages) { |
| | | classLoader = Thread.currentThread().getContextClassLoader(); |
| | | |
| | | for (String basePackage : packages) { |
| | | Enumeration<URL> resources = null; |
| | | try { |
| | | resources = classLoader.getResources(basePackage.replaceAll("\\.", "/")); |
| | | } catch (IOException e) { |
| | | return; |
| | | } |
| | | |
| | | // 扫描当前工程和jar包 |
| | | while (resources.hasMoreElements()) { |
| | | URL url = resources.nextElement(); |
| | | if ("file".equals(url.getProtocol())) { |
| | | doFileScan(url.getPath()); |
| | | } else if ("jar".equals(url.getProtocol())) { |
| | | doJarScan(basePackage, url); |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 初始化枚举数据 |
| | | enumValue(); |
| | | } |
| | | |
| | | /** |
| | | * 扫描当前工程对应包下的所有类 |
| | | * |
| | | * @param path |
| | | */ |
| | | private void doFileScan(String path) { |
| | | String rootPath = classLoader.getResource("").getPath(); |
| | | File pathFile = new File(path); |
| | | |
| | | File[] files = pathFile.listFiles(); |
| | | if (files == null || files.length == 0) { |
| | | return; |
| | | } |
| | | |
| | | for (File file : files) { |
| | | if (file.isDirectory()) { |
| | | String nextPath = path + "/" + file.getName(); |
| | | doFileScan(nextPath); |
| | | } else if (file.getName().endsWith(SUFFIX)) { |
| | | if (!path.contains(rootPath)) { |
| | | return; |
| | | } |
| | | String subStr = path.substring(rootPath.length()); |
| | | String className = (subStr + "/" + file.getName().replaceAll(SUFFIX, "")).replaceAll("/", "\\."); |
| | | CLASS_NAME.add(className); |
| | | } |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 扫描jar包下对应包下所有类 |
| | | * |
| | | * @param basePackage |
| | | * @param baseURL |
| | | */ |
| | | public void doJarScan(String basePackage, URL baseURL) { |
| | | basePackage = basePackage.replaceAll("\\.", "/"); |
| | | JarFile jarFile; |
| | | try { |
| | | URLConnection urlConnection = baseURL.openConnection(); |
| | | JarURLConnection jarUrl = (JarURLConnection) urlConnection; |
| | | jarFile = jarUrl.getJarFile(); |
| | | } catch (IOException e) { |
| | | throw new RuntimeException("未找到资源"); |
| | | } |
| | | |
| | | Enumeration<JarEntry> entries = jarFile.entries(); |
| | | while (entries.hasMoreElements()) { |
| | | JarEntry entry = entries.nextElement(); |
| | | |
| | | String name = entry.getName(); |
| | | if (name.startsWith(basePackage)) { |
| | | if (name.endsWith(SUFFIX)) { |
| | | String className = name.replaceAll(SUFFIX, "").replaceAll("/", "\\."); |
| | | CLASS_NAME.add(className); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | public void enumValue() { |
| | | for (String className : CLASS_NAME) { |
| | | Class<?> clazz = null; |
| | | try { |
| | | clazz = classLoader.loadClass(className); |
| | | } catch (ClassNotFoundException e) { |
| | | continue; |
| | | } |
| | | |
| | | // 判断类是否为枚举类型 |
| | | if (!clazz.isEnum()) { |
| | | continue; |
| | | } |
| | | |
| | | // 判断ApiShowAble是否为类的父类 |
| | | if (!EnumApiShowAble.class.isAssignableFrom(clazz)) { |
| | | continue; |
| | | } |
| | | |
| | | Object[] constants = clazz.getEnumConstants(); |
| | | EnumApiShowAble enumApiShowAble = (EnumApiShowAble) constants[0]; |
| | | |
| | | showAbleMap.put(enumApiShowAble.getEnumCode(), enumApiShowAble.getEnumsShowVos()); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.core.enums; |
| | | |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 枚举值展示对象 |
| | | */ |
| | | @Builder |
| | | @Data |
| | | public class EnumsShowVo { |
| | | |
| | | /** |
| | | * 展示名称 |
| | | */ |
| | | private String displayName; |
| | | |
| | | /** |
| | | * 提交值 |
| | | */ |
| | | private Integer value; |
| | | |
| | | |
| | | } |
| | |
| | | return message; |
| | | } |
| | | |
| | | public static RuntimeException instance(String msg) { |
| | | return new GlobleException(msg); |
| | | } |
| | | |
| | | public String getErrorCode() { |
| | | return errorCode; |
| | | } |
| | |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.ProjExceptionDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.web.servlet.HandlerExceptionResolver; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | |
| | | public class GlobleExceptionResolver implements HandlerExceptionResolver { |
| | | |
| | | private static final String TRUE = "true"; |
| | | |
| | | @Value("${is_open_exception_report}") |
| | | String isOpenExceptionReport; |
| | | |
| | | |
| | | @Value("${showExcptionUrl}") |
| | | String showExcptionUrl; |
| | | |
| | | |
| | | /** |
| | | * 忽略一些特定的异常 |
| | |
| | | * @email 935090232@qq.com |
| | | * @date 2018年5月9日 |
| | | */ |
| | | public static void sendNoticeToAdmin(Exception ex, String mdc, String requestUrl) { |
| | | public void sendNoticeToAdmin(Exception ex, String mdc, String requestUrl) { |
| | | |
| | | String simpleMsg = ex.getMessage(); |
| | | |
| | | if (!EXCLUDE_EXCEPTION.contains(simpleMsg)) { |
| | | |
| | | |
| | | String isOpenDingdingExceptionNotice = PropertiesUtil.getString("is_open_exception_report"); |
| | | String showExcptionUrl = PropertiesUtil.getString("showExcptionUrl"); |
| | | String isOpenDingdingExceptionNotice =isOpenExceptionReport; |
| | | |
| | | |
| | | if (isOpenDingdingExceptionNotice != null && TRUE.equals(isOpenDingdingExceptionNotice)) { |
| | |
| | | import com.matrix.core.tools.InternationaUtil; |
| | | import com.matrix.core.tools.MdcUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.hive.plugin.message.StringUtil; |
| | | import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.HashMap; |
| | |
| | | * info会被国际化工具先处理,找不到国际化资源则显示原始信息 |
| | | **/ |
| | | private String info; |
| | | |
| | | /** |
| | | * 单个对象返回参数 |
| | | */ |
| | | private Object data; |
| | | |
| | | private Map<Object, Object> mapInfo = new HashMap<>(); |
| | | |
| | | private List<?> rows; |
| | | /** |
| | | * 总记录数 |
| | |
| | | |
| | | private String requestId; |
| | | |
| | | public static AjaxResult buildSuccessInstance(Object data) { |
| | | AjaxResult result= new AjaxResult(STATUS_SUCCESS,""); |
| | | result.data=data; |
| | | return result; |
| | | } |
| | | |
| | | |
| | | public static AjaxResult buildSuccessInstance(Object data, String info) { |
| | | AjaxResult result= new AjaxResult(STATUS_SUCCESS,info); |
| | | result.data=data; |
| | | return result; |
| | | } |
| | | |
| | | |
| | | public static AjaxResult buildSuccessInstance(String info) { |
| | |
| | | public static AjaxResult buildSuccessInstance(List<?> rows, Integer total) { |
| | | return new AjaxResult(STATUS_SUCCESS, rows, total); |
| | | } |
| | | |
| | | public static AjaxResult buildSuccessInstance(List<?> rows, long total) { |
| | | return new AjaxResult(STATUS_SUCCESS, rows, Integer.parseInt(total+"")); |
| | | } |
| | | |
| | | |
| | | public static AjaxResult buildSuccessInstance(List<?> rows) { |
| | | return new AjaxResult(STATUS_SUCCESS, rows); |
| | |
| | | * 设置简单信息,这是一个便捷的方法 |
| | | * |
| | | * @param status |
| | | * @param page |
| | | * @param info |
| | | */ |
| | | public AjaxResult(String status, List<?> rows) { |
| | | this.status = status; |
| | |
| | | } |
| | | this.requestId= MdcUtil.getMdc(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | |
| | | this.requestId = requestId; |
| | | } |
| | | |
| | | public Object getData() { |
| | | return data; |
| | | } |
| | | |
| | | public void setData(Object data) { |
| | | this.data = data; |
| | | } |
| | | |
| | | /** |
| | | * 在map对象中放置信息 |
| | | * |
| New file |
| | |
| | | package com.matrix.core.pojo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "BaseQueryDto", description = "通用分页查询参数接收类") |
| | | public class BasePageQueryDto { |
| | | |
| | | |
| | | @NotNull(message = "pageNum参数不能为空") |
| | | @ApiModelProperty(value = "第几页", example = "1") |
| | | private Integer pageNum; |
| | | |
| | | @NotNull(message = "pageSize参数不能为空") |
| | | @ApiModelProperty(value ="数量", example = "10") |
| | | private Integer pageSize; |
| | | |
| | | @ApiModelProperty(value ="排序方式", example = "desc") |
| | | private String order; |
| | | |
| | | @ApiModelProperty(value ="排序字段", example = "create_time") |
| | | private String sort; |
| | | |
| | | @ApiModelProperty(value ="关键字") |
| | | private String keywords; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "开始时间") |
| | | private Date beginTime; |
| | | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "结束时间") |
| | | private Date endTime; |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.core.pojo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 通用的验证返回参数 |
| | | */ |
| | | @Data |
| | | public class VerificationResult { |
| | | |
| | | private boolean judgeResult; |
| | | |
| | | private String msg; |
| | | |
| | | private Object info; |
| | | |
| | | private VerificationResult(){ |
| | | |
| | | } |
| | | |
| | | public static VerificationResult buildVerificationResult(boolean judgeResult){ |
| | | VerificationResult obj=new VerificationResult(); |
| | | obj.judgeResult =judgeResult; |
| | | return obj ; |
| | | } |
| | | |
| | | |
| | | public static VerificationResult buildVerificationResult(boolean judgeResult,String msg){ |
| | | VerificationResult obj=new VerificationResult(); |
| | | obj.judgeResult =judgeResult; |
| | | obj.msg=msg; |
| | | return obj ; |
| | | } |
| | | |
| | | |
| | | public static VerificationResult buildVerificationResult(boolean judgeResult,Object info){ |
| | | VerificationResult obj=new VerificationResult(); |
| | | obj.judgeResult =judgeResult; |
| | | obj.info=info; |
| | | return obj ; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | targetDate = calendar.getTime(); |
| | | break; |
| | | default: |
| | | targetDate = stringToDate("9999-12-31", DATE_FORMAT_DD); |
| | | targetDate = stringToDate("2099-12-31", DATE_FORMAT_DD); |
| | | |
| | | } |
| | | |
| | |
| | | response = httpclient.execute(httppost); |
| | | if (response.getStatusLine().getStatusCode() == HttpStatus.SC_OK) { |
| | | String result = EntityUtils.toString(response.getEntity(), "utf-8"); |
| | | LogUtil.debug("发送钉钉结果"+result); |
| | | } |
| | | } catch (IOException e) { |
| | | e.printStackTrace(); |
| New file |
| | |
| | | package com.matrix.core.tools; |
| | | |
| | | import com.matrix.core.exception.GlobleException; |
| | | import org.springframework.context.EnvironmentAware; |
| | | import org.springframework.core.env.Environment; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | @Component |
| | | public class EnvironmentHolder implements EnvironmentAware { |
| | | |
| | | |
| | | private static Environment env; |
| | | |
| | | |
| | | @Override |
| | | public void setEnvironment(Environment environment) { |
| | | env = environment; |
| | | } |
| | | |
| | | /** |
| | | * 获取配置文件中的值 |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public static String getPropertis(String key) { |
| | | if (env != null) { |
| | | return env.getProperty(key); |
| | | } else { |
| | | throw new GlobleException("Environment 未初始化"); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | @Override |
| | | public void setFile(String file) { |
| | | String val = file.trim(); |
| | | fileName = PropertiesUtil.getString("log_path") + val; |
| | | } |
| | | } |
| | |
| | | private static final String TR_KEY = "Tr"; |
| | | |
| | | public static void setRequestId() { |
| | | MDC.clear(); |
| | | MDC.remove(TR_KEY); |
| | | MDC.put(TR_KEY, "TR = " + StringUtils.getRandomString(16) + ""); |
| | | } |
| | | |
| | | public static void clearRequestId() { |
| | | MDC.clear(); |
| | | MDC.remove(TR_KEY); |
| | | } |
| | | |
| | | public static String getMdc() { |
| | |
| | | package com.matrix.core.tools; |
| | | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.aliyuncs.CommonRequest; |
| | |
| | | import com.aliyuncs.IAcsClient; |
| | | import com.aliyuncs.exceptions.ClientException; |
| | | import com.aliyuncs.http.MethodType; |
| | | import com.google.gson.JsonObject; |
| | | import com.matrix.config.properties.AliSmsProperties; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.system.hive.bean.SysSmsTemplate; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | CommonRequest request = commonRequest(SysSmsTemplate.SMS_ACTION_SEND); |
| | | request.putQueryParameter("PhoneNumbers", phoneNum); |
| | | request.putQueryParameter("TemplateCode", templateCode); |
| | | String jsonStr = JSONObject.toJSONString(values); |
| | | request.putQueryParameter("TemplateParam", jsonStr); |
| | | request.putQueryParameter("TemplateParam", JSONUtil.parse(values).toString()); |
| | | |
| | | CommonResponse response = null; |
| | | try { |
| | |
| | | package com.matrix.core.tools; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.Iterator; |
| | | import java.util.List; |
| | | import java.util.Random; |
| | | import java.util.UUID; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | import com.matrix.core.exception.GlobleException; |
| | | import net.sourceforge.pinyin4j.PinyinHelper; |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinCaseType; |
| | |
| | | import net.sourceforge.pinyin4j.format.HanyuPinyinVCharType; |
| | | import net.sourceforge.pinyin4j.format.exception.BadHanyuPinyinOutputFormatCombination; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.util.AntPathMatcher; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.util.*; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | /** |
| | | * 字符串操作类,转换数据类型,切割字符串,对象比较等操作 |
| | |
| | | private static final int SAVA_CHAR_LENGTH = 4; |
| | | |
| | | private static final String EMPTY = ""; |
| | | |
| | | |
| | | /** |
| | | * 查找指定字符串是否匹配指定字符串列表中的任意一个字符串 |
| | | * |
| | | * @param str 指定字符串 |
| | | * @param strs 需要检查的字符串数组 |
| | | * @return 是否匹配 |
| | | */ |
| | | public static boolean matches(String str, List<String> strs) |
| | | { |
| | | if (isBlank(str) || CollectionUtils.isEmpty(strs)) |
| | | { |
| | | return false; |
| | | } |
| | | for (String pattern : strs) |
| | | { |
| | | if (isMatch(pattern, str)) |
| | | { |
| | | return true; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | /** |
| | | * 判断url是否与规则配置: |
| | | * ? 表示单个字符; |
| | | * * 表示一层路径内的任意字符串,不可跨层级; |
| | | * ** 表示任意层路径; |
| | | * |
| | | * @param pattern 匹配规则 |
| | | * @param url 需要匹配的url |
| | | * @return |
| | | */ |
| | | public static boolean isMatch(String pattern, String url) |
| | | { |
| | | AntPathMatcher matcher = new AntPathMatcher(); |
| | | return matcher.match(pattern, url); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 将字符串中的某些值用指定字符代替 |
| | |
| | | return sb.toString(); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 用逗号分开的存的id是否包含对应的id 如比较 123,123,124 中是否包含12这个主键 比对的方法是 字符串中是否包含"^12$" |
| | | * "^12,.*" 或者 ".+,12$" 或者 ".+,12,$" 或者 ".+,12,.+" 字符串 |
| New file |
| | |
| | | package com.matrix.system.activity.action; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.activity.dao.ActivitySignAwardSetDao; |
| | | import com.matrix.system.activity.dto.*; |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import com.matrix.system.activity.service.ActivitySignAwardSetService; |
| | | import com.matrix.system.activity.vo.*; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.shopXcx.bean.ShopActivities; |
| | | import com.matrix.system.shopXcx.dao.ShopActivitiesDao; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.*; |
| | | |
| | | /** |
| | | * @description 奖品设置表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "admin/activitySignAwardSet") |
| | | public class ActivitySignAwardSetAction { |
| | | |
| | | @Autowired |
| | | private ActivitySignAwardSetService activitySignAwardSetService; |
| | | @Autowired |
| | | private ShopActivitiesDao shopActivitiesDao; |
| | | @Autowired |
| | | private ActivitySignAwardSetDao activitySignAwardSetDao; |
| | | |
| | | /** |
| | | * 马上创建转盘抽奖 |
| | | */ |
| | | @PostMapping(value = "/createLuckyDrawSet") |
| | | public @ResponseBody |
| | | AjaxResult createLuckyDrawSet() { |
| | | //获取当前登录人员信息 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | //签到活动的唯一性 |
| | | List<ShopActivities> shopActivitiesDone = shopActivitiesDao.selectOneByCompanyIdAndActType(companyId,ShopActivities.ACTIVITIES_TYPE_LUCKYDRAW); |
| | | if(CollUtil.isNotEmpty(shopActivitiesDone)){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "转盘抽奖已经创建,请去活动管理菜单查看"); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, ""); |
| | | } |
| | | |
| | | /** |
| | | * 新增转盘抽奖 |
| | | */ |
| | | @PostMapping(value = "/addLuckyDrawSet") |
| | | public @ResponseBody |
| | | AjaxResult addLuckyDrawSet(@RequestBody AddLuckyDrawSetDto addLuckyDrawSetDto) { |
| | | //获取当前登录人员信息 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | //转盘抽奖活动的唯一性 |
| | | List<ShopActivities> shopActivitiesDone = shopActivitiesDao.selectOneByCompanyIdAndActType(companyId,ShopActivities.ACTIVITIES_TYPE_LUCKYDRAW); |
| | | if(CollUtil.isNotEmpty(shopActivitiesDone)){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "转盘抽奖只能创建一次"); |
| | | } |
| | | |
| | | //新增活动主表信息 |
| | | ShopActivities shopActivities = new ShopActivities(); |
| | | shopActivities.setActName(addLuckyDrawSetDto.getActName()); |
| | | shopActivities.setActCode(addLuckyDrawSetDto.getActCode()); |
| | | shopActivities.setIsStart(ShopActivities.ACTIVITIES_STATUS_CLOSE); |
| | | shopActivities.setActType(ShopActivities.ACTIVITIES_TYPE_LUCKYDRAW); |
| | | shopActivities.setActStatus(ShopActivities.ACTSTATUS_STATUS_RELEASE); |
| | | shopActivities.setActBeginTime(addLuckyDrawSetDto.getBeginTime()); |
| | | shopActivities.setActEndTime(addLuckyDrawSetDto.getEndTime()); |
| | | shopActivities.setCompanyId(companyId); |
| | | shopActivities.setCreateBy(user.getSuName()); |
| | | shopActivities.setUpdateBy(user.getSuName()); |
| | | //将基本信息转换成JSON字符串存储到活动主表的act_content字段 |
| | | LuckyDrawBasicJsonDto luckyDrawBasicJsonDto = addLuckyDrawSetDto.getLuckyDrawBasicJsonDto(); |
| | | String json= JSON.toJSONString(luckyDrawBasicJsonDto); |
| | | shopActivities.setActContent(json); |
| | | int insert = shopActivitiesDao.insert(shopActivities); |
| | | if(insert > 0){ |
| | | //新增活动奖品信息 |
| | | List<ActivitySignAwardSet> activitySignAwardSets = addLuckyDrawSetDto.getLuckyDrawAwardSets(); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSets)) { |
| | | for(ActivitySignAwardSet activitySignAwardSet : activitySignAwardSets) { |
| | | activitySignAwardSet.setCreateBy(user.getSuName()); |
| | | activitySignAwardSet.setCreateTime(new Date()); |
| | | activitySignAwardSet.setUpdateTime(new Date()); |
| | | activitySignAwardSet.setUpdateBy(user.getSuName()); |
| | | activitySignAwardSet.setCompanyId(companyId); |
| | | activitySignAwardSet.setActivityId(shopActivities.getId()); |
| | | activitySignAwardSet.setAwardState(ActivitySignAwardSet.AWARDSTATE_WORK); |
| | | activitySignAwardSetDao.insert(activitySignAwardSet); |
| | | } |
| | | //生成中奖顺序 |
| | | |
| | | Long actId = shopActivities.getId(); |
| | | List<ActivitySignAwardSet> activitySignAwardSetList = activitySignAwardSetDao |
| | | .selectActivitySignAwardSetByActIDAndCompanyIdAndAwardType(actId, companyId, ActivitySignAwardSet.AWARDSTATE_WORK,ActivitySignAwardSet.AWARDRULE_CUMULATIVEDAY); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSetList)){ |
| | | String awrdList = getAwrdList(activitySignAwardSets).toString(); |
| | | ShopActivities shopActivitiesAward = shopActivitiesDao.selectById(actId); |
| | | String actContent = shopActivitiesAward.getActContent(); |
| | | LuckyDrawAwardCodeListVo luckyDrawAwardCodeListVo = JSON.parseObject(actContent, LuckyDrawAwardCodeListVo.class); |
| | | luckyDrawAwardCodeListVo.setAwardLine(awrdList); |
| | | luckyDrawAwardCodeListVo.setAwrdLineIndex(0); |
| | | String awardJson= JSON.toJSONString(luckyDrawAwardCodeListVo); |
| | | shopActivitiesAward.setActContent(awardJson); |
| | | shopActivitiesDao.updateByModel(shopActivitiesAward); |
| | | } |
| | | } |
| | | }else{ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "保存失败"); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功"); |
| | | } |
| | | |
| | | //所有奖品ID后的集合 |
| | | public List getAwrdList(List<ActivitySignAwardSet> activitySignAwardSets){ |
| | | //插入所有奖品ID后的集合 |
| | | LinkedList awardIdFinalList = new LinkedList<>(); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSets)){ |
| | | //总数 |
| | | int maxCount = 0; |
| | | HashMap<Long, ActivitySignAwardSet> integerStringHashMap = new HashMap<>(); |
| | | for(ActivitySignAwardSet activitySignAwardSet : activitySignAwardSets){ |
| | | //总共派发数量 |
| | | int awardInventoryCnt = activitySignAwardSet.getAwardInventoryCnt(); |
| | | integerStringHashMap.put(activitySignAwardSet.getId(),activitySignAwardSet); |
| | | maxCount = maxCount + awardInventoryCnt; |
| | | } |
| | | HashMap<Long, ActivitySignAwardSet> sortHashMap = sortHashMap(integerStringHashMap,2); |
| | | HashMap<Long, ActivitySignAwardSet> sortHashMapAec = sortHashMap(integerStringHashMap,1); |
| | | //获取奖品最多的ID |
| | | Long maxAwardIds = sortHashMap.keySet().stream().findFirst().get(); |
| | | Long minAwardIds = sortHashMapAec.keySet().stream().findFirst().get(); |
| | | //获取最大长度的奖品集合 |
| | | List awardIdList = new LinkedList<Long>(); |
| | | for(int i = 0; i< maxCount ; i++){ |
| | | awardIdList.add(maxAwardIds); |
| | | } |
| | | |
| | | Iterator<Map.Entry<Long, ActivitySignAwardSet>> entries = sortHashMap.entrySet().iterator(); |
| | | //插入奖品 |
| | | while (entries.hasNext()) { |
| | | Map.Entry<Long, ActivitySignAwardSet> entry = entries.next(); |
| | | ActivitySignAwardSet activitySignAwardSetDone = entry.getValue(); |
| | | int awardInventoryCnt = activitySignAwardSetDone.getAwardInventoryCnt(); |
| | | Long awardIdNew = entry.getKey(); |
| | | if(awardIdNew != maxAwardIds){ |
| | | //分段之后的List |
| | | List splitLists = getSplitList(awardInventoryCnt, awardIdList); |
| | | for(int j = 0; j<awardInventoryCnt; j++){ |
| | | List splitList = (List) splitLists.get(j); |
| | | //中间插入对应的奖品ID,如果和maxAwardIds相同,则索引+1 |
| | | List<Long> listInsert = getListInsert(maxAwardIds, awardIdNew, splitList); |
| | | if(minAwardIds == awardIdNew){ |
| | | awardIdFinalList.addAll(listInsert); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | return awardIdFinalList; |
| | | } |
| | | |
| | | //中间插入对应的奖品ID,如果和maxAwardIds相同,则索引+1 |
| | | public static List<Long> getListInsert(Long awardOld,Long awardNew,List splitList){ |
| | | //中间位置索引 |
| | | LinkedList<Integer> indexs = new LinkedList<>(); |
| | | int groupFlag = splitList.size() % 2 == 0 ? (splitList.size() / 2) : (splitList.size() / 2 + 1); |
| | | for(int j = groupFlag-1; j < splitList.size();j++){ |
| | | if(splitList.get(j) == awardOld){ |
| | | indexs.add(j); |
| | | } |
| | | } |
| | | if(CollUtil.isNotEmpty(indexs)){ |
| | | splitList.set(indexs.get(0),awardNew); |
| | | }else{ |
| | | splitList.add(groupFlag,awardNew); |
| | | } |
| | | return splitList; |
| | | } |
| | | |
| | | //等份平分数组,最后剩余的添加到倒数第二个集合中 |
| | | public static List<List<Long>> getSplitList(int splitNum, List<Long> list) { |
| | | LinkedList<List<Long>> splitList = new LinkedList<>(); |
| | | // groupFlag >= 1 |
| | | int groupFlag = list.size() % splitNum == 0 ? (list.size() / splitNum) : (list.size() / splitNum); |
| | | if(groupFlag * splitNum < list.size()){ |
| | | for (int j = 1; j <= splitNum +1; j++) { |
| | | if ((j * groupFlag) <= list.size() ) { |
| | | splitList.add(list.subList(j * groupFlag - groupFlag, j * groupFlag)); |
| | | } else if ((j * groupFlag) > list.size()) { |
| | | splitList.add(list.subList(j * groupFlag - groupFlag, list.size())); |
| | | } |
| | | } |
| | | }else if(groupFlag * splitNum > list.size()){ |
| | | for (int j = 1; j < splitNum; j++) { |
| | | if ((j * groupFlag) <= list.size() ) { |
| | | splitList.add(list.subList(j * groupFlag - groupFlag, j * groupFlag)); |
| | | } else if ((j * groupFlag) > list.size()) { |
| | | splitList.add(list.subList(j * groupFlag - groupFlag, list.size())); |
| | | } |
| | | } |
| | | }else{ |
| | | for (int j = 1; j <= splitNum; j++) { |
| | | if ((j * groupFlag) <= list.size() ) { |
| | | splitList.add(list.subList(j * groupFlag - groupFlag, j * groupFlag)); |
| | | } else if ((j * groupFlag) > list.size()) { |
| | | splitList.add(list.subList(j * groupFlag - groupFlag, list.size())); |
| | | } |
| | | } |
| | | } |
| | | return splitList; |
| | | } |
| | | |
| | | |
| | | //对于奖品排序 1:升序进行排,2是倒序就是o2-o1 |
| | | public static HashMap<Long, ActivitySignAwardSet> sortHashMap(HashMap<Long, ActivitySignAwardSet> map,int type) { |
| | | // 首先拿到 map 的键值对集合 |
| | | Set<Map.Entry<Long, ActivitySignAwardSet>> entrySet = map.entrySet(); |
| | | // 将 set 集合转为 List 集合,为什么,为了使用工具类的排序方法 |
| | | List<Map.Entry<Long, ActivitySignAwardSet>> list = new ArrayList<Map.Entry<Long, ActivitySignAwardSet>>(entrySet); |
| | | // 使用 Collections 集合工具类对 list 进行排序,排序规则使用匿名内部类来实现 |
| | | Collections.sort(list, new Comparator<Map.Entry<Long, ActivitySignAwardSet>>() { |
| | | @Override |
| | | public int compare(Map.Entry<Long, ActivitySignAwardSet> o1, Map.Entry<Long, ActivitySignAwardSet> o2) { |
| | | if(type == 2){ |
| | | //按照要求根据 升序进行排,如果是倒序就是o2-o1 |
| | | return o2.getValue().getAwardInventoryCnt() - o1.getValue().getAwardInventoryCnt(); |
| | | } |
| | | return o1.getValue().getAwardInventoryCnt() - o2.getValue().getAwardInventoryCnt(); |
| | | } |
| | | }); |
| | | //创建一个新的有序的 HashMap 子类的集合 |
| | | LinkedHashMap<Long, ActivitySignAwardSet> linkedHashMap = new LinkedHashMap<Long, ActivitySignAwardSet>(); |
| | | //将 List 中的数据存储在 LinkedHashMap 中 |
| | | for (Map.Entry<Long, ActivitySignAwardSet> entry : list) { |
| | | linkedHashMap.put(entry.getKey(), entry.getValue()); |
| | | } |
| | | //返回结果 |
| | | return linkedHashMap; |
| | | } |
| | | |
| | | /** |
| | | *进入修改 |
| | | */ |
| | | @ApiOperation(value = "进入修改") |
| | | @PostMapping(value = "/findLuckyDrawForUpdate") |
| | | public @ResponseBody |
| | | AjaxResult findLuckyDrawForUpdate(@RequestBody LuckyDrawForUpdateDto luckyDrawForUpdateDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(luckyDrawForUpdateDto); |
| | | Long actId = luckyDrawForUpdateDto.getActId(); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | //获取对应的活动主表信息和对应的奖品设置信息 |
| | | AddLuckyDrawSetVo addLuckyDrawSetVo = new AddLuckyDrawSetVo(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | if(ObjectUtil.isNotEmpty(shopActivity)) { |
| | | addLuckyDrawSetVo.setId(actId); |
| | | addLuckyDrawSetVo.setActName(shopActivity.getActName()); |
| | | addLuckyDrawSetVo.setActCode(shopActivity.getActCode()); |
| | | addLuckyDrawSetVo.setBeginTime(shopActivity.getActBeginTime()); |
| | | addLuckyDrawSetVo.setEndTime(shopActivity.getActEndTime()); |
| | | |
| | | String actContent = shopActivity.getActContent(); |
| | | LuckyDrawBasicJsonVo luckyDrawBasicJsonVo = JSON.parseObject(actContent, LuckyDrawBasicJsonVo.class); |
| | | addLuckyDrawSetVo.setLuckyDrawBasicJsonVo(luckyDrawBasicJsonVo); |
| | | |
| | | Map<String, Object> columnMap = new HashMap<String, Object>(); |
| | | columnMap.put("activity_id", actId); |
| | | columnMap.put("company_id", luckyDrawForUpdateDto.getCompanyId()); |
| | | List<ActivitySignAwardSet> activityAwardSets = activitySignAwardSetDao.selectByMap(columnMap); |
| | | addLuckyDrawSetVo.setActivityluckyDrawSets(activityAwardSets); |
| | | } |
| | | result.putInMap("addLuckyDrawSetVo", addLuckyDrawSetVo); |
| | | return result; |
| | | } |
| | | /** |
| | | * 保存 |
| | | */ |
| | | @PostMapping(value = "/updateLuckyDrawSet") |
| | | public @ResponseBody |
| | | AjaxResult updateLuckyDrawSet(@RequestBody UpdateLuckyDrawSetDto updateLuckyDrawSetDto) { |
| | | //获取当前登录人员信息 |
| | | QueryUtil.setQueryLimitCom(updateLuckyDrawSetDto); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long actId = updateLuckyDrawSetDto.getActMainId(); |
| | | Long companyId = user.getCompanyId(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | //更新活动主表信息 |
| | | shopActivity.setActName(updateLuckyDrawSetDto.getActName()); |
| | | shopActivity.setActCode(updateLuckyDrawSetDto.getActCode()); |
| | | shopActivity.setActBeginTime(updateLuckyDrawSetDto.getBeginTime()); |
| | | shopActivity.setActEndTime(updateLuckyDrawSetDto.getEndTime()); |
| | | shopActivity.setCompanyId(companyId); |
| | | shopActivity.setCreateBy(user.getSuName()); |
| | | shopActivity.setUpdateBy(user.getSuName()); |
| | | //将基本信息转换成JSON字符串存储到活动主表的act_content字段 |
| | | LuckyDrawBasicJsonDto luckyDrawBasicJsonDto = updateLuckyDrawSetDto.getLuckyDrawBasicJsonDto(); |
| | | String json=JSON.toJSONString(luckyDrawBasicJsonDto); |
| | | shopActivity.setActContent(json); |
| | | shopActivitiesDao.updateByModel(shopActivity); |
| | | /** |
| | | * 比较两个奖品名单,多的新增,减少的更新为已失效,不变的更新 |
| | | */ |
| | | //原有的奖品 |
| | | ArrayList<Long> arrayListOld = new ArrayList<>(); |
| | | Map<String, Object> columnMap = new HashMap<String, Object>(); |
| | | columnMap.put("activity_id", actId); |
| | | columnMap.put("company_id", updateLuckyDrawSetDto.getCompanyId()); |
| | | List<ActivitySignAwardSet> activitySignAwardSetOld = activitySignAwardSetDao.selectByMap(columnMap); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSetOld)) { |
| | | for(ActivitySignAwardSet activitySignAwardSetUpdate : activitySignAwardSetOld) { |
| | | Long actSubid = activitySignAwardSetUpdate.getId(); |
| | | arrayListOld.add(actSubid); |
| | | } |
| | | } |
| | | //修改后的奖品 |
| | | List<ActivitySignAwardSet> activitySignAwardSetsUpdate = updateLuckyDrawSetDto.getActivityAwardSets(); |
| | | ArrayList<Long> arrayListUpdate = new ArrayList<>(); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSetsUpdate)) { |
| | | for(ActivitySignAwardSet activitySignAwardSetUpdate : activitySignAwardSetsUpdate) { |
| | | Long actSubid = activitySignAwardSetUpdate.getId(); |
| | | //如果ID为空则新增,不为空则修改 |
| | | if(ObjectUtil.isEmpty(actSubid)) { |
| | | activitySignAwardSetUpdate.setCreateBy(user.getSuName()); |
| | | activitySignAwardSetUpdate.setCreateTime(new Date()); |
| | | activitySignAwardSetUpdate.setUpdateTime(new Date()); |
| | | activitySignAwardSetUpdate.setUpdateBy(user.getSuName()); |
| | | activitySignAwardSetUpdate.setCompanyId(companyId); |
| | | activitySignAwardSetUpdate.setActivityId(actId); |
| | | activitySignAwardSetUpdate.setAwardState(ActivitySignAwardSet.AWARDSTATE_WORK); |
| | | activitySignAwardSetDao.insert(activitySignAwardSetUpdate); |
| | | }else { |
| | | activitySignAwardSetUpdate.setAwardState(ActivitySignAwardSet.AWARDSTATE_WORK); |
| | | activitySignAwardSetDao.updateById(activitySignAwardSetUpdate); |
| | | arrayListUpdate.add(actSubid); |
| | | } |
| | | } |
| | | } |
| | | //比较获取原来的比现在多出来的奖品,修改状态为失效 |
| | | boolean removeAll = arrayListOld.removeAll(arrayListUpdate); |
| | | if(removeAll && CollUtil.isNotEmpty(arrayListOld)) { |
| | | for(long id : arrayListOld) { |
| | | ActivitySignAwardSet activitySignAwardSetDel = activitySignAwardSetDao.selectById(id); |
| | | activitySignAwardSetDel.setAwardState(ActivitySignAwardSet.AWARDSTATE_UNWORK); |
| | | activitySignAwardSetDao.updateById(activitySignAwardSetDel); |
| | | } |
| | | } |
| | | |
| | | //生成中奖顺序 |
| | | List<ActivitySignAwardSet> activitySignAwardSetList = activitySignAwardSetDao |
| | | .selectActivitySignAwardSetByActIDAndCompanyIdAndAwardType(actId, companyId, ActivitySignAwardSet.AWARDSTATE_WORK,ActivitySignAwardSet.AWARDRULE_CUMULATIVEDAY); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSetList)){ |
| | | String awrdList = getAwrdList(activitySignAwardSetList).toString(); |
| | | ShopActivities shopActivitiesAward = shopActivitiesDao.selectById(actId); |
| | | String actContent = shopActivitiesAward.getActContent(); |
| | | LuckyDrawAwardCodeListVo luckyDrawAwardCodeListVo = JSON.parseObject(actContent, LuckyDrawAwardCodeListVo.class); |
| | | luckyDrawAwardCodeListVo.setAwardLine(awrdList); |
| | | luckyDrawAwardCodeListVo.setAwrdLineIndex(0); |
| | | String awardJson= JSON.toJSONString(luckyDrawAwardCodeListVo); |
| | | shopActivitiesAward.setActContent(awardJson); |
| | | shopActivitiesDao.updateByModel(shopActivitiesAward); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功"); |
| | | } |
| | | |
| | | public IPage<ActivitiesListVo> findActivitiesList(Page<ActivitiesListVo> page, |
| | | ActivitiesListDto activitiesListDto) { |
| | | return shopActivitiesDao.findActivitiesList(page,activitiesListDto); |
| | | } |
| | | |
| | | /** |
| | | * 马上创建签到活动 |
| | | */ |
| | | @PostMapping(value = "/createSignAwardSet") |
| | | public @ResponseBody |
| | | AjaxResult createSignAwardSet() { |
| | | //获取当前登录人员信息 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | //签到活动的唯一性 |
| | | List<ShopActivities> shopActivitiesDone = shopActivitiesDao.selectOneByCompanyIdAndActType(companyId,ShopActivities.ACTIVITIES_TYPE_SIGN); |
| | | if(CollUtil.isNotEmpty(shopActivitiesDone)){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "签到活动已经创建,请去活动管理菜单查看"); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, ""); |
| | | } |
| | | |
| | | /** |
| | | * 新增签到活动 |
| | | */ |
| | | @PostMapping(value = "/addSignAwardSet") |
| | | public @ResponseBody |
| | | AjaxResult addSignAwardSet(@RequestBody AddSignAwardSetDto addSignAwardSetDto) { |
| | | return activitySignAwardSetService.activitySignAwardSetService(addSignAwardSetDto); |
| | | } |
| | | |
| | | /** |
| | | * 查询优惠券 |
| | | */ |
| | | @ApiOperation(value = "查询优惠券") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = CouponVo.class) |
| | | }) |
| | | @PostMapping(value = "/selectCouponList") |
| | | public @ResponseBody |
| | | AjaxResult selectCouponList(@RequestBody CouponDto couponDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(couponDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(couponDto.getSort())){ |
| | | couponDto.setSort("create_time"); |
| | | couponDto.setOrder("desc"); |
| | | } |
| | | Page<CouponVo> page = new Page(couponDto.getPageNum(), couponDto.getPageSize()); |
| | | IPage<CouponVo> rows = activitySignAwardSetService.selectCouponList(page,couponDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询商品 |
| | | */ |
| | | @ApiOperation(value = "查询商品") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = GoodsVo.class) |
| | | }) |
| | | @PostMapping(value = "/selectGoodsList") |
| | | public @ResponseBody |
| | | AjaxResult selectGoodsList(@RequestBody GoodsDto goodsDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(goodsDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(goodsDto.getSort())){ |
| | | goodsDto.setSort("create_time"); |
| | | goodsDto.setOrder("desc"); |
| | | } |
| | | Page<GoodsVo> page = new Page(goodsDto.getPageNum(), goodsDto.getPageSize()); |
| | | IPage<GoodsVo> rows = activitySignAwardSetService.selectGoodsList(page,goodsDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 查询活动列表 |
| | | */ |
| | | @ApiOperation(value = "查询活动列表") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = ActivitiesListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findActivitiesList") |
| | | public @ResponseBody |
| | | AjaxResult findActivitiesList(@RequestBody ActivitiesListDto activitiesListDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(activitiesListDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(activitiesListDto.getSort())){ |
| | | activitiesListDto.setSort("create_time"); |
| | | activitiesListDto.setOrder("desc"); |
| | | } |
| | | Page<ActivitiesListVo> page = new Page(activitiesListDto.getPageNum(), activitiesListDto.getPageSize()); |
| | | IPage<ActivitiesListVo> rows = activitySignAwardSetService.findActivitiesList(page,activitiesListDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *发布 |
| | | */ |
| | | @ApiOperation(value = "发布") |
| | | @PostMapping(value = "/beReady") |
| | | public @ResponseBody |
| | | AjaxResult beReady(@RequestBody BeReadyDto beReadyDto) { |
| | | return activitySignAwardSetService.beReady(beReadyDto); |
| | | } |
| | | |
| | | /** |
| | | *删除 |
| | | */ |
| | | @ApiOperation(value = "删除") |
| | | @PostMapping(value = "/delRow") |
| | | public @ResponseBody |
| | | AjaxResult delRow(@RequestBody DelRowDto delRowDto) { |
| | | return activitySignAwardSetService.delRow(delRowDto); |
| | | } |
| | | |
| | | /** |
| | | *关闭 |
| | | */ |
| | | @ApiOperation(value = "关闭") |
| | | @PostMapping(value = "/beClose") |
| | | public @ResponseBody |
| | | AjaxResult beClose(@RequestBody BeCloseDto beCloseDto) { |
| | | return activitySignAwardSetService.beClose(beCloseDto); |
| | | } |
| | | |
| | | /** |
| | | * 活动统计 |
| | | */ |
| | | @ApiOperation(value = "活动统计") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = SignReceiveListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findSignReceiveList") |
| | | public @ResponseBody |
| | | AjaxResult findSignReceiveList(@RequestBody SignReceiveListDto signReceiveListDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(signReceiveListDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(signReceiveListDto.getSort())){ |
| | | signReceiveListDto.setSort("create_time"); |
| | | signReceiveListDto.setOrder("desc"); |
| | | } |
| | | Page<SignReceiveListVo> page = new Page(signReceiveListDto.getPageNum(), signReceiveListDto.getPageSize()); |
| | | IPage<SignReceiveListVo> rows = activitySignAwardSetService.findSignReceiveList(page,signReceiveListDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *进入修改 |
| | | */ |
| | | @ApiOperation(value = "进入修改") |
| | | @PostMapping(value = "/findSignForUpdate") |
| | | public @ResponseBody |
| | | AjaxResult findSignForUpdate(@RequestBody SignForUpdateDto signForUpdateDto) { |
| | | return activitySignAwardSetService.findSignForUpdate(signForUpdateDto); |
| | | } |
| | | |
| | | /** |
| | | * 保存 |
| | | */ |
| | | @PostMapping(value = "/updateSignAwardSet") |
| | | public @ResponseBody |
| | | AjaxResult updateSignAwardSet(@RequestBody UpdateSignAwardSetDto updateSignAwardSetDto) { |
| | | return activitySignAwardSetService.updateSignAwardSet(updateSignAwardSetDto); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.action; |
| | | import com.matrix.system.activity.service.ActivitySignReceiveRecordService; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | /** |
| | | * @description 领取记录表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "admin/activitySignReceiveRecord") |
| | | public class ActivitySignReceiveRecordAction { |
| | | |
| | | @Autowired |
| | | private ActivitySignReceiveRecordService activitySignReceiveRecordService; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.action; |
| | | |
| | | import com.matrix.system.activity.service.ActivitySignRecordService; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | |
| | | /** |
| | | * @description 签到记录表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "admin/activitySignRecord") |
| | | public class ActivitySignRecordAction { |
| | | |
| | | @Autowired |
| | | private ActivitySignRecordService activitySignRecordService; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.action; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.activity.dto.LogisticsSubmitDto; |
| | | import com.matrix.system.activity.dto.SignWriteoffDto; |
| | | import com.matrix.system.activity.dto.SignWriteoffListDto; |
| | | import com.matrix.system.activity.dto.WriteoffCodeSubmitDto; |
| | | import com.matrix.system.activity.service.ActivitySignWriteoffService; |
| | | import com.matrix.system.activity.vo.SignWriteoffListVo; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | /** |
| | | * @description 核销记录 |
| | | * @author yourName |
| | | * @date 2021-04-08 14:25 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "admin/activitySignWriteoff") |
| | | public class ActivitySignWriteoffAction { |
| | | |
| | | @Autowired |
| | | private ActivitySignWriteoffService activitySignWriteoffService; |
| | | |
| | | /** |
| | | * 核销记录 |
| | | */ |
| | | @ApiOperation(value = "核销记录") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = SignWriteoffListVo.class) |
| | | }) |
| | | @PostMapping(value = "/findSignWriteoffList") |
| | | public @ResponseBody |
| | | AjaxResult findSignWriteoffList(@RequestBody SignWriteoffListDto signWriteoffListDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(signWriteoffListDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(signWriteoffListDto.getSort())){ |
| | | signWriteoffListDto.setSort("create_time"); |
| | | signWriteoffListDto.setOrder("desc"); |
| | | } |
| | | Page<SignWriteoffListVo> page = new Page(signWriteoffListDto.getPageNum(), signWriteoffListDto.getPageSize()); |
| | | IPage<SignWriteoffListVo> rows = activitySignWriteoffService.findSignWriteoffList(page,signWriteoffListDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *中奖信息 |
| | | */ |
| | | @ApiOperation(value = "中奖信息") |
| | | @PostMapping(value = "/findSignWriteoff") |
| | | public @ResponseBody |
| | | AjaxResult findSignWriteoff(@RequestBody SignWriteoffDto signWriteoffDto) { |
| | | return activitySignWriteoffService.findSignWriteoff(signWriteoffDto); |
| | | } |
| | | |
| | | /** |
| | | *核销验证 |
| | | */ |
| | | @ApiOperation(value = "核销验证") |
| | | @PostMapping(value = "/writeoffCodeSubmit") |
| | | public @ResponseBody |
| | | AjaxResult writeoffCodeSubmit(@RequestBody WriteoffCodeSubmitDto writeoffCodeSubmitDto) { |
| | | return activitySignWriteoffService.writeoffCodeSubmit(writeoffCodeSubmitDto); |
| | | } |
| | | |
| | | /** |
| | | *物流发货 |
| | | */ |
| | | @ApiOperation(value = "物流发货") |
| | | @PostMapping(value = "/logisticsSubmit") |
| | | public @ResponseBody |
| | | AjaxResult logisticsSubmit(@RequestBody LogisticsSubmitDto logisticsSubmitDto) { |
| | | return activitySignWriteoffService.logisticsSubmit(logisticsSubmitDto); |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.constant; |
| | | |
| | | public class ActivitySignConstant { |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dao; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import com.matrix.system.shopXcx.api.vo.ActivitySignAwardSetVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 奖品设置表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | public interface ActivitySignAwardSetDao extends BaseMapper<ActivitySignAwardSet>{ |
| | | |
| | | List<ActivitySignAwardSetVo> selectListByActIDAndCompanyId(@Param("actId")Long actId, @Param("companyId")Long companyId,@Param("awardState")int awardstateWork); |
| | | |
| | | List<ActivitySignAwardSetVo> selectListByActIDAndCompanyIdAndAwardType(@Param("actId")Long actId, @Param("companyId")Long companyId |
| | | ,@Param("awardState")int awardstateWork,@Param("awardRule")int awardRule); |
| | | |
| | | List<ActivitySignAwardSet> selectActivitySignAwardSetByActIDAndCompanyIdAndAwardType(@Param("actId")Long actId, @Param("companyId")Long companyId |
| | | ,@Param("awardState")int awardstateWork,@Param("awardRule")int awardRule); |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dao; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.activity.dto.CouponDto; |
| | | import com.matrix.system.activity.dto.GoodsDto; |
| | | import com.matrix.system.activity.dto.SignReceiveListDto; |
| | | import com.matrix.system.activity.entity.ActivitySignReceiveRecord; |
| | | import com.matrix.system.activity.vo.CouponVo; |
| | | import com.matrix.system.activity.vo.GoodsVo; |
| | | import com.matrix.system.activity.vo.SignReceiveListVo; |
| | | import com.matrix.system.shopXcx.api.dto.SeeAwardTextDto; |
| | | import com.matrix.system.shopXcx.api.dto.SignAwardDto; |
| | | import com.matrix.system.shopXcx.api.vo.SeeAwardTextVo; |
| | | import com.matrix.system.shopXcx.api.vo.SignAwardListVo; |
| | | import com.matrix.system.shopXcx.vo.SalesOrderVo; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | public interface ActivitySignReceiveRecordDao extends BaseMapper<ActivitySignReceiveRecord>{ |
| | | |
| | | IPage<SignReceiveListVo> findSignReceiveList(Page<SignReceiveListVo> page, |
| | | @Param("record")SignReceiveListDto signReceiveListDto); |
| | | |
| | | IPage<CouponVo> selectCouponList(Page<CouponVo> page, @Param("record")CouponDto couponDto); |
| | | |
| | | IPage<GoodsVo> selectGoodsList(Page<GoodsVo> page, @Param("record")GoodsDto goodsDto); |
| | | |
| | | int getSignAwardReceiveCount(@Param("userId")Long userId, @Param("companyId")Long companyId); |
| | | |
| | | IPage<SignAwardListVo> selectSignAwardList(Page<SalesOrderVo> page, @Param("record")SignAwardDto signAwardDto); |
| | | |
| | | SeeAwardTextVo selectSeeAwardTextVOById(@Param("record")SeeAwardTextDto seeAwardTextDto); |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dao; |
| | | |
| | | |
| | | import cn.hutool.core.date.DateTime; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.activity.entity.ActivitySignRecord; |
| | | import com.matrix.system.shopXcx.api.vo.ActivitySignRecordVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 签到记录表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | public interface ActivitySignRecordDao extends BaseMapper<ActivitySignRecord>{ |
| | | |
| | | ActivitySignRecord selectOneByActIdAndUserIdLikesignTime(@Param("actId")long actId, |
| | | @Param("userId")Long userId, @Param("format")Date format); |
| | | |
| | | List<ActivitySignRecordVo> selectRecordByMonth(@Param("actId")Long actId, @Param("userId")Long userId, @Param("date") DateTime date); |
| | | |
| | | List<ActivitySignRecord> selectListByActIdAndUserIdLikesignTime(@Param("actId")long actId, |
| | | @Param("userId")Long userId, @Param("format")Date format); |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dao; |
| | | |
| | | |
| | | import com.matrix.system.shopXcx.bean.ShopDeliveryInfo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.activity.dto.SignWriteoffListDto; |
| | | import com.matrix.system.activity.entity.ActivitySignWriteoff; |
| | | import com.matrix.system.activity.vo.SignWriteoffListVo; |
| | | import com.matrix.system.activity.vo.ZjrVo; |
| | | |
| | | /** |
| | | * @description 核销记录 |
| | | * @author yourName |
| | | * @date 2021-04-08 14:25 |
| | | */ |
| | | public interface ActivitySignWriteoffDao extends BaseMapper<ActivitySignWriteoff>{ |
| | | |
| | | IPage<SignWriteoffListVo> findSignWriteoffList(Page<SignWriteoffListVo> page, |
| | | @Param("record")SignWriteoffListDto signWriteoffListDto); |
| | | |
| | | ZjrVo selectUsernameByUserId(@Param("userId")Long userId, @Param("receiveId")Long receiveId); |
| | | |
| | | ShopDeliveryInfo selectShopDeliveryInfoByLogisticsId(@Param("logisticsId")Integer logisticsId); |
| | | |
| | | ActivitySignWriteoff selectActivitySignWriteoffByUserIDAndReceiveId(@Param("userId")Long userId, @Param("receiveId")long receiveId); |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ActivitiesListDto", description = "查询参数") |
| | | public class ActivitiesListDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String hdmc; |
| | | |
| | | @ApiModelProperty(value ="活动状态") |
| | | private Integer hdzt; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "AddLuckyDrawSetDto", description = "查询参数") |
| | | public class AddLuckyDrawSetDto { |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String actCode; |
| | | @ApiModelProperty(value ="活动开始时间") |
| | | private Date beginTime; |
| | | @ApiModelProperty(value ="活动结束时间") |
| | | private Date endTime; |
| | | |
| | | private LuckyDrawBasicJsonDto luckyDrawBasicJsonDto; |
| | | |
| | | private List<ActivitySignAwardSet> luckyDrawAwardSets; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "AddSignAwardSetDto", description = "查询参数") |
| | | public class AddSignAwardSetDto { |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String actCode; |
| | | @ApiModelProperty(value ="活动开始时间") |
| | | private Date beginTime; |
| | | @ApiModelProperty(value ="活动结束时间") |
| | | private Date endTime; |
| | | |
| | | private SignSetBasicJsonDto signSetBasicJsonDto; |
| | | |
| | | private List<ActivitySignAwardSet> activitySignAwardSets; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "BeCloseDto", description = "参数") |
| | | public class BeCloseDto { |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "BeReadyDto", description = "参数") |
| | | public class BeReadyDto { |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "CouponDto", description = "查询参数") |
| | | public class CouponDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String yhjmc; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "DelRowDto", description = "参数") |
| | | public class DelRowDto { |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "GoodsDto", description = "查询参数") |
| | | public class GoodsDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="商品名称") |
| | | private String cpmc; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LogisticsSubmitDto", description = "查询参数") |
| | | public class LogisticsSubmitDto { |
| | | |
| | | @ApiModelProperty(value ="核销ID") |
| | | private long writeoffId; |
| | | |
| | | @ApiModelProperty(value ="收货人") |
| | | private String shr; |
| | | @ApiModelProperty(value ="联系电话") |
| | | private String lxdh; |
| | | @ApiModelProperty(value ="收货地址") |
| | | private String shdz; |
| | | @ApiModelProperty(value ="快递公司Code") |
| | | private String kdgs; |
| | | @ApiModelProperty(value ="快递单号") |
| | | private String kddh; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LuckyDrawBasicJsonDto", description = "查询参数") |
| | | public class LuckyDrawBasicJsonDto { |
| | | |
| | | @ApiModelProperty(value ="头部图片") |
| | | private String imageUrlHead; |
| | | @ApiModelProperty(value ="开始按钮") |
| | | private String imageUrlTitle; |
| | | @ApiModelProperty(value ="转盘背景") |
| | | private String imageUrlButton; |
| | | @ApiModelProperty(value ="状态图片") |
| | | private String imageUrlState; |
| | | @ApiModelProperty(value ="奖品划分线") |
| | | private String imageLine; |
| | | |
| | | @ApiModelProperty(value ="规则内容") |
| | | private String ruleExplain; |
| | | @ApiModelProperty(value ="字体颜色") |
| | | private String typographyColor; |
| | | @ApiModelProperty(value ="背景颜色") |
| | | private String backgroundColor; |
| | | @ApiModelProperty(value ="字体大小") |
| | | private Integer typographyNum; |
| | | @ApiModelProperty(value ="字体透明度") |
| | | private Integer typographyLight; |
| | | |
| | | /** |
| | | * 抽奖规则 |
| | | */ |
| | | //每人每日有10次无门槛抽奖机会 |
| | | private Integer wmkcjjh; |
| | | //可用积分兑换1次抽奖机会, |
| | | private Integer dhycjfs; |
| | | // 每日最多兑换 |
| | | //10 |
| | | //次抽奖机会 |
| | | private Integer jfdhcs; |
| | | // 每人最多可中奖 |
| | | //10 |
| | | //次 |
| | | private Integer zzjcs; |
| | | // 总中奖率 |
| | | //10 |
| | | //% |
| | | private Integer zzjl; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LuckyDrawForUpdateDto", description = "参数") |
| | | public class LuckyDrawForUpdateDto { |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SignForUpdateDto", description = "参数") |
| | | public class SignForUpdateDto { |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SignReceiveListDto", description = "参数") |
| | | public class SignReceiveListDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String yhmc; |
| | | |
| | | @ApiModelProperty(value ="签到开始时间") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty(value ="签到结束时间") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SignSetBasicJsonDto", description = "查询参数") |
| | | public class SignSetBasicJsonDto { |
| | | |
| | | @ApiModelProperty(value ="标题图片") |
| | | private String imageUrlTitle; |
| | | @ApiModelProperty(value ="头部图片") |
| | | private String imageUrlHead; |
| | | @ApiModelProperty(value ="按钮图片") |
| | | private String imageUrlButton; |
| | | @ApiModelProperty(value ="状态图片") |
| | | private String imageUrlState; |
| | | |
| | | @ApiModelProperty(value ="规则内容") |
| | | private String ruleExplain; |
| | | @ApiModelProperty(value ="字体颜色") |
| | | private String typographyColor; |
| | | @ApiModelProperty(value ="背景颜色") |
| | | private String backgroundColor; |
| | | @ApiModelProperty(value ="字体大小") |
| | | private Integer typographyNum; |
| | | @ApiModelProperty(value ="字体透明度") |
| | | private Integer typographyLight; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SignWriteoffDto", description = "查询参数") |
| | | public class SignWriteoffDto { |
| | | |
| | | @ApiModelProperty(value ="核销ID") |
| | | private long writeoffId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SignWriteoffListDto", description = "查询参数") |
| | | public class SignWriteoffListDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="中奖者姓名") |
| | | private String zjzxm; |
| | | |
| | | @ApiModelProperty(value ="活动名称/编码") |
| | | private String hdmcbm; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateLuckyDrawSetDto", description = "查询参数") |
| | | public class UpdateLuckyDrawSetDto { |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String actCode; |
| | | @ApiModelProperty(value ="活动开始时间") |
| | | private Date beginTime; |
| | | @ApiModelProperty(value ="活动结束时间") |
| | | private Date endTime; |
| | | |
| | | private LuckyDrawBasicJsonDto luckyDrawBasicJsonDto; |
| | | |
| | | private List<ActivitySignAwardSet> activityAwardSets; |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actMainId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateSignAwardSetDto", description = "查询参数") |
| | | public class UpdateSignAwardSetDto { |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String actCode; |
| | | @ApiModelProperty(value ="活动开始时间") |
| | | private Date beginTime; |
| | | @ApiModelProperty(value ="活动结束时间") |
| | | private Date endTime; |
| | | |
| | | private SignSetBasicJsonDto signSetBasicJsonDto; |
| | | |
| | | private List<ActivitySignAwardSet> activitySignAwardSets; |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long actMainId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "WriteoffCodeSubmitDto", description = "查询参数") |
| | | public class WriteoffCodeSubmitDto { |
| | | |
| | | @ApiModelProperty(value ="核销ID") |
| | | private long writeoffId; |
| | | |
| | | @ApiModelProperty(value ="兑奖码") |
| | | private String writeOffCode; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description 奖品设置表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @Data |
| | | @TableName("activity_sign_award_set") |
| | | public class ActivitySignAwardSet extends BaseEntity{ |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 奖项类型(1:自定义产品2:积分3:优惠券4:店铺商品) |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="奖项类型(1:自定义产品2:积分3:优惠券4:店铺商品)") |
| | | private int awardType; |
| | | |
| | | |
| | | public static final int AWARDTYPE_CUSTOMIZE = 1; |
| | | public static final int AWARDTYPE_SCORE = 2; |
| | | public static final int AWARDTYPE_COUPON = 3; |
| | | public static final int AWARDTYPE_GOODS = 4; |
| | | |
| | | /** |
| | | * 奖项规则(1:每日奖励(默认)2:累计签到天数) |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="奖项规则(1:每日奖励(默认)2:累计签到天数)") |
| | | private int awardRule; |
| | | |
| | | public static final int AWARDRULE_NORMAL = 1; |
| | | public static final int AWARDRULE_CUMULATIVEDAY = 2; |
| | | |
| | | /** |
| | | * 签到累计天数 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="签到累计天数") |
| | | private int cumulativeDay; |
| | | |
| | | /** |
| | | * 奖项名称 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="奖项名称") |
| | | private String awardName; |
| | | |
| | | /** |
| | | * 图片介绍 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="图片介绍") |
| | | private String introduceImg; |
| | | |
| | | /** |
| | | * 文字介绍 |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="文字介绍") |
| | | private String introduceTip; |
| | | |
| | | /** |
| | | * 奖项库存数量 |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="奖项库存数量") |
| | | private int awardInventoryCnt; |
| | | |
| | | /** |
| | | * 已派发数量 |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="已派发数量") |
| | | private int awardDistributeCnt; |
| | | |
| | | /** |
| | | * 兑奖方式(1:线下兑换2:物流配送3:客服兑换) |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="兑奖方式(1:线下兑换2:物流配送3:客服兑换)") |
| | | private int awardWay; |
| | | public static final int AWARDWAY_ONE = 1; |
| | | public static final int AWARDWAY_TWO = 2; |
| | | public static final int AWARDWAY_THREE = 3; |
| | | |
| | | /** |
| | | * 奖品是否有效(1:有效 2:无效) |
| | | */ |
| | | @ApiModelProperty(value ="奖品是否有效(1:有效 2:无效)") |
| | | private int awardState; |
| | | public static final int AWARDSTATE_WORK = 1; |
| | | public static final int AWARDSTATE_UNWORK = 2; |
| | | |
| | | /** |
| | | * 操作提示 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="操作提示") |
| | | private String operationTip; |
| | | |
| | | /** |
| | | * 兑奖地址 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="兑奖地址") |
| | | private String prizeAddress; |
| | | |
| | | /** |
| | | * 兑奖期限开始日期 |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="兑奖期限开始日期") |
| | | private Date prizeStartTime; |
| | | |
| | | /** |
| | | * 兑奖期限结束日期 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="兑奖期限结束日期") |
| | | private Date prizeEndTime; |
| | | |
| | | /** |
| | | * 客服微信 |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="客服微信") |
| | | private String wechatImg; |
| | | @ApiModelProperty(value ="客服电话") |
| | | private String customerPhone; |
| | | |
| | | /** |
| | | * 积分数量 |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="积分数量") |
| | | private int scoreCnt; |
| | | |
| | | /** |
| | | * 优惠券ID |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="优惠券") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty(value ="优惠券ID") |
| | | private String couponId; |
| | | |
| | | /** |
| | | * 商品ID |
| | | */ |
| | | |
| | | @ApiModelProperty(value ="商品") |
| | | private String goodsName; |
| | | |
| | | @ApiModelProperty(value ="商品ID") |
| | | private String goodsId; |
| | | |
| | | /** |
| | | * 活动主表ID |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="活动主表ID") |
| | | private Long activityId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | @ApiModelProperty(value ="公司ID") |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description 领 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @Data |
| | | @TableName("activity_sign_receive_record") |
| | | public class ActivitySignReceiveRecord extends BaseEntity{ |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * userId |
| | | */ |
| | | |
| | | |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 领取时间 |
| | | */ |
| | | |
| | | |
| | | private Date receiveTime; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | |
| | | |
| | | private String remark; |
| | | |
| | | /** |
| | | * 奖品设置表ID |
| | | */ |
| | | |
| | | |
| | | private Long awardId; |
| | | |
| | | /** |
| | | * 是否已领取(1:待领取2:已领取 3:待配送 4:待收货 5:已失效) |
| | | */ |
| | | |
| | | |
| | | private Integer state; |
| | | |
| | | public static final int STATE_ING = 1; |
| | | public static final int STATE_DONE = 2; |
| | | public static final int STATE_THREE = 3; |
| | | public static final int STATE_FOUR = 4; |
| | | public static final int STATE_FIVE = 5; |
| | | |
| | | /** |
| | | * 核销码 |
| | | */ |
| | | |
| | | |
| | | private String writeOffCode; |
| | | |
| | | /** |
| | | * 活动主表ID |
| | | */ |
| | | |
| | | |
| | | private Long activityId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | private Long companyId; |
| | | |
| | | /** |
| | | * 收货人 |
| | | */ |
| | | private String consignee; |
| | | /** |
| | | * 联系电话 |
| | | */ |
| | | private String consigneePhone; |
| | | /** |
| | | * 收货地址 |
| | | */ |
| | | private String consigneeAddress; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description 签到记录表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @Data |
| | | @TableName("activity_sign_record") |
| | | public class ActivitySignRecord extends BaseEntity{ |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * userId |
| | | */ |
| | | |
| | | |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 签到时间 |
| | | */ |
| | | |
| | | |
| | | private Date signTime; |
| | | |
| | | /** |
| | | * 累计签到天数 |
| | | */ |
| | | |
| | | |
| | | private Integer cumulativeDay; |
| | | |
| | | /** |
| | | * 活动主表ID |
| | | */ |
| | | |
| | | |
| | | private Long activityId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | |
| | | /** |
| | | * @description 核销记录 |
| | | * @author yourName |
| | | * @date 2021-04-08 14:25 |
| | | */ |
| | | @Data |
| | | @TableName("activity_sign_writeoff") |
| | | public class ActivitySignWriteoff extends BaseEntity{ |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 核销时间 |
| | | */ |
| | | |
| | | |
| | | private Date writeoffTime; |
| | | |
| | | /** |
| | | * 核销员 |
| | | */ |
| | | |
| | | |
| | | private String writeoffUser; |
| | | |
| | | /** |
| | | * 兑奖码 |
| | | */ |
| | | |
| | | |
| | | private String writeoffCode; |
| | | |
| | | /** |
| | | * 活动ID |
| | | */ |
| | | |
| | | |
| | | private Long actId; |
| | | |
| | | /** |
| | | * 奖品ID |
| | | */ |
| | | |
| | | |
| | | private Long awardId; |
| | | |
| | | /** |
| | | * 中奖时间 |
| | | */ |
| | | |
| | | |
| | | private Date winTime; |
| | | |
| | | /** |
| | | * 状态(1:待兑换 2:待发货 3:已兑换 4:已失效 ) |
| | | */ |
| | | private Integer state; |
| | | public static final int STATE_ONE = 1; |
| | | public static final int STATE_TWO = 2; |
| | | public static final int STATE_THREE = 3; |
| | | public static final int STATE_FOUR = 4; |
| | | |
| | | /** |
| | | * 中奖者ID |
| | | */ |
| | | |
| | | |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 物流ID |
| | | */ |
| | | |
| | | |
| | | private Integer logisticsId; |
| | | |
| | | /** |
| | | * 中奖记录ID |
| | | */ |
| | | |
| | | |
| | | private Long receiveId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | private Long companyId; |
| | | |
| | | /** |
| | | * 店铺ID |
| | | */ |
| | | |
| | | |
| | | private Long shopId; |
| | | |
| | | /** |
| | | * 核销员ID |
| | | */ |
| | | |
| | | |
| | | private Long writeoffUserid; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.service; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | 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.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.activity.dao.ActivitySignAwardSetDao; |
| | | import com.matrix.system.activity.dao.ActivitySignReceiveRecordDao; |
| | | import com.matrix.system.activity.dto.*; |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import com.matrix.system.activity.vo.ActivitiesListVo; |
| | | import com.matrix.system.activity.vo.AddSignAwardSetVo; |
| | | import com.matrix.system.activity.vo.CouponVo; |
| | | import com.matrix.system.activity.vo.GoodsVo; |
| | | import com.matrix.system.activity.vo.SignReceiveListVo; |
| | | import com.matrix.system.activity.vo.SignSetBasicJsonVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.shopXcx.bean.ShopActivities; |
| | | import com.matrix.system.shopXcx.dao.ShopActivitiesDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @description 奖品设置表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @Service |
| | | public class ActivitySignAwardSetService extends ServiceImpl<ActivitySignAwardSetDao, ActivitySignAwardSet>{ |
| | | |
| | | @Autowired |
| | | private ShopActivitiesDao shopActivitiesDao; |
| | | @Autowired |
| | | private ActivitySignAwardSetDao activitySignAwardSetDao; |
| | | @Autowired |
| | | private ActivitySignReceiveRecordDao activitySignReceiveRecordDao; |
| | | |
| | | @Transactional |
| | | public AjaxResult activitySignAwardSetService(AddSignAwardSetDto addSignAwardSetDto) { |
| | | //获取当前登录人员信息 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | //签到活动的唯一性 |
| | | List<ShopActivities> shopActivitiesDone = shopActivitiesDao.selectOneByCompanyIdAndActType(companyId,ShopActivities.ACTIVITIES_TYPE_SIGN); |
| | | if(CollUtil.isNotEmpty(shopActivitiesDone)){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "签到活动只能创建一次"); |
| | | } |
| | | |
| | | //新增活动主表信息 |
| | | ShopActivities shopActivities = new ShopActivities(); |
| | | shopActivities.setActName(addSignAwardSetDto.getActName()); |
| | | shopActivities.setActCode(addSignAwardSetDto.getActCode()); |
| | | shopActivities.setIsStart(ShopActivities.ACTIVITIES_STATUS_CLOSE); |
| | | shopActivities.setActType(ShopActivities.ACTIVITIES_TYPE_SIGN); |
| | | shopActivities.setActStatus(ShopActivities.ACTSTATUS_STATUS_RELEASE); |
| | | shopActivities.setActBeginTime(addSignAwardSetDto.getBeginTime()); |
| | | shopActivities.setActEndTime(addSignAwardSetDto.getEndTime()); |
| | | shopActivities.setCompanyId(companyId); |
| | | shopActivities.setCreateBy(user.getSuName()); |
| | | shopActivities.setUpdateBy(user.getSuName()); |
| | | //将基本信息转换成JSON字符串存储到活动主表的act_content字段 |
| | | SignSetBasicJsonDto signSetBasicJsonDto = addSignAwardSetDto.getSignSetBasicJsonDto(); |
| | | String json=JSON.toJSONString(signSetBasicJsonDto); |
| | | shopActivities.setActContent(json); |
| | | int insert = shopActivitiesDao.insert(shopActivities); |
| | | if(insert > 0){ |
| | | //新增活动奖品信息 |
| | | List<ActivitySignAwardSet> activitySignAwardSets = addSignAwardSetDto.getActivitySignAwardSets(); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSets)) { |
| | | for(ActivitySignAwardSet activitySignAwardSet : activitySignAwardSets) { |
| | | activitySignAwardSet.setCreateBy(user.getSuName()); |
| | | activitySignAwardSet.setCreateTime(new Date()); |
| | | activitySignAwardSet.setUpdateTime(new Date()); |
| | | activitySignAwardSet.setUpdateBy(user.getSuName()); |
| | | activitySignAwardSet.setCompanyId(companyId); |
| | | activitySignAwardSet.setActivityId(shopActivities.getId()); |
| | | activitySignAwardSet.setAwardState(ActivitySignAwardSet.AWARDSTATE_WORK); |
| | | activitySignAwardSetDao.insert(activitySignAwardSet); |
| | | } |
| | | } |
| | | }else{ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "保存失败"); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功"); |
| | | } |
| | | |
| | | public IPage<ActivitiesListVo> findActivitiesList(Page<ActivitiesListVo> page, |
| | | ActivitiesListDto activitiesListDto) { |
| | | return shopActivitiesDao.findActivitiesList(page,activitiesListDto); |
| | | } |
| | | |
| | | @Transactional |
| | | public AjaxResult beReady(BeReadyDto beReadyDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(beReadyDto); |
| | | Long actId = beReadyDto.getActId(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | if(ObjectUtil.isEmpty(shopActivity)) { |
| | | return AjaxResult.buildFailInstance("网络不通畅,请刷新页面"); |
| | | } |
| | | //未发布状态点击发布,状态变成进行中,且是开启状态 |
| | | shopActivity.setActStatus(ShopActivities.ACTSTATUS_STATUS_ING); |
| | | shopActivity.setIsStart(ShopActivities.ACTIVITIES_STATUS_OPEN); |
| | | shopActivitiesDao.updateByModel(shopActivity); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | |
| | | public AjaxResult delRow(DelRowDto delRowDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(delRowDto); |
| | | Long actId = delRowDto.getActId(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | if(ObjectUtil.isEmpty(shopActivity)) { |
| | | return AjaxResult.buildFailInstance("网络不通畅,请刷新页面"); |
| | | } |
| | | /** |
| | | * 删除状态更新状态为已删除,只能查看活动统计 |
| | | */ |
| | | shopActivity.setActStatus(ShopActivities.ACTSTATUS_STATUS_DEL); |
| | | shopActivity.setIsStart(ShopActivities.ACTIVITIES_STATUS_CLOSE); |
| | | shopActivitiesDao.updateByModel(shopActivity); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | |
| | | public AjaxResult beClose(BeCloseDto beCloseDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(beCloseDto); |
| | | Long actId = beCloseDto.getActId(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | if(ObjectUtil.isEmpty(shopActivity)) { |
| | | return AjaxResult.buildFailInstance("网络不通畅,请刷新页面"); |
| | | } |
| | | /** |
| | | * 关闭状态 |
| | | */ |
| | | shopActivity.setActStatus(ShopActivities.ACTSTATUS_STATUS_END); |
| | | shopActivity.setIsStart(ShopActivities.ACTIVITIES_STATUS_CLOSE); |
| | | shopActivitiesDao.updateByModel(shopActivity); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | |
| | | public IPage<SignReceiveListVo> findSignReceiveList(Page<SignReceiveListVo> page, |
| | | SignReceiveListDto signReceiveListDto) { |
| | | return activitySignReceiveRecordDao.findSignReceiveList(page,signReceiveListDto); |
| | | } |
| | | |
| | | public AjaxResult findSignForUpdate(SignForUpdateDto signForUpdateDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(signForUpdateDto); |
| | | Long actId = signForUpdateDto.getActId(); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | //获取对应的活动主表信息和对应的奖品设置信息 |
| | | AddSignAwardSetVo addSignAwardSetVo = new AddSignAwardSetVo(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | if(ObjectUtil.isNotEmpty(shopActivity)) { |
| | | addSignAwardSetVo.setId(actId); |
| | | addSignAwardSetVo.setActName(shopActivity.getActName()); |
| | | addSignAwardSetVo.setActCode(shopActivity.getActCode()); |
| | | addSignAwardSetVo.setBeginTime(shopActivity.getActBeginTime()); |
| | | addSignAwardSetVo.setEndTime(shopActivity.getActEndTime()); |
| | | |
| | | String actContent = shopActivity.getActContent(); |
| | | SignSetBasicJsonVo signSetBasicJsonVo = JSON.parseObject(actContent, SignSetBasicJsonVo.class); |
| | | addSignAwardSetVo.setSignSetBasicJsonDto(signSetBasicJsonVo); |
| | | |
| | | Map<String, Object> columnMap = new HashMap<String, Object>(); |
| | | columnMap.put("activity_id", actId); |
| | | columnMap.put("company_id", signForUpdateDto.getCompanyId()); |
| | | List<ActivitySignAwardSet> activitySignAwardSets = activitySignAwardSetDao.selectByMap(columnMap); |
| | | addSignAwardSetVo.setActivitySignAwardSets(activitySignAwardSets); |
| | | } |
| | | result.putInMap("addSignAwardSetVo", addSignAwardSetVo); |
| | | return result; |
| | | } |
| | | |
| | | @Transactional |
| | | public AjaxResult updateSignAwardSet(UpdateSignAwardSetDto updateSignAwardSetDto) { |
| | | //获取当前登录人员信息 |
| | | QueryUtil.setQueryLimitCom(updateSignAwardSetDto); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long actId = updateSignAwardSetDto.getActMainId(); |
| | | Long companyId = user.getCompanyId(); |
| | | ShopActivities shopActivity = shopActivitiesDao.selectById(actId); |
| | | //更新活动主表信息 |
| | | shopActivity.setActName(updateSignAwardSetDto.getActName()); |
| | | shopActivity.setActCode(updateSignAwardSetDto.getActCode()); |
| | | shopActivity.setActBeginTime(updateSignAwardSetDto.getBeginTime()); |
| | | shopActivity.setActEndTime(updateSignAwardSetDto.getEndTime()); |
| | | shopActivity.setCompanyId(companyId); |
| | | shopActivity.setCreateBy(user.getSuName()); |
| | | shopActivity.setUpdateBy(user.getSuName()); |
| | | //将基本信息转换成JSON字符串存储到活动主表的act_content字段 |
| | | SignSetBasicJsonDto signSetBasicJsonDto = updateSignAwardSetDto.getSignSetBasicJsonDto(); |
| | | String json=JSON.toJSONString(signSetBasicJsonDto); |
| | | shopActivity.setActContent(json); |
| | | shopActivitiesDao.updateByModel(shopActivity); |
| | | /** |
| | | * 比较两个奖品名单,多的新增,减少的更新为已失效,不变的更新 |
| | | */ |
| | | //原有的奖品 |
| | | ArrayList<Long> arrayListOld = new ArrayList<>(); |
| | | Map<String, Object> columnMap = new HashMap<String, Object>(); |
| | | columnMap.put("activity_id", actId); |
| | | columnMap.put("company_id", updateSignAwardSetDto.getCompanyId()); |
| | | List<ActivitySignAwardSet> activitySignAwardSetOld = activitySignAwardSetDao.selectByMap(columnMap); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSetOld)) { |
| | | for(ActivitySignAwardSet activitySignAwardSetUpdate : activitySignAwardSetOld) { |
| | | Long actSubid = activitySignAwardSetUpdate.getId(); |
| | | arrayListOld.add(actSubid); |
| | | } |
| | | } |
| | | //修改后的奖品 |
| | | List<ActivitySignAwardSet> activitySignAwardSetsUpdate = updateSignAwardSetDto.getActivitySignAwardSets(); |
| | | ArrayList<Long> arrayListUpdate = new ArrayList<>(); |
| | | if(CollUtil.isNotEmpty(activitySignAwardSetsUpdate)) { |
| | | for(ActivitySignAwardSet activitySignAwardSetUpdate : activitySignAwardSetsUpdate) { |
| | | Long actSubid = activitySignAwardSetUpdate.getId(); |
| | | //如果ID为空则新增,不为空则修改 |
| | | if(ObjectUtil.isEmpty(actSubid)) { |
| | | activitySignAwardSetUpdate.setCreateBy(user.getSuName()); |
| | | activitySignAwardSetUpdate.setCreateTime(new Date()); |
| | | activitySignAwardSetUpdate.setUpdateTime(new Date()); |
| | | activitySignAwardSetUpdate.setUpdateBy(user.getSuName()); |
| | | activitySignAwardSetUpdate.setCompanyId(companyId); |
| | | activitySignAwardSetUpdate.setActivityId(actId); |
| | | activitySignAwardSetUpdate.setAwardState(ActivitySignAwardSet.AWARDSTATE_WORK); |
| | | activitySignAwardSetDao.insert(activitySignAwardSetUpdate); |
| | | }else { |
| | | activitySignAwardSetUpdate.setAwardState(ActivitySignAwardSet.AWARDSTATE_WORK); |
| | | activitySignAwardSetDao.updateById(activitySignAwardSetUpdate); |
| | | arrayListUpdate.add(actSubid); |
| | | } |
| | | } |
| | | } |
| | | //比较获取原来的比现在多出来的奖品,修改状态为失效 |
| | | boolean removeAll = arrayListOld.removeAll(arrayListUpdate); |
| | | if(removeAll && CollUtil.isNotEmpty(arrayListOld)) { |
| | | for(long id : arrayListOld) { |
| | | ActivitySignAwardSet activitySignAwardSetDel = activitySignAwardSetDao.selectById(id); |
| | | activitySignAwardSetDel.setAwardState(ActivitySignAwardSet.AWARDSTATE_UNWORK); |
| | | activitySignAwardSetDao.updateById(activitySignAwardSetDel); |
| | | } |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "保存成功"); |
| | | } |
| | | |
| | | public IPage<CouponVo> selectCouponList(Page<CouponVo> page, CouponDto couponDto) { |
| | | return activitySignReceiveRecordDao.selectCouponList(page,couponDto); |
| | | } |
| | | |
| | | public IPage<GoodsVo> selectGoodsList(Page<GoodsVo> page, GoodsDto goodsDto) { |
| | | return activitySignReceiveRecordDao.selectGoodsList(page,goodsDto); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.service; |
| | | |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.matrix.system.activity.dao.ActivitySignReceiveRecordDao; |
| | | import com.matrix.system.activity.entity.ActivitySignReceiveRecord; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @description 领 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @Service |
| | | public class ActivitySignReceiveRecordService extends ServiceImpl<ActivitySignReceiveRecordDao, ActivitySignReceiveRecord>{ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.service; |
| | | |
| | | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.matrix.system.activity.dao.ActivitySignRecordDao; |
| | | import com.matrix.system.activity.entity.ActivitySignRecord; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | |
| | | /** |
| | | * @description 签到记录表 |
| | | * @author yourName |
| | | * @date 2021-03-31 16:57 |
| | | */ |
| | | @Service |
| | | public class ActivitySignRecordService extends ServiceImpl<ActivitySignRecordDao, ActivitySignRecord>{ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.service; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | 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.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.activity.dao.ActivitySignAwardSetDao; |
| | | import com.matrix.system.activity.dao.ActivitySignReceiveRecordDao; |
| | | import com.matrix.system.activity.dao.ActivitySignWriteoffDao; |
| | | import com.matrix.system.activity.dto.LogisticsSubmitDto; |
| | | import com.matrix.system.activity.dto.SignWriteoffDto; |
| | | import com.matrix.system.activity.dto.SignWriteoffListDto; |
| | | import com.matrix.system.activity.dto.WriteoffCodeSubmitDto; |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import com.matrix.system.activity.entity.ActivitySignReceiveRecord; |
| | | import com.matrix.system.activity.entity.ActivitySignWriteoff; |
| | | import com.matrix.system.activity.vo.LogisticsVo; |
| | | import com.matrix.system.activity.vo.SignWriteoffListVo; |
| | | import com.matrix.system.activity.vo.SignWriteoffVo; |
| | | import com.matrix.system.activity.vo.ZjrVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.bean.SystemDictionary; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.SystemDictionaryDao; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.shopXcx.api.service.WxShopLogisticsQueryService; |
| | | import com.matrix.system.shopXcx.bean.ShopActivities; |
| | | import com.matrix.system.shopXcx.bean.ShopDeliveryInfo; |
| | | import com.matrix.system.shopXcx.bean.ShopLogisticsInfo; |
| | | import com.matrix.system.shopXcx.dao.ShopActivitiesDao; |
| | | import com.matrix.system.shopXcx.dao.ShopDeliveryInfoDao; |
| | | import com.matrix.system.shopXcx.dao.ShopLogisticsInfoDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 核销记录 |
| | | * @author yourName |
| | | * @date 2021-04-08 14:25 |
| | | */ |
| | | @Service |
| | | public class ActivitySignWriteoffService extends ServiceImpl<ActivitySignWriteoffDao, ActivitySignWriteoff>{ |
| | | |
| | | @Autowired |
| | | ActivitySignWriteoffDao activitySignWriteoffDao; |
| | | @Autowired |
| | | ShopActivitiesDao shopActivitiesDao; |
| | | @Autowired |
| | | ActivitySignAwardSetDao activitySignAwardSetDao; |
| | | @Autowired |
| | | ActivitySignReceiveRecordDao activitySignReceiveRecordDao; |
| | | @Autowired |
| | | SysVipInfoDao sysVipInfoDao; |
| | | @Autowired |
| | | SystemDictionaryDao systemDictionaryDao; |
| | | @Autowired |
| | | ShopDeliveryInfoDao shopDeliveryInfoDao; |
| | | @Autowired |
| | | ShopLogisticsInfoDao shopLogisticsInfoDao; |
| | | @Autowired |
| | | private WxShopLogisticsQueryService wxShopLogisticsQueryService; |
| | | |
| | | public IPage<SignWriteoffListVo> findSignWriteoffList(Page<SignWriteoffListVo> page, |
| | | SignWriteoffListDto signWriteoffListDto) { |
| | | return activitySignWriteoffDao.findSignWriteoffList(page,signWriteoffListDto); |
| | | } |
| | | |
| | | public AjaxResult findSignWriteoff(SignWriteoffDto signWriteoffDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(signWriteoffDto); |
| | | Long writeoffId = signWriteoffDto.getWriteoffId(); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("成功"); |
| | | //获取核销信息 |
| | | SignWriteoffVo signWriteoffVo = new SignWriteoffVo(); |
| | | ActivitySignWriteoff activitySignWriteoff = activitySignWriteoffDao.selectById(writeoffId); |
| | | if(ObjectUtil.isNotEmpty(activitySignWriteoff)) { |
| | | //获取奖品信息 |
| | | ActivitySignAwardSet activitySignAwardSet = activitySignAwardSetDao.selectById(activitySignWriteoff.getAwardId()); |
| | | signWriteoffVo.setJpmc(activitySignAwardSet.getAwardName()); |
| | | signWriteoffVo.setJptp(activitySignAwardSet.getIntroduceImg()); |
| | | signWriteoffVo.setSl(1); |
| | | signWriteoffVo.setDjfs(activitySignAwardSet.getAwardWay()); |
| | | //获取中奖人信息 |
| | | ZjrVo zjrVo = activitySignWriteoffDao.selectUsernameByUserId(activitySignWriteoff.getUserId(),activitySignAwardSet.getId()); |
| | | signWriteoffVo.setZjr(zjrVo.getZjr()); |
| | | signWriteoffVo.setZjsj(zjrVo.getZjsj()); |
| | | signWriteoffVo.setDjsj(activitySignWriteoff.getWriteoffTime()); |
| | | signWriteoffVo.setState(activitySignWriteoff.getState()); |
| | | //获取活动主表信息 |
| | | ShopActivities shopActivities = shopActivitiesDao.selectById(activitySignWriteoff.getActId()); |
| | | signWriteoffVo.setHdmc(shopActivities.getActName()); |
| | | signWriteoffVo.setHdbh(shopActivities.getActCode()); |
| | | //获取收货地址信息 |
| | | int awardWay = activitySignAwardSet.getAwardWay(); |
| | | if(ActivitySignAwardSet.AWARDWAY_TWO == awardWay) { |
| | | ActivitySignWriteoff activitySignWriteoffLogistics = activitySignWriteoffDao.selectById(writeoffId); |
| | | Long receiveId = activitySignWriteoffLogistics.getReceiveId(); |
| | | ActivitySignReceiveRecord activitySignReceiveRecordLogistic = activitySignReceiveRecordDao.selectById(receiveId); |
| | | signWriteoffVo.setConsignee(activitySignReceiveRecordLogistic.getConsignee()); |
| | | signWriteoffVo.setConsigneePhone(activitySignReceiveRecordLogistic.getConsigneePhone()); |
| | | signWriteoffVo.setConsigneeAddress(activitySignReceiveRecordLogistic.getConsigneeAddress()); |
| | | |
| | | //物流跟踪 |
| | | Integer logisticsId = activitySignWriteoffLogistics.getLogisticsId(); |
| | | ShopDeliveryInfo shopDeliveryInfo = shopDeliveryInfoDao.selectById(logisticsId); |
| | | if(ObjectUtil.isNotEmpty(shopDeliveryInfo)){ |
| | | signWriteoffVo.setLogisticsNum(shopDeliveryInfo.getWaybillNo()); |
| | | signWriteoffVo.setLogisticsCompany(shopDeliveryInfo.getLogisticsCompany()); |
| | | //查看物流信息 |
| | | wxShopLogisticsQueryService.selectLogisticsInfo(shopDeliveryInfo); |
| | | List<ShopLogisticsInfo> shopLogisticsInfos = shopLogisticsInfoDao.selectByDelieryId(shopDeliveryInfo.getId()); |
| | | if(CollUtil.isNotEmpty(shopLogisticsInfos)) { |
| | | ArrayList<LogisticsVo> logisticsVos = new ArrayList<>(); |
| | | for(ShopLogisticsInfo shopLogistics : shopLogisticsInfos) { |
| | | LogisticsVo logisticsVo = new LogisticsVo(); |
| | | logisticsVo.setContent(shopLogistics.getDescribe()); |
| | | logisticsVo.setTimestamp(shopLogistics.getLogisticsTime()); |
| | | logisticsVos.add(logisticsVo); |
| | | } |
| | | signWriteoffVo.setActivities(logisticsVos); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | result.putInMap("signWriteoffVo", signWriteoffVo); |
| | | return result; |
| | | } |
| | | |
| | | @Transactional |
| | | public AjaxResult writeoffCodeSubmit(WriteoffCodeSubmitDto writeoffCodeSubmitDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(writeoffCodeSubmitDto); |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long writeoffId = writeoffCodeSubmitDto.getWriteoffId(); |
| | | String writeOffCode = writeoffCodeSubmitDto.getWriteOffCode(); |
| | | /** |
| | | * 验证核销码是不是匹配 |
| | | * 只能核销一次 |
| | | * 更新核销记录 |
| | | * 更新领取记录 |
| | | */ |
| | | //验证核销码是不是匹配 |
| | | ActivitySignWriteoff activitySignWriteoff = activitySignWriteoffDao.selectById(writeoffId); |
| | | if(ActivitySignWriteoff.STATE_ONE != activitySignWriteoff.getState()){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "兑奖码已失效"); |
| | | } |
| | | if(ObjectUtil.isNotEmpty(activitySignWriteoff)) { |
| | | String writeoffCodeReal = activitySignWriteoff.getWriteoffCode(); |
| | | if(!writeoffCodeReal.equals(writeOffCode)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "兑奖码无效"); |
| | | } |
| | | } |
| | | //线下兑换失效 |
| | | Long awardId = activitySignWriteoff.getAwardId(); |
| | | ActivitySignAwardSet activitySignAwardSet = activitySignAwardSetDao.selectById(awardId); |
| | | if(ActivitySignAwardSet.AWARDWAY_ONE == activitySignAwardSet.getAwardWay() |
| | | || ActivitySignAwardSet.AWARDWAY_THREE == activitySignAwardSet.getAwardWay()){ |
| | | Date prizeStartTime = activitySignAwardSet.getPrizeStartTime(); |
| | | if(DateUtil.date().getTime() < prizeStartTime.getTime()){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "兑奖还没开始呢!"); |
| | | } |
| | | Date prizeEndTime = activitySignAwardSet.getPrizeEndTime(); |
| | | if(DateUtil.date().getTime() > prizeEndTime.getTime()){ |
| | | Long receiveId = activitySignWriteoff.getReceiveId(); |
| | | ActivitySignReceiveRecord activitySignReceiveRecord = activitySignReceiveRecordDao.selectById(receiveId); |
| | | if(ObjectUtil.isNotEmpty(activitySignReceiveRecord)){ |
| | | activitySignReceiveRecord.setState(ActivitySignReceiveRecord.STATE_FIVE); |
| | | } |
| | | activitySignReceiveRecordDao.updateById(activitySignReceiveRecord); |
| | | |
| | | activitySignWriteoff.setState(ActivitySignWriteoff.STATE_FOUR); |
| | | activitySignWriteoffDao.updateById(activitySignWriteoff); |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "已超出兑奖结束时间!"); |
| | | } |
| | | } |
| | | //更新核销记录 |
| | | activitySignWriteoff.setState(ActivitySignWriteoff.STATE_THREE); |
| | | activitySignWriteoff.setWriteoffTime(new Date()); |
| | | activitySignWriteoff.setWriteoffUser(sysUsers.getSuName()); |
| | | activitySignWriteoff.setWriteoffUserid(sysUsers.getSuId()); |
| | | activitySignWriteoffDao.updateById(activitySignWriteoff); |
| | | //更新领取记录 |
| | | ActivitySignReceiveRecord activitySignReceiveRecord = activitySignReceiveRecordDao.selectById(activitySignWriteoff.getReceiveId()); |
| | | activitySignReceiveRecord.setState(ActivitySignReceiveRecord.STATE_DONE); |
| | | activitySignReceiveRecordDao.updateById(activitySignReceiveRecord); |
| | | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "核销成功"); |
| | | } |
| | | |
| | | @Transactional |
| | | public AjaxResult logisticsSubmit(LogisticsSubmitDto logisticsSubmitDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(logisticsSubmitDto); |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long writeoffId = logisticsSubmitDto.getWriteoffId(); |
| | | /** |
| | | * 更新领取记录表的收货信息和状态 |
| | | * 更新核销记录表的状态和物流ID |
| | | */ |
| | | ActivitySignWriteoff activitySignWriteoff = activitySignWriteoffDao.selectById(writeoffId); |
| | | //新增一条物流信息 |
| | | ShopDeliveryInfo shopDeliveryInfo = new ShopDeliveryInfo(); |
| | | Long receiveId = activitySignWriteoff.getReceiveId(); |
| | | SystemDictionary systemDictionary = systemDictionaryDao.selectByCode(logisticsSubmitDto.getKdgs()); |
| | | if (ObjectUtil.isEmpty(systemDictionary)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "没有找到物流公司信息!"); |
| | | } |
| | | shopDeliveryInfo.setUserId(activitySignWriteoff.getUserId()); |
| | | shopDeliveryInfo.setReceiveId(receiveId); |
| | | shopDeliveryInfo.setReceiveAddress(logisticsSubmitDto.getShdz()); |
| | | |
| | | shopDeliveryInfo.setLogisticsCompany(systemDictionary.getName()); |
| | | shopDeliveryInfo.setLogisticsCompanyCode(systemDictionary.getCode()); |
| | | shopDeliveryInfo.setDeliveryWay("物流配送"); |
| | | shopDeliveryInfo.setLogisticsStatus(AppConstance.LOGISTICS_STATUS_OF_RECEIVE); |
| | | |
| | | shopDeliveryInfo.setWaybillNo(logisticsSubmitDto.getKddh()); |
| | | shopDeliveryInfo.setUpdateBy(sysUsers.getSuName()); |
| | | shopDeliveryInfo.setCreateBy(sysUsers.getSuName()); |
| | | |
| | | shopDeliveryInfo.setDeliveryTime(new Date()); |
| | | shopDeliveryInfoDao.insert(shopDeliveryInfo); |
| | | //更新核销记录 |
| | | activitySignWriteoff.setState(ActivitySignWriteoff.STATE_THREE); |
| | | activitySignWriteoff.setWriteoffTime(new Date()); |
| | | activitySignWriteoff.setWriteoffUser(sysUsers.getSuName()); |
| | | activitySignWriteoff.setWriteoffUserid(sysUsers.getSuId()); |
| | | activitySignWriteoff.setLogisticsId(shopDeliveryInfo.getId()); |
| | | activitySignWriteoffDao.updateById(activitySignWriteoff); |
| | | //更新领取记录 |
| | | ActivitySignReceiveRecord activitySignReceiveRecord = activitySignReceiveRecordDao.selectById(receiveId); |
| | | activitySignReceiveRecord.setState(ActivitySignReceiveRecord.STATE_FOUR); |
| | | activitySignReceiveRecord.setConsignee(logisticsSubmitDto.getShr()); |
| | | activitySignReceiveRecord.setConsigneeAddress(logisticsSubmitDto.getShdz()); |
| | | activitySignReceiveRecord.setConsigneePhone(logisticsSubmitDto.getLxdh()); |
| | | activitySignReceiveRecordDao.updateById(activitySignReceiveRecord); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "发货成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class ActivitiesListVo { |
| | | |
| | | /** |
| | | * 活动类型 团购 |
| | | */ |
| | | public static final int ACTIVITIES_TYPE_GROUP = 1; |
| | | |
| | | /** |
| | | * 活动类型 秒杀 |
| | | */ |
| | | public static final int ACTIVITIES_TYPE_SECKILL = 2; |
| | | |
| | | /** |
| | | * 活动类型 沙龙 |
| | | */ |
| | | public static final int ACTIVITIES_TYPE_SALON = 3; |
| | | /** |
| | | * 活动类型 签到 |
| | | */ |
| | | public static final int ACTIVITIES_TYPE_SIGN = 4; |
| | | |
| | | /** |
| | | * 活动状态 开启 |
| | | */ |
| | | public static final int ACTIVITIES_STATUS_OPEN = 1; |
| | | |
| | | /** |
| | | * 活动状态 关闭 |
| | | */ |
| | | public static final int ACTIVITIES_STATUS_CLOSE = 2; |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | |
| | | /** |
| | | * 活动名称 |
| | | */ |
| | | @ApiModelProperty(value = "活动名称") |
| | | private String actName; |
| | | /** |
| | | * 活动编码 |
| | | */ |
| | | @ApiModelProperty(value = "活动编码") |
| | | private String actCode; |
| | | |
| | | |
| | | /** |
| | | * 活动类型 |
| | | */ |
| | | @ApiModelProperty(value = "活动类型") |
| | | private Integer actType; |
| | | |
| | | |
| | | /** |
| | | * 开始时间 |
| | | */ |
| | | @ApiModelProperty(value = "开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date actBeginTime; |
| | | |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value = "结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date actEndTime; |
| | | /** |
| | | * 活动状态 |
| | | */ |
| | | @ApiModelProperty(value = "活动状态") |
| | | private Integer actStatus; |
| | | |
| | | //未发布 |
| | | public static final int ACTSTATUS_STATUS_RELEASE = 1; |
| | | //未开始 |
| | | public static final int ACTSTATUS_STATUS_READY = 2; |
| | | //进行中 |
| | | public static final int ACTSTATUS_STATUS_ING = 3; |
| | | //已结束 |
| | | public static final int ACTSTATUS_STATUS_END = 4; |
| | | @ApiModelProperty(value = "创建人") |
| | | private String createBy; |
| | | /** |
| | | * 活动说明 |
| | | */ |
| | | @ApiModelProperty(value = "活动说明") |
| | | private String actRemark; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class AddLuckyDrawSetVo { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String actCode; |
| | | @ApiModelProperty(value ="活动开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date beginTime; |
| | | @ApiModelProperty(value ="活动结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date endTime; |
| | | |
| | | private LuckyDrawBasicJsonVo luckyDrawBasicJsonVo; |
| | | |
| | | private List<ActivitySignAwardSet> activityluckyDrawSets; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.system.activity.entity.ActivitySignAwardSet; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class AddSignAwardSetVo { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | @ApiModelProperty(value ="活动编码") |
| | | private String actCode; |
| | | @ApiModelProperty(value ="活动开始时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date beginTime; |
| | | @ApiModelProperty(value ="活动结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date endTime; |
| | | |
| | | private SignSetBasicJsonVo signSetBasicJsonDto; |
| | | |
| | | private List<ActivitySignAwardSet> activitySignAwardSets; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class CouponVo { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Integer id; |
| | | |
| | | |
| | | /** |
| | | * 优惠券名称 |
| | | */ |
| | | @ApiModelProperty(value = "优惠券名称") |
| | | private String cName; |
| | | |
| | | /** |
| | | * 结束时间 |
| | | */ |
| | | @ApiModelProperty(value = "结束时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date endTime; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class GoodsVo { |
| | | |
| | | private Long id; |
| | | /** |
| | | * 产品名称 |
| | | */ |
| | | private String name; |
| | | |
| | | /** |
| | | * 商品分类 组合商品/家居产品/项目/充值卡/综合卡 |
| | | */ |
| | | private String goodType; |
| | | |
| | | /** |
| | | * 产品编码 |
| | | */ |
| | | private String code; |
| | | |
| | | /** |
| | | * 售价/本金 |
| | | */ |
| | | private Double sealPice; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class LogisticsVo { |
| | | |
| | | @ApiModelProperty(value ="内容") |
| | | private String content; |
| | | |
| | | @ApiModelProperty(value ="时间戳") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private String timestamp; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class LuckyDrawAwardCodeListVo { |
| | | |
| | | @ApiModelProperty(value ="头部图片") |
| | | private String imageUrlHead; |
| | | @ApiModelProperty(value ="开始按钮") |
| | | private String imageUrlTitle; |
| | | @ApiModelProperty(value ="转盘背景") |
| | | private String imageUrlButton; |
| | | @ApiModelProperty(value ="状态图片") |
| | | private String imageUrlState; |
| | | @ApiModelProperty(value ="奖品划分线") |
| | | private String imageLine; |
| | | |
| | | @ApiModelProperty(value ="规则内容") |
| | | private String ruleExplain; |
| | | @ApiModelProperty(value ="字体颜色") |
| | | private String typographyColor; |
| | | @ApiModelProperty(value ="背景颜色") |
| | | private String backgroundColor; |
| | | @ApiModelProperty(value ="字体大小") |
| | | private Integer typographyNum; |
| | | @ApiModelProperty(value ="字体透明度") |
| | | private Integer typographyLight; |
| | | |
| | | |
| | | //@ApiModelProperty(value ="中奖顺序") |
| | | private String awardLine; |
| | | //@ApiModelProperty(value ="中奖顺序索引") |
| | | private Integer awrdLineIndex; |
| | | |
| | | /** |
| | | * 抽奖规则 |
| | | */ |
| | | //每人每日有10次无门槛抽奖机会 |
| | | private Integer wmkcjjh; |
| | | //可用积分兑换1次抽奖机会, |
| | | private Integer dhycjfs; |
| | | // 每日最多兑换 |
| | | //10 |
| | | //次抽奖机会 |
| | | private Integer jfdhcs; |
| | | // 每人最多可中奖 |
| | | //10 |
| | | //次 |
| | | private Integer zzjcs; |
| | | // 总中奖率 |
| | | //10 |
| | | //% |
| | | private Integer zzjl; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class LuckyDrawBasicJsonVo { |
| | | |
| | | @ApiModelProperty(value ="头部图片") |
| | | private String imageUrlHead; |
| | | @ApiModelProperty(value ="开始按钮") |
| | | private String imageUrlTitle; |
| | | @ApiModelProperty(value ="转盘背景") |
| | | private String imageUrlButton; |
| | | @ApiModelProperty(value ="状态图片") |
| | | private String imageUrlState; |
| | | @ApiModelProperty(value ="奖品划分线") |
| | | private String imageLine; |
| | | |
| | | @ApiModelProperty(value ="规则内容") |
| | | private String ruleExplain; |
| | | @ApiModelProperty(value ="字体颜色") |
| | | private String typographyColor; |
| | | @ApiModelProperty(value ="背景颜色") |
| | | private String backgroundColor; |
| | | @ApiModelProperty(value ="字体大小") |
| | | private Integer typographyNum; |
| | | @ApiModelProperty(value ="字体透明度") |
| | | private Integer typographyLight; |
| | | |
| | | /** |
| | | * 抽奖规则 |
| | | */ |
| | | //每人每日有10次无门槛抽奖机会 |
| | | private Integer wmkcjjh; |
| | | //可用积分兑换1次抽奖机会, |
| | | private Integer dhycjfs; |
| | | // 每日最多兑换 |
| | | //10 |
| | | //次抽奖机会 |
| | | private Integer jfdhcs; |
| | | // 每人最多可中奖 |
| | | //10 |
| | | //次 |
| | | private Integer zzjcs; |
| | | // 总中奖率 |
| | | //10 |
| | | //% |
| | | private Integer zzjl; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class SignReceiveListVo { |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | //活动类型 |
| | | private int actType; |
| | | |
| | | @ApiModelProperty(value = "用户") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty(value = "签到时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date reciveTime; |
| | | |
| | | @ApiModelProperty(value = "连续签到天数") |
| | | private Integer cumulativeDay; |
| | | |
| | | @ApiModelProperty(value = "数量") |
| | | private Integer scoreCnt; |
| | | |
| | | @ApiModelProperty(value = "奖励类型") |
| | | private String awardType; |
| | | |
| | | @ApiModelProperty(value = "获得奖励") |
| | | private String awardName; |
| | | @ApiModelProperty(value = "优惠券名") |
| | | private String couponName; |
| | | |
| | | @ApiModelProperty(value ="奖项规则(1:每日奖励(默认)2:累计签到天数)") |
| | | private int awardRule; |
| | | @ApiModelProperty(value ="是否已领取(1:待领取2:已领取)") |
| | | private int state; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class SignSetBasicJsonVo { |
| | | |
| | | @ApiModelProperty(value ="标题图片") |
| | | private String imageUrlTitle; |
| | | @ApiModelProperty(value ="头部图片") |
| | | private String imageUrlHead; |
| | | @ApiModelProperty(value ="按钮图片") |
| | | private String imageUrlButton; |
| | | @ApiModelProperty(value ="状态图片") |
| | | private String imageUrlState; |
| | | |
| | | @ApiModelProperty(value ="规则内容") |
| | | private String ruleExplain; |
| | | @ApiModelProperty(value ="字体颜色") |
| | | private String typographyColor; |
| | | @ApiModelProperty(value ="背景颜色") |
| | | private String backgroundColor; |
| | | @ApiModelProperty(value ="字体大小") |
| | | private Integer typographyNum; |
| | | @ApiModelProperty(value ="字体透明度") |
| | | private Integer typographyLight; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class SignWriteoffListVo { |
| | | |
| | | |
| | | private Long id; |
| | | |
| | | /** |
| | | * 核销时间 |
| | | */ |
| | | @ApiModelProperty(value ="核销时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date writeoffTime; |
| | | |
| | | /** |
| | | * 核销员 |
| | | */ |
| | | @ApiModelProperty(value ="核销员") |
| | | private String writeoffUser; |
| | | |
| | | /** |
| | | * 兑奖码 |
| | | */ |
| | | @ApiModelProperty(value ="兑奖码") |
| | | private String writeoffCode; |
| | | |
| | | /** |
| | | * 活动名称 |
| | | */ |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String actName; |
| | | |
| | | /** |
| | | * 奖品名称 |
| | | */ |
| | | @ApiModelProperty(value ="奖品名称") |
| | | private String awardName; |
| | | |
| | | /** |
| | | * 中奖时间 |
| | | */ |
| | | @ApiModelProperty(value ="中奖时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date winTime; |
| | | |
| | | /** |
| | | * 状态 |
| | | */ |
| | | @ApiModelProperty(value ="状态(1:待兑换 2:待发货 3:已兑换)") |
| | | private int state; |
| | | |
| | | /** |
| | | * 兑奖方式 |
| | | */ |
| | | @ApiModelProperty(value ="兑奖方式(1:线下兑换2:物流配送3:客服兑换)") |
| | | private int awardWay; |
| | | |
| | | /** |
| | | * 中奖者 |
| | | */ |
| | | @ApiModelProperty(value ="中奖者") |
| | | private String receiveName; |
| | | |
| | | /** |
| | | * 收货地址 |
| | | */ |
| | | @ApiModelProperty(value ="收货地址") |
| | | private String receiveAddress; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class SignWriteoffVo { |
| | | |
| | | @ApiModelProperty(value ="奖品名称") |
| | | private String jpmc; |
| | | |
| | | @ApiModelProperty(value ="奖品图片") |
| | | private String jptp; |
| | | |
| | | @ApiModelProperty(value ="数量") |
| | | private int sl; |
| | | |
| | | @ApiModelProperty(value ="中奖人") |
| | | private String zjr; |
| | | |
| | | @ApiModelProperty(value ="中奖时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date zjsj; |
| | | |
| | | @ApiModelProperty(value ="活动名称") |
| | | private String hdmc; |
| | | |
| | | @ApiModelProperty(value ="活动编号") |
| | | private String hdbh; |
| | | |
| | | @ApiModelProperty(value ="兑奖方式") |
| | | private int djfs; |
| | | |
| | | @ApiModelProperty(value ="兑奖状态") |
| | | private int state; |
| | | |
| | | @ApiModelProperty(value ="兑奖时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date djsj; |
| | | |
| | | @ApiModelProperty(value ="收货人") |
| | | private String consignee; |
| | | |
| | | @ApiModelProperty(value ="联系电话") |
| | | private String consigneePhone; |
| | | |
| | | @ApiModelProperty(value ="收货地址") |
| | | private String consigneeAddress; |
| | | |
| | | @ApiModelProperty(value ="物流单号") |
| | | private String logisticsNum; |
| | | |
| | | @ApiModelProperty(value ="物流公司") |
| | | private String logisticsCompany; |
| | | |
| | | private List<LogisticsVo> activities; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.activity.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | @Data |
| | | public class ZjrVo { |
| | | |
| | | @ApiModelProperty(value ="中奖人") |
| | | private String zjr; |
| | | |
| | | @ApiModelProperty(value ="中奖时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date zjsj; |
| | | |
| | | } |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.component.redis.RedisClient; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.matrix.component.tools.HttpCurlUtil; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.*; |
| | | import com.matrix.system.app.authority.AppAuthorityManager; |
| | | import com.matrix.system.app.dto.LoginDto; |
| | | import com.matrix.system.app.dto.PwdResetDto; |
| | | import com.matrix.system.app.dto.SmsCodeDto; |
| | | import com.matrix.system.app.dto.UploadPhotoDto; |
| | | import com.matrix.system.app.dto.*; |
| | | import com.matrix.system.app.utils.Sms106Send; |
| | | import com.matrix.system.app.vo.UserInfoVo; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | | import com.matrix.system.common.authority.strategy.AccountPasswordLogin; |
| | | import com.matrix.system.common.authority.strategy.LoginStrategy; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.common.service.SysCompanyService; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.PasswordUtil; |
| | | import com.matrix.system.common.tools.UploadUtil; |
| | |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.plugin.util.ImageUtil; |
| | | import com.matrix.system.hive.service.SysShopInfoService; |
| | | import com.matrix.system.shopXcx.api.WeChatApiTools; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import net.sf.json.JSONObject; |
| | | import org.apache.commons.fileupload.FileUploadException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | @RestController |
| | | @RequestMapping(value = "/api/common") |
| | | public class ApiCommonAction { |
| | | @Autowired |
| | | UploadUtil uploadUtil; |
| | | |
| | | |
| | | @Autowired |
| | | private SysUsersService sysUsersService; |
| | |
| | | private AppAuthorityManager authorityManager; |
| | | |
| | | @Autowired |
| | | private RedisClient redisClient; |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | @Autowired |
| | | private SysCompanyService sysCompanyService;; |
| | | |
| | | @Autowired |
| | | WeChatApiTools weChatApiTools; |
| | | |
| | | @Autowired |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | | @Value("${static_resource_url}") |
| | | private String nginxUrl; |
| | | |
| | | @Value("${login_public_key}") |
| | | private String publicKey; |
| | | |
| | | @ApiOperation(value = "登陆接口", notes = "手机端登陆接口") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = UserInfoVo.class) |
| | | }) |
| | | @PostMapping(value = "/login") |
| | | public AjaxResult login(@RequestBody @Validated LoginDto loginDto) { |
| | | public AjaxResult login(@RequestBody @Validated LoginDto loginDto) throws Exception { |
| | | |
| | | SysUsers user = new SysUsers(); |
| | | user.setSuAccount(loginDto.getUsername()); |
| | |
| | | user.setSuPassword(null); |
| | | |
| | | String token = UUIDUtil.getRandomID(); |
| | | redisClient.saveValueForever(token, JSONObject.toJSONString(user)); |
| | | LocalCache.save(token, user); |
| | | |
| | | userInfoVo.setId(user.getSuId()); |
| | | userInfoVo.setName(user.getSuName()); |
| | | userInfoVo.setRoleName(user.getRoleName()); |
| | | userInfoVo.setPhoto(user.getSuPhoto()); |
| | | |
| | | String sb = token + "_1" + "_/api/vip/findVipInfoById/972"; |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("登陆成功"); |
| | | authorityManager.initUserPower(result,user); |
| | | result.putInMap("user", userInfoVo); |
| | | result.putInMap("token", token); |
| | | result.putInMap("rasToken", RSAUtils.encryptByPublicKey(sb, publicKey)); |
| | | return result; |
| | | } |
| | | |
| | |
| | | EXT_LIST.add(FileType.PNG); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "表单图片上传接口", notes = "表单图片上传接口") |
| | | @PostMapping(value = "/uploadImg") |
| | | public AjaxResult uploadImg(HttpServletResponse response, MultipartHttpServletRequest request) |
| | | throws IOException, FileUploadException, NoSuchAlgorithmException { |
| | | Map<String, String> fileMap = UploadUtil.doUpload(request, EXT_LIST, folderType, 1L); |
| | | Map<String, String> fileMap = uploadUtil.doUpload(request, EXT_LIST, folderType, 1L); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("上传成功"); |
| | | ajaxResult.putInMap("file", fileMap.get("visitPath")); |
| | | return ajaxResult; |
| | |
| | | return AjaxResult.buildFailInstance("该手机号不存在"); |
| | | } |
| | | |
| | | String codeExist = redisClient.getCachedValue(smsCodeDto.getTelphone()); |
| | | String codeExist = LocalCache.get(smsCodeDto.getTelphone(),new TypeReference<String>(){}); |
| | | if (StringUtils.isNotBlank(codeExist)) { |
| | | return AjaxResult.buildFailInstance("请勿重复发送验证码"); |
| | | } |
| | | |
| | | Integer code =(int) ((Math.random() * 9 + 1) * 100000); |
| | | Sms106Send.sendVerifyCode(smsCodeDto.getTelphone(), code.toString(), 2); |
| | | redisClient.saveValue(smsCodeDto.getTelphone(), code.toString(), 120); |
| | | LocalCache.save(smsCodeDto.getTelphone(), code.toString(), 120 * 1000); |
| | | return AjaxResult.buildSuccessInstance("发送成功"); |
| | | } |
| | | |
| | |
| | | return AjaxResult.buildFailInstance("该手机号不存在"); |
| | | } |
| | | |
| | | String code = redisClient.getCachedValue(pwdResetDto.getTelphone()); |
| | | String code = LocalCache.get(pwdResetDto.getTelphone(),new TypeReference<String>(){}); |
| | | if (StringUtils.isBlank(code)) { |
| | | return AjaxResult.buildFailInstance("验证码已失效,请重新发送"); |
| | | } |
| | |
| | | |
| | | int i = sysUsersService.updateUserPassword(user.getSuId(), pwd); |
| | | if (i > 0) { |
| | | redisClient.removeObject(pwdResetDto.getTelphone()); |
| | | LocalCache.remove(pwdResetDto.getTelphone()); |
| | | return AjaxResult.buildSuccessInstance("修改成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("修改失败"); |
| | |
| | | public AjaxResult findAppVersion() { |
| | | return AjaxResult.buildSuccessInstance(sysUsersService.findAppVersion()); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "获取api接口地址", notes = "获取api接口地址") |
| | | @GetMapping(value = "/findApiUrl") |
| | | public AjaxResult findApiUrl() { |
| | | List<UrlDto> data = new ArrayList<>(); |
| | | UrlDto urlDto = new UrlDto(); |
| | | urlDto.setUrl("http://myapp.jyymatrix.cc"); |
| | | urlDto.setName("正式环境"); |
| | | data.add(urlDto); |
| | | |
| | | urlDto = new UrlDto(); |
| | | urlDto.setUrl("http://test.hive.jyymatrix.cc"); |
| | | urlDto.setName("测试环境"); |
| | | data.add(urlDto); |
| | | |
| | | urlDto = new UrlDto(); |
| | | urlDto.setUrl("http://hive.mydoline.com"); |
| | | urlDto.setName("美度专线"); |
| | | data.add(urlDto); |
| | | |
| | | urlDto = new UrlDto(); |
| | | urlDto.setUrl("http://localhost:8080"); |
| | | urlDto.setName("开发环境"); |
| | | data.add(urlDto); |
| | | |
| | | return AjaxResult.buildSuccessInstance(data); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "根据企业编码获取对应的请求地址") |
| | | @PostMapping(value = "/getUrlByCompanyCode") |
| | | public AjaxResult getUrlByCompanyCode(@RequestBody SettingDto codeDto) { |
| | | SysCompany query = new SysCompany(); |
| | | query.setComCode(codeDto.getCode()); |
| | | List<SysCompany> list = sysCompanyService.findByModel(query); |
| | | if (CollUtil.isEmpty(list)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "企业编码有误"); |
| | | } |
| | | |
| | | AjaxResult ajaxResult = new AjaxResult(); |
| | | ajaxResult.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | ajaxResult.putInMap("url", list.get(0).getComWebUrl()); |
| | | return ajaxResult; |
| | | } |
| | | |
| | | @ApiOperation(value = "管理端小程序登录") |
| | | @PostMapping(value = "/wxLogin/{code}") |
| | | public AjaxResult wxLogin(@PathVariable("code") String code) throws IOException { |
| | | if (StrUtil.isBlank(code)) { |
| | | return AjaxResult.buildFailInstance("code不存在"); |
| | | } |
| | | AjaxResult res = new AjaxResult(); |
| | | String requrl = weChatApiTools.getManagerXcxLoginUrl(code); |
| | | |
| | | String resultData = HttpCurlUtil.sendGetHttp(requrl, null); |
| | | JSONObject json = JSONObject.fromObject(resultData); |
| | | LogUtil.debug("管理端小程序登录获取到登录信息={}", json); |
| | | |
| | | if (json.containsKey("errcode")) { |
| | | res.setStatus(AjaxResult.STATUS_FAIL); |
| | | res.setInfo("自动登录失败"); |
| | | LogUtil.info("微信登录获取到异常信息errcode"); |
| | | return res; |
| | | } |
| | | |
| | | String openId = json.getString("openid"); |
| | | res.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | res.putInMap("openId", openId); |
| | | SysUsers hasBind = sysUsersService.findByOpenId(openId, HostInterceptor.getCompanyId()); |
| | | if (hasBind == null) { |
| | | res.setInfo("未绑定用户"); |
| | | return res; |
| | | } |
| | | |
| | | String token = userCacheManager.saveUserInfo(hasBind); |
| | | LogUtil.info("用户token={}", token); |
| | | |
| | | authorityManager.initUserPower(res, hasBind); |
| | | |
| | | UserInfoVo userInfoVo = new UserInfoVo(); |
| | | if(hasBind.getShopId()!=null){ |
| | | SysShopInfo shopInfo = sysShopInfoService.findById(hasBind.getShopId()); |
| | | hasBind.setShopName(shopInfo.getShopName()); |
| | | userInfoVo.setShopName(shopInfo.getShopShortName()); |
| | | } |
| | | |
| | | userInfoVo.setId(hasBind.getSuId()); |
| | | userInfoVo.setName(hasBind.getSuName()); |
| | | userInfoVo.setRoleName(hasBind.getRoleName()); |
| | | userInfoVo.setPhoto(hasBind.getSuPhoto()); |
| | | |
| | | res.putInMap("token", token); |
| | | res.putInMap("userInfo", userInfoVo); |
| | | return res; |
| | | } |
| | | |
| | | @ApiOperation(value = "绑定用户") |
| | | @PostMapping(value = "/bindUser") |
| | | public AjaxResult bindUser(@RequestBody @Validated LoginDto loginDto) { |
| | | SysUsers user = new SysUsers(); |
| | | user.setSuAccount(loginDto.getUsername()); |
| | | user.setSuPassword(loginDto.getPassword()); |
| | | LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService); |
| | | user = authorityManager.login(apLogin); |
| | | user.setSuPassword(null); |
| | | user.setOpenIds(null); |
| | | String token = userCacheManager.saveUserInfo(user); |
| | | |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("登陆成功"); |
| | | authorityManager.initUserPower(result, user); |
| | | |
| | | UserInfoVo userInfoVo = new UserInfoVo(); |
| | | if(user.getShopId()!=null){ |
| | | SysShopInfo shopInfo = sysShopInfoService.findById(user.getShopId()); |
| | | user.setShopName(shopInfo.getShopName()); |
| | | userInfoVo.setShopName(shopInfo.getShopShortName()); |
| | | } |
| | | |
| | | userInfoVo.setId(user.getSuId()); |
| | | userInfoVo.setName(user.getSuName()); |
| | | userInfoVo.setRoleName(user.getRoleName()); |
| | | userInfoVo.setPhoto(user.getSuPhoto()); |
| | | |
| | | result.putInMap("token", token); |
| | | result.putInMap("userInfo", userInfoVo); |
| | | |
| | | synchronized (this) { |
| | | SysUsers hasBind = sysUsersService.findByOpenId(loginDto.getOpenId(), HostInterceptor.getCompanyId()); |
| | | if (hasBind != null) { |
| | | if(StrUtil.isNotBlank(hasBind.getOpenIds())) { |
| | | List<String> openIds = StrUtil.split(hasBind.getOpenIds(), ','); |
| | | openIds.remove(loginDto.getOpenId()); |
| | | |
| | | sysUsersService.modifyUserOpenId(CollUtil.join(openIds, ","), hasBind.getSuId()); |
| | | } |
| | | } |
| | | |
| | | List<String> openIds = StrUtil.split(user.getOpenIds(), ','); |
| | | openIds.add(loginDto.getOpenId()); |
| | | user.setOpenIds(CollUtil.join(openIds, ",")); |
| | | sysUsersService.modifyByModel(user); |
| | | } |
| | | |
| | | return result; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.beauty.followup.dao.SysFollowupDao; |
| | | import com.matrix.beauty.followup.entry.SysFollowup; |
| | | import com.matrix.beauty.followup.service.SysFollowupService; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | |
| | | import com.matrix.system.app.dto.*; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | |
| | | private SysFollowupDao followupDao; |
| | | |
| | | @Autowired |
| | | private SysVipAlbumDao vipAlbumDao; |
| | | |
| | | @Autowired |
| | | private SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | private SysFollowupCommentDao followupCommentDao; |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | private SysOrderItemDao orderItemDao; |
| | | |
| | | @Autowired |
| | | private SysBeauticianStateDao beauticianStateDao; |
| | | private SysFollowupService followupService; |
| | | |
| | | |
| | | @ApiOperation(value = "新增跟进记录", notes = "新增跟进记录") |
| | |
| | | }) |
| | | @PostMapping(value = "/addFollowup") |
| | | public AjaxResult addFollowup(@RequestBody @Validated SysFollowup followup) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | followup.setCreateBy(user.getSuName()); |
| | | followup.setUpdateBy(user.getSuName()); |
| | | followup.setStaffId(user.getSuId()); |
| | | followup.setCompanyId(user.getCompanyId()); |
| | | followup.setShopId(user.getShopId()); |
| | | //处理订单摘要 |
| | | if(followup.getOrderId()!=null){ |
| | | List<SysOrderItem> sysOrderItems = orderItemDao.selectByOrderId(followup.getOrderId()); |
| | | String abs=""; |
| | | if(sysOrderItems.size()>1){ |
| | | abs= sysOrderItems.get(0).getShoppingGoods().getName()+"等"+sysOrderItems.size()+"件商品"; |
| | | }else{ |
| | | abs= sysOrderItems.get(0).getShoppingGoods().getName(); |
| | | } |
| | | followup.setOrderAbstract(abs); |
| | | } |
| | | //服务单摘要 |
| | | if(followup.getServiceId()!=null){ |
| | | List<SysBeauticianState> sysBeauticianStates = beauticianStateDao.selectBySerIds(followup.getServiceId()); |
| | | String abs=""; |
| | | if(sysBeauticianStates.size()>1){ |
| | | abs= sysBeauticianStates.get(0).getProjInfo().getName()+"等"+sysBeauticianStates.size()+"项服务"; |
| | | }else{ |
| | | abs= sysBeauticianStates.get(0).getProjInfo().getName(); |
| | | } |
| | | followup.setOrderAbstract(abs); |
| | | } |
| | | |
| | | followupDao.insert(followup); |
| | | //插入图片 |
| | | List<SysVipAlbum> albums=followup.getAlbums(); |
| | | if(CollectionUtils.isNotEmpty(albums)){ |
| | | for (SysVipAlbum vipAlbum:albums){ |
| | | if(StringUtils.isNotBlank(vipAlbum.getImg())){ |
| | | vipAlbum.setCreateBy(user.getSuName()); |
| | | vipAlbum.setUpdateBy(user.getSuName()); |
| | | vipAlbum.setSource(SysVipAlbum.SOURCE_FOLLOW); |
| | | vipAlbum.setVipId(followup.getVipId()); |
| | | vipAlbum.setSourceId(followup.getId()); |
| | | vipAlbumDao.insert(vipAlbum); |
| | | } |
| | | } |
| | | } |
| | | |
| | | followupService.save(followup); |
| | | return AjaxResult.buildSuccessInstance("保存成功"); |
| | | } |
| | | |
| | |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.bean.ShoppingGoodsCategory; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.pojo.ShoppingCarItem; |
| | |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | if (order == null) { |
| | | throw new GlobleException("订单不存在"); |
| | | } |
| | | sysOrderService.cancelOrder(orderId); |
| | | |
| | | return AjaxResult.buildSuccessInstance("取消成功"); |
| | | |
| | | int i = sysOrderService.cancelOrder(orderId); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("取消成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("取消失败"); |
| | | } |
| | | |
| | | } |
| | |
| | | achieveNew.setT1(rankingDto.getType()); |
| | | return AjaxResult.buildSuccessInstance(achieveNewDao.selectBeauticianConsumeAchieveRanking(achieveNew)); |
| | | } |
| | | |
| | | @ApiOperation(value = "人头数排名", notes = "人头数排名") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = RankingVo.class) |
| | | }) |
| | | @PostMapping(value = "/findNumOfPeopleRanking") |
| | | public AjaxResult findNumOfPeopleRanking(@RequestBody RankingDto rankingDto) { |
| | | AchieveNew achieveNew = new AchieveNew(); |
| | | QueryUtil.setQueryLimitCom(achieveNew); |
| | | achieveNew.setDatatime(new Date()); |
| | | achieveNew.setT1(rankingDto.getType()); |
| | | return AjaxResult.buildSuccessInstance(achieveNewDao.selectNumOfPeopleAchieveRanking(achieveNew)); |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.component.asyncmessage.AsyncMessageManager; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | |
| | | import com.matrix.system.hive.service.SysProjServicesService; |
| | | import com.matrix.system.hive.service.SysProjUseService; |
| | | import com.matrix.system.hive.service.SysVipInfoService; |
| | | import com.matrix.system.shopXcx.mqTask.MQTaskRouting; |
| | | import com.matrix.system.shopXcx.mqTask.AsyncMessageRouting; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgParam; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | |
| | | @Autowired |
| | | private SysBeauticianStateService sysBeauticianStateService; |
| | | |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate rabiitMqTemplate; |
| | | private AsyncMessageManager asyncMessageManager; |
| | | |
| | | @Value("${evn}") |
| | | private String evn; |
| | |
| | | break; |
| | | case "1": |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | // queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | break; |
| | | case "2": |
| | | queryUse.setTargetFailTime(DateUtil.getDateAfterMonth(new Date(), 1)); |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | // queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | break; |
| | | case "3": |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_WX); |
| | | queryUse.setIsOver(Dictionary.FLAG_YES_Y); |
| | | // queryUse.setIsOver(Dictionary.FLAG_YES_Y); |
| | | break; |
| | | default: |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | // queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | break; |
| | | } |
| | | } else { |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | } |
| | | |
| | | queryUse.setQueryKey(serviceVipProjDto.getQueryKey()); |
| | |
| | | |
| | | queryUse.setTaocanId(null); |
| | | queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_TC); |
| | | List<SysProjUse> taoCanList = projUseService.findInPage(queryUse, null); |
| | | // List<SysProjUse> taoCanList = projUseService.findInPage(queryUse, null); |
| | | List<SysProjUse> taoCanList = projUseService.findTaocaoProjUseWithProj(queryUse); |
| | | List<ServiceTcVo> serviceTcVos = SysProjUseMapper.INSTANCE.entityListToTcVoList(taoCanList); |
| | | |
| | | if (CollectionUtils.isNotEmpty(serviceTcVos)) { |
| | | serviceTcVos.forEach(item -> { |
| | | List<SysProjUse> sysProjUses = projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus()); |
| | | List<ServiceProjVo> taocanProj = SysProjUseMapper.INSTANCE.entityListToProjVoList(sysProjUses); |
| | | // List<SysProjUse> sysProjUses = projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus()); |
| | | List<ServiceProjVo> taocanProj = SysProjUseMapper.INSTANCE.entityListToProjVoList(item.getTaocanProjUse()); |
| | | item.setTaocanProjUse(null); |
| | | item.setProj(taocanProj); |
| | | }); |
| | | } |
| | |
| | | throw new GlobleException("请选择服务"); |
| | | } |
| | | SysVipInfo vipInfo = sysVipInfoService.findById(serviceOrderDto.getVipId()); |
| | | // if (StringUtils.isBlank(vipInfo.getPassWord())) { |
| | | // return AjaxResult.buildFailInstance("未设置资金密码"); |
| | | // } |
| | | |
| | | |
| | | if (StringUtils.isNotBlank(vipInfo.getPassWord())) { |
| | | if (!vipInfo.getPassWord().equals(serviceOrderDto.getPassword())) { |
| | |
| | | sysProjServices.setVipId(serviceOrderDto.getVipId()); |
| | | sysProjServices.setYyTime(serviceOrderDto.getYyTime()); |
| | | sysProjServices.setRemark(serviceOrderDto.getRemark()); |
| | | sysProjServices.setBedId(serviceOrderDto.getBedId()); |
| | | |
| | | List<SysBeauticianState> sysBeauticianStates = new ArrayList<>(); |
| | | serviceOrderDto.getProjItems().forEach(item ->{ |
| | |
| | | @ApiOperation(value = "确认服务", notes = "确认服务") |
| | | @PostMapping(value = "/confirmServiceOrder") |
| | | public AjaxResult confirmServiceOrder(@RequestBody @Validated IdSubmitDto idSubmitDto) { |
| | | SysProjServices services = new SysProjServices(); |
| | | services.setId(idSubmitDto.getId()); |
| | | services.setState(Dictionary.BEATUI_STATE_DYY); |
| | | int i = projServicesService.modify(services); |
| | | if (i > 0) { |
| | | //发送微信公众号提醒 |
| | | services=projServicesService.findById(services.getId()); |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(services.getCompanyId(),UniformMsgParam.GZH_YYCG); |
| | | uniformMsgParam.put("serviceId",services.getId()); |
| | | rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | |
| | | int i=projServicesService.confirmServiceOrder(idSubmitDto.getId()); |
| | | if(i>0){ |
| | | return AjaxResult.buildSuccessInstance("确认成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("确认失败"); |
| New file |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.SettingDto; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.hive.bean.AppVersion; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @author jyy |
| | | * @date 2020-12-21 |
| | | **/ |
| | | @CrossOrigin(origins = "*") |
| | | @Api(value = "ApiSettingAction", tags = "配置查询类") |
| | | @RestController |
| | | @RequestMapping(value = "/api/setting") |
| | | public class ApiSettingAction { |
| | | |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | |
| | | @ApiOperation(value = "获取app配置", notes = "获取app配置") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = AppVersion.class) |
| | | }) |
| | | @GetMapping(value = "/findAppSettings") |
| | | public AjaxResult findAppSettings() { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("查询成功"); |
| | | result.putInMap(AppConstance.APP_BANNER_GL, busParameterSettingsDao.selectCompanyParamByCode(AppConstance.APP_BANNER_GL,user.getCompanyId())); |
| | | return result; |
| | | } |
| | | |
| | | @ApiOperation(value = "根据code获取配置", notes = "根据code获取配置") |
| | | @PostMapping(value = "/findAppSettingsByCode") |
| | | public AjaxResult findAppSettingsByCode(@RequestBody SettingDto settingDto) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("查询成功"); |
| | | result.putInMap(settingDto.getCode(), busParameterSettingsDao.selectCompanyParamByCode(settingDto.getCode(),user.getCompanyId())); |
| | | return result; |
| | | } |
| | | |
| | | } |
| | |
| | | return tjVipSumDao.selectProjConsumeCnt(timeSpaceParam, shopId, null); |
| | | case "20" : |
| | | return tjVipSumDao.selectTimeLength(timeSpaceParam, shopId, null); |
| | | case "21" : |
| | | return tjVipSumDao.selectCardAmount(timeSpaceParam, shopId, null); |
| | | case "22" : |
| | | return tjVipSumDao.selectFreeAmount(timeSpaceParam, shopId, null); |
| | | default : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, shopId, null); |
| | | } |
| | |
| | | return tjVipSumDao.selectProjConsumeCnt(timeSpaceParam, null, companyId); |
| | | case "20" : |
| | | return tjVipSumDao.selectTimeLength(timeSpaceParam, null, companyId); |
| | | case "21" : |
| | | return tjVipSumDao.selectCardAmount(timeSpaceParam, null, companyId); |
| | | case "22" : |
| | | return tjVipSumDao.selectFreeAmount(timeSpaceParam, null, companyId); |
| | | default : |
| | | return tjVipSumDao.selectBusinessInCome(timeSpaceParam, null, companyId); |
| | | } |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.component.redis.RedisClient; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.*; |
| | | import com.matrix.system.app.mapper.SysBeauticianStateMapper; |
| | | import com.matrix.system.app.dto.BeauticianDto; |
| | | import com.matrix.system.app.dto.ModifyUserDto; |
| | | import com.matrix.system.app.dto.PwdModifyDto; |
| | | import com.matrix.system.app.dto.UsersQueryDto; |
| | | import com.matrix.system.app.mapper.SysUsersMapper; |
| | | import com.matrix.system.app.mapper.SysWorkBeatuistaffMapper; |
| | | import com.matrix.system.app.vo.BeauticianVo; |
| | | import com.matrix.system.app.vo.UserAchieveVo; |
| | | import com.matrix.system.app.vo.UserInfoDetailVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.interceptor.ApiUserLoginInterceptor; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.PasswordUtil; |
| | | import com.matrix.system.hive.action.BaseController; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysWorkBeatuistaff; |
| | | import com.matrix.system.hive.service.AchieveNewService; |
| | | import com.matrix.system.hive.service.SysWorkBeatuistaffService; |
| | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private SysWorkBeatuistaffService sysWorkBeatuistaffService; |
| | | |
| | | @Autowired |
| | | private RedisClient redisClient; |
| | | @Value("${login_private_key}") |
| | | private String privateKey; |
| | | |
| | |
| | | @GetMapping(value = "/loginOut") |
| | | public AjaxResult loginOut(HttpServletRequest request) { |
| | | String token=ApiUserLoginInterceptor.resolveToken(request,privateKey); |
| | | redisClient.removeObject(token); |
| | | LocalCache.remove(token); |
| | | return AjaxResult.buildSuccessInstance("退出成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "小程序退出登陆", notes = "小程序退出登陆") |
| | | @GetMapping(value = "/xcxloginOut/{code}") |
| | | public AjaxResult xcxloginOut(HttpServletRequest request, @PathVariable("code") String code) { |
| | | SysUsers hasBind = sysUsersService.findByOpenId(code, HostInterceptor.getCompanyId()); |
| | | if (hasBind != null) { |
| | | if(StrUtil.isNotBlank(hasBind.getOpenIds())) { |
| | | List<String> openIds = StrUtil.split(hasBind.getOpenIds(), ','); |
| | | openIds.remove(code); |
| | | |
| | | sysUsersService.modifyUserOpenId(CollUtil.join(openIds, ","), hasBind.getSuId()); |
| | | } |
| | | } |
| | | String token=ApiUserLoginInterceptor.resolveToken(request,privateKey); |
| | | LocalCache.remove(token); |
| | | return AjaxResult.buildSuccessInstance("退出成功"); |
| | | } |
| | | |
| | |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.EncrypUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.AddVipDto; |
| | |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.CustomerDataDictionaryDao; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.PasswordUtil; |
| | | import com.matrix.system.hive.action.BaseController; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.MoneyCardUseDao; |
| | | import com.matrix.system.hive.dao.VipAnswerDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.service.MoneyCardUseService; |
| | |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | vipInfoListDto.setOrder("asc"); |
| | | } |
| | | |
| | | |
| | | int offset = (vipInfoListDto.getPageNum() - 1) * vipInfoListDto.getPageSize(); |
| | | int limit = vipInfoListDto.getPageSize(); |
| | | vipInfoListDto.setOffset(offset); |
| | | vipInfoListDto.setLimit(limit); |
| | | |
| | | |
| | | |
| | | |
| | | return AjaxResult.buildSuccessInstance(sysVipInfoService.findVipAddressBook(vipInfoListDto)); |
| | | } |
| | | |
| | |
| | | @GetMapping(value = "/findVipQuestions/{vipId}") |
| | | public AjaxResult findVipQuestions(@PathVariable("vipId") Long vipId) { |
| | | // 获取会员所有的答案,分类型 |
| | | List<Question> questions = questionSerivce.findByVipId(vipId); |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | List<Question> questions = questionSerivce.findByVipId(vipId,user.getCompanyId()); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("获取成功"); |
| | | List<QuestionVo> list = QuestionMapper.INSTANCE.entitiesToVos(questions); |
| | | result.putInMap("questions", list); |
| | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.dto.FreeBedDto; |
| | | import com.matrix.system.app.vo.StoreListVo; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | |
| | | import com.matrix.system.hive.action.BaseController; |
| | | import com.matrix.system.hive.action.OccupancyController; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysBedInfo; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.bean.SysWorkBeatuistaff; |
| | | import com.matrix.system.hive.dao.SysBeauticianStateDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.service.SysBedInfoService; |
| | | import com.matrix.system.hive.service.SysWorkBeatuistaffService; |
| | | import com.matrix.system.hive.service.SysWorktimeService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | @Resource |
| | | private OccupancyController occupancyController; |
| | | |
| | | @Autowired |
| | | private SysBedInfoService bedInfoService; |
| | | |
| | | /** |
| | | * 获取员工预约情况 |
| | | */ |
| | |
| | | return occupancyController.getCwzyList(timeStr,sysUsers.getShopId()); |
| | | } |
| | | |
| | | @ApiOperation(value = "获取床位信息", notes = "获取床位信息") |
| | | @PostMapping(value = "/showFreedBed") |
| | | public AjaxResult showFreedBed(@RequestBody @Validated FreeBedDto freeBedDto) { |
| | | SysProjServices sysProjServices = new SysProjServices(); |
| | | sysProjServices.setStartTime(freeBedDto.getStartTime()); |
| | | sysProjServices.setTotalTime(freeBedDto.getTotalTime()); |
| | | |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysProjServices.setShopId(sysUsers.getShopId()); |
| | | List<SysBedInfo> beds = bedInfoService.findFreeBed(sysProjServices); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, beds, 0); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.matrix.system.app.authority; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | |
| | | import com.matrix.system.common.bean.SysFunction; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.service.SysFunctionService; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import java.util.*; |
| | | import java.util.Map.Entry; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * DefaultAuthorityManager 实现了权限控制接口 |
| | |
| | | |
| | | private static final int DEFAULT_2 = 2; |
| | | |
| | | |
| | | @Autowired |
| | | SysFunctionService sysFunctionService; |
| | | |
| | | public static final String USER_POWER_REDISKEY_APP = "USER_POWER_APP"; |
| | | |
| | | public static final String USERFUNCTION = "userFunction"; |
| | | /** 用户所有路径权限的记录 **/ |
| | |
| | | List<String> userUrlMapping = new ArrayList<>(); |
| | | |
| | | |
| | | // 获取用户所有权限 |
| | | getUserFunction(user,userFunction, userUrlMapping); |
| | | String redisKey = USER_POWER_REDISKEY_APP + SecureUtil.md5(user.getSuId()+""); |
| | | Map<String, Object> cachePowerMap = LocalCache.get(redisKey,new TypeReference<Map<String,Object>>(){}); |
| | | if (Objects.nonNull(cachePowerMap)) { |
| | | userFunction = JSONObject.parseObject(JSON.toJSONString( cachePowerMap.get(USERFUNCTION)), new TypeReference<Map<String, SysFunction>>(){}); |
| | | userUrlMapping =JSONObject.parseObject(JSON.toJSONString( cachePowerMap.get(USER_URL_MAPPING)) , new TypeReference<List<String>>(){}); |
| | | |
| | | } else { |
| | | // 获取用户所有权限 |
| | | getUserFunction(user,userFunction, userUrlMapping); |
| | | |
| | | // TODO 这里的用户权限应该放到redis缓存中,在拦截器中做权限拦截 |
| | | Map<String ,Object> powerMap=new HashMap<>(); |
| | | powerMap.put(USERFUNCTION, userFunction); |
| | | powerMap.put(USER_URL_MAPPING, userUrlMapping); |
| | | LocalCache.save(redisKey,powerMap); |
| | | } |
| | | |
| | | WebUtil.setSessionAttribute(USERFUNCTION, userFunction); |
| | | WebUtil.setSessionAttribute(USER_URL_MAPPING, userUrlMapping); |
| | | result.putInMap(USERFUNCTION, userFunction); |
| | |
| | | // 普通员工账号只拥有自己所拥有的权限 |
| | | List<SysFunction> userFunctionList = sysFunctionService.findFunctionByRoleIds(sysUser.getRoleIds()); |
| | | for (SysFunction sysFunction : userFunctionList) { |
| | | |
| | | sysFunction.setSysFnBtnRel( |
| | | sysFunction.getSysFnBtnRel().stream().filter(item->StringUtils.isContentSet(item.getBtnValue(),sysFunction.getRpfBns())).collect(Collectors.toList()) |
| | | ); |
| | | |
| | | // TODO注册访问路径 |
| | | registerUrlMapping(userUrlMapping, sysFunction,false); |
| | | if (userFunctionMap.containsKey(sysFunction.getFnCode())) { |
| | | // 如果功能已经被添加到集合中则追加权限按钮 |
| | | SysFunction oneFunctionInMap = userFunctionMap.get(sysFunction.getFnCode()); |
| | | |
| | | // 为了方便判断所以用字符串记录一下 |
| | | if (StringUtils.isBlank(oneFunctionInMap.getRpfBns())) { |
| | | oneFunctionInMap.setRpfBns(sysFunction.getRpfBns()); |
| | |
| | | @ApiModelProperty(value = "会员ID") |
| | | private Long vipId; |
| | | |
| | | @NotNull(message = "请选择美疗师") |
| | | // @NotNull(message = "请选择美疗师") |
| | | @ApiModelProperty(value = "美疗师ID") |
| | | private Long beautyId; |
| | | |
| | | @ApiModelProperty(value = "床位ID") |
| | | private Long bedId; |
| | | |
| | | @NotNull(message = "请选择预约时间") |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | |
| | | @ApiModelProperty(value = "资金密码") |
| | | private String password; |
| | | |
| | | public Long getBedId() { |
| | | return bedId; |
| | | } |
| | | |
| | | public void setBedId(Long bedId) { |
| | | this.bedId = bedId; |
| | | } |
| | | |
| | | public String getPassword() { |
| | | return password; |
| | | } |
| New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @author wzy |
| | | * @date 2022-03-15 |
| | | **/ |
| | | @ApiModel(value = "FreeBedDto", description = "获取床位信息接口接受参数类") |
| | | public class FreeBedDto { |
| | | |
| | | @NotNull(message = "选择预约时间") |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") |
| | | @ApiModelProperty(value = "预约开始时间") |
| | | private Date startTime; |
| | | |
| | | @NotNull(message = "输入服务时长") |
| | | @ApiModelProperty(value = "服务时长") |
| | | private Integer totalTime; |
| | | |
| | | public Date getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public void setStartTime(Date startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public Integer getTotalTime() { |
| | | return totalTime; |
| | | } |
| | | |
| | | public void setTotalTime(Integer totalTime) { |
| | | this.totalTime = totalTime; |
| | | } |
| | | } |
| | |
| | | @NotBlank(message = "用户名或密码错误") |
| | | private String password; |
| | | |
| | | private String openId; |
| | | |
| | | public String getOpenId() { |
| | | return openId; |
| | | } |
| | | |
| | | public void setOpenId(String openId) { |
| | | this.openId = openId; |
| | | } |
| | | |
| | | public String getUsername() { |
| | | return username; |
| | | } |
| | |
| | | public static final String DAY = "1"; |
| | | public static final String MONTH = "2"; |
| | | public static final String YEAR = "3"; |
| | | public static final String WEEK = "4"; |
| | | |
| | | @ApiModelProperty(value = "数据类型 1-销售 2-消耗", example = "1") |
| | | private String dataType; |
| | | |
| | | @ApiModelProperty(value = "排行榜类型 1-日榜 2-月榜 3-年榜", example = "1") |
| | | @ApiModelProperty(value = "排行榜类型 1-日榜 2-月榜 3-年榜 4-周榜", example = "1") |
| | | private String type; |
| | | |
| | | public String getDataType() { |
| New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SettingDto", description = "根据code获取配置参数接收类") |
| | | public class SettingDto { |
| | | |
| | | @ApiModelProperty(value = "code", example = "1") |
| | | private String code; |
| | | } |
| New file |
| | |
| | | package com.matrix.system.app.dto; |
| | | |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class UrlDto { |
| | | |
| | | private String url; |
| | | |
| | | private String name; |
| | | } |
| | |
| | | @ApiModelProperty(value = "卡项业绩") |
| | | private BigDecimal cardAchieve; |
| | | |
| | | @ApiModelProperty(value = "储值卡本金扣款") |
| | | private BigDecimal cardAmount; |
| | | |
| | | @ApiModelProperty(value = "储值卡增金扣款") |
| | | private BigDecimal cardFreeAmount; |
| | | |
| | | @ApiModelProperty(value = "退款") |
| | | private BigDecimal refund; |
| | | |
| | |
| | | } |
| | | |
| | | public BigDecimal getConsumePay() { |
| | | return consumePay; |
| | | return consumePay.setScale(2, BigDecimal.ROUND_HALF_UP); |
| | | } |
| | | |
| | | public void setConsumePay(BigDecimal consumePay) { |
| | |
| | | public void setTimeLength(BigDecimal timeLength) { |
| | | this.timeLength = timeLength; |
| | | } |
| | | |
| | | public BigDecimal getCardAmount() { |
| | | return cardAmount; |
| | | } |
| | | |
| | | public void setCardAmount(BigDecimal cardAmount) { |
| | | this.cardAmount = cardAmount; |
| | | } |
| | | |
| | | public BigDecimal getCardFreeAmount() { |
| | | return cardFreeAmount; |
| | | } |
| | | |
| | | public void setCardFreeAmount(BigDecimal cardFreeAmount) { |
| | | this.cardFreeAmount = cardFreeAmount; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.matrix.system.app.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * jyy |
| | | */ |
| | | @Data |
| | | @ApiModel(value = "ParameterSettingVo", description = "配置返回参数类") |
| | | public class ParameterSettingVo { |
| | | |
| | | @ApiModelProperty(value = "参数编码ID") |
| | | private Long paramId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "参数编码") |
| | | private String paramCode; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "参数值") |
| | | private String paramValue; |
| | | |
| | | |
| | | @ApiModelProperty(value = "值1") |
| | | private String paramValue1; |
| | | |
| | | |
| | | @ApiModelProperty(value = "值2") |
| | | private String paramValue2; |
| | | |
| | | |
| | | @ApiModelProperty(value = "值3") |
| | | private String paramValue3; |
| | | |
| | | |
| | | } |
| | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "套餐来源,转让,购买") |
| | | private String source; |
| | | |
| | | @ApiModelProperty(value = "划扣金额") |
| | | private BigDecimal price; |
| | | |
| | | @ApiModelProperty(value = "时长") |
| | | private Integer timeLength; |
| | | |
| | |
| | | |
| | | @ApiModelProperty(value = "快过期 1-是 2-否") |
| | | private String isInvalid; |
| | | |
| | | @ApiModelProperty(value = " 使用情况余额") |
| | | private Double balance; |
| | | |
| | | @ApiModelProperty(value = "项目状态 有效/无效") |
| | | private String status; |
| | | |
| | | public String getIsInvalid() { |
| | | Date date = DateUtil.getDateAfterMonth(new Date(), 1); |
| | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | if ("有效".equals(status)) { |
| | | return "1"; |
| | | } else { |
| | | return "2"; |
| | | } |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getSource() { |
| | | return source; |
| | | } |
| | | |
| | | public void setSource(String source) { |
| | | this.source = source; |
| | | } |
| | | |
| | | public Double getBalance() { |
| | | return balance; |
| | | } |
| | | |
| | | public void setBalance(Double balance) { |
| | | this.balance = balance; |
| | | } |
| | | |
| | | public BigDecimal getPrice() { |
| | | return price; |
| | | } |
| | | |
| | | public void setPrice(BigDecimal price) { |
| | | this.price = price; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.bean.SysProjUse; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | @ApiModelProperty(value = "若套餐为任选套餐 则判断是否无限次 Y是 N否") |
| | | private String isInfinite; |
| | | |
| | | @ApiModelProperty(value = "来源") |
| | | private String source; |
| | | |
| | | @ApiModelProperty(value = "套餐内产品") |
| | | List<ServiceProjVo> proj; |
| | | |
| | | @ApiModelProperty(value = "快过期 1-是 2-否") |
| | | private String isInvalid; |
| | | |
| | | @ApiModelProperty(value = "状态 有效/无效") |
| | | private String status; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private List<SysProjUse> taocanProjUse; |
| | | |
| | | public List<SysProjUse> getTaocanProjUse() { |
| | | return taocanProjUse; |
| | | } |
| | | |
| | | public void setTaocanProjUse(List<SysProjUse> taocanProjUse) { |
| | | this.taocanProjUse = taocanProjUse; |
| | | } |
| | | |
| | | public String getIsInvalid() { |
| | | Date date = DateUtil.getDateAfterMonth(new Date(), 1); |
| | |
| | | public void setProj(List<ServiceProjVo> proj) { |
| | | this.proj = proj; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | if ("有效".equals(status)) { |
| | | return "1"; |
| | | } else { |
| | | return "2"; |
| | | } |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public String getSource() { |
| | | return source; |
| | | } |
| | | |
| | | public void setSource(String source) { |
| | | this.source = source; |
| | | } |
| | | } |
| | |
| | | import com.matrix.system.hive.bean.ShoppingGoodsCategory; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | |
| | | * @author wzy |
| | | * @date 2020-12-24 |
| | | **/ |
| | | @Data |
| | | @ApiModel(value = "ShoppingGoodsDetailVo", description = "商品详情返回参数类") |
| | | public class ShoppingGoodsDetailVo { |
| | | |
| | |
| | | private Integer maxSaleCnt; |
| | | |
| | | @ApiModelProperty(value = "每人限购次数") |
| | | private String limitBuyCnt; |
| | | private Integer limitBuyCnt; |
| | | |
| | | @ApiModelProperty(value = "充值卡使用范围 是-所有产品 否-部分产品") |
| | | private String carIsAll; |
| | |
| | | @ApiModelProperty(value = "卡项产品可消费类型") |
| | | List<ShoppingGoodsCategory> cardCategory; |
| | | |
| | | public BigDecimal getGiftPrice() { |
| | | return giftPrice; |
| | | } |
| | | |
| | | public void setGiftPrice(BigDecimal giftPrice) { |
| | | this.giftPrice = giftPrice; |
| | | } |
| | | |
| | | public String getCarIsAll() { |
| | | return carIsAll; |
| | | } |
| | | |
| | | public void setCarIsAll(String carIsAll) { |
| | | this.carIsAll = carIsAll; |
| | | } |
| | | |
| | | public String getGoodsNo() { |
| | | return goodsNo; |
| | | } |
| | | |
| | | public void setGoodsNo(String goodsNo) { |
| | | this.goodsNo = goodsNo; |
| | | } |
| | | |
| | | public String getGoodsName() { |
| | | return goodsName; |
| | | } |
| | | |
| | | public void setGoodsName(String goodsName) { |
| | | this.goodsName = goodsName; |
| | | } |
| | | |
| | | public BigDecimal getSalePrice() { |
| | | return salePrice; |
| | | } |
| | | |
| | | public void setSalePrice(BigDecimal salePrice) { |
| | | this.salePrice = salePrice; |
| | | } |
| | | |
| | | public Integer getSaleCnt() { |
| | | return saleCnt; |
| | | } |
| | | |
| | | public void setSaleCnt(Integer saleCnt) { |
| | | this.saleCnt = saleCnt; |
| | | } |
| | | |
| | | public String getImg() { |
| | | return img; |
| | | } |
| | | |
| | | public void setImg(String img) { |
| | | this.img = img; |
| | | } |
| | | |
| | | public String getDesc() { |
| | | return desc; |
| | | } |
| | | |
| | | public void setDesc(String desc) { |
| | | this.desc = desc; |
| | | } |
| | | |
| | | public String getGoodsType() { |
| | | return goodsType; |
| | | } |
| | | |
| | | public void setGoodsType(String goodsType) { |
| | | this.goodsType = goodsType; |
| | | } |
| | | |
| | | public Integer getVolume() { |
| | | return volume; |
| | | } |
| | | |
| | | public void setVolume(Integer volume) { |
| | | this.volume = volume; |
| | | } |
| | | |
| | | public String getMeasure() { |
| | | return measure; |
| | | } |
| | | |
| | | public void setMeasure(String measure) { |
| | | this.measure = measure; |
| | | } |
| | | |
| | | public Integer getMaxSaleCnt() { |
| | | return maxSaleCnt; |
| | | } |
| | | |
| | | public void setMaxSaleCnt(Integer maxSaleCnt) { |
| | | this.maxSaleCnt = maxSaleCnt; |
| | | } |
| | | |
| | | public String getLimitBuyCnt() { |
| | | return limitBuyCnt; |
| | | } |
| | | |
| | | public void setLimitBuyCnt(String limitBuyCnt) { |
| | | this.limitBuyCnt = limitBuyCnt; |
| | | } |
| | | |
| | | public List<ShoppingGoodsDetailVo> getAssembleProj() { |
| | | return assembleProj; |
| | | } |
| | | |
| | | public void setAssembleProj(List<ShoppingGoodsDetailVo> assembleProj) { |
| | | this.assembleProj = assembleProj; |
| | | } |
| | | |
| | | public List<ShoppingGoodsDetailVo> getAssembleTaocanProj() { |
| | | return assembleTaocanProj; |
| | | } |
| | | |
| | | public void setAssembleTaocanProj(List<ShoppingGoodsDetailVo> assembleTaocanProj) { |
| | | this.assembleTaocanProj = assembleTaocanProj; |
| | | } |
| | | |
| | | public List<ShoppingGoodsDetailVo> getAssembleTaocanProduct() { |
| | | return assembleTaocanProduct; |
| | | } |
| | | |
| | | public void setAssembleTaocanProduct(List<ShoppingGoodsDetailVo> assembleTaocanProduct) { |
| | | this.assembleTaocanProduct = assembleTaocanProduct; |
| | | } |
| | | |
| | | public List<ShoppingGoodsCategory> getCardCategory() { |
| | | return cardCategory; |
| | | } |
| | | |
| | | public void setCardCategory(List<ShoppingGoodsCategory> cardCategory) { |
| | | this.cardCategory = cardCategory; |
| | | } |
| | | |
| | | public String getIsCourse() { |
| | | return isCourse; |
| | | } |
| | | |
| | | public void setIsCourse(String isCourse) { |
| | | this.isCourse = isCourse; |
| | | } |
| | | |
| | | public Integer getMaxUseCnt() { |
| | | return maxUseCnt; |
| | | } |
| | | |
| | | public void setMaxUseCnt(Integer maxUseCnt) { |
| | | this.maxUseCnt = maxUseCnt; |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty(value = "会员姓名") |
| | | private String vipName; |
| | | |
| | | @ApiModelProperty(value = "会员编号") |
| | | private String vipNo; |
| | | |
| | | @ApiModelProperty(value = "会员手机号") |
| | | private String phone; |
| | | |
| | |
| | | public void setVipLevel(String vipLevel) { |
| | | this.vipLevel = vipLevel; |
| | | } |
| | | |
| | | public String getVipNo() { |
| | | return vipNo; |
| | | } |
| | | |
| | | public void setVipNo(String vipNo) { |
| | | this.vipNo = vipNo; |
| | | } |
| | | } |
| | |
| | | @ApiModelProperty(value = "累计消费") |
| | | private BigDecimal totalShopping; |
| | | |
| | | @ApiModelProperty(value = "欠款") |
| | | private BigDecimal arrears; |
| | | |
| | | public BigDecimal getArrears() { |
| | | return arrears; |
| | | } |
| | | |
| | | public void setArrears(BigDecimal arrears) { |
| | | this.arrears = arrears; |
| | | } |
| | | |
| | | public String getPhoto() { |
| | | return photo; |
| | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.PropertiesUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.PasswordUtil; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.constance.SystemConstance; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | |
| | | import java.net.URLEncoder; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.ArrayList; |
| | | import java.util.LinkedList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | import static com.matrix.system.common.constance.AppConstance.SAFEPATH; |
| | | |
| | | /** |
| | | * @author 姜ø友瑶 |
| | |
| | | @Controller |
| | | @RequestMapping(value = "admin") |
| | | public class AdminAction extends BaseAction { |
| | | |
| | | |
| | | @Value("${default_password}") |
| | | String defaultPassword; |
| | | |
| | | @Autowired |
| | | private SysUsersService sysUsersService; |
| | |
| | | |
| | | LogUtil.info("#{}进行重置{}的密码操作#", loginUser.getSuAccount(), user.getSuAccount()); |
| | | |
| | | user.setSuPassword(PropertiesUtil.getString(AppConstance.DEFAULT_PASSWORD)); |
| | | user.setSuPassword(defaultPassword); |
| | | try { |
| | | // 设置加密后的密码 |
| | | user.setSuPassword(PasswordUtil.getEncrypUserPwd(user)); |
| | |
| | | AjaxResult all() { |
| | | SysUsers sysUsers = new SysUsers(); |
| | | QueryUtil.setQueryLimit(sysUsers); |
| | | sysUsers.setSuValid(AppConstance.RECORD_VALID); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, sysUsersService.findInPage(sysUsers, null)); |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 查询所有员工 |
| | | */ |
| | | @RequestMapping(value = "/allUser") |
| | | public @ResponseBody |
| | | AjaxResult allUser() { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, sysUsersService.findByRoleName(false, null)); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据角色名称查询店铺的员工 |
| | | */ |
| | | @RequestMapping(value = "/getShopStaffByRoleName") |
| | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询历史搜索人数 |
| | | * |
| | | * @return |
| | | * @author luoyuanhong |
| | | */ |
| | | @SuppressWarnings("unchecked") |
| | | @RequestMapping(value = "/showHistoryUser") |
| | | public @ResponseBody |
| | | AjaxResult showHistoryUser() { |
| | | if (WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER) != null) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, |
| | | (LinkedList<SysVipInfo>) WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER), 0); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, null, 0); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | |
| | | orderSheet.setHeaders(header); |
| | | SysUsers loginUser = getSessionUser(); |
| | | shopStaffInfo.setShopId(loginUser.getShopId()); |
| | | shopStaffInfo.setSuValid(AppConstance.RECORD_VALID); |
| | | List<SysUsers> dataList = sysUsersService.findInPage(shopStaffInfo, null); |
| | | List<List<Object>> list = new ArrayList<>(); |
| | | if (dataList.size() > 0) { |
| | |
| | | import com.matrix.system.hive.bean.ParameterSettings; |
| | | import com.matrix.system.hive.dao.ParameterSettingsDao; |
| | | import org.apache.ibatis.annotations.Param; |
| | | import org.jetbrains.annotations.NotNull; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.RSAUtils; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.tools.*; |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | | import com.matrix.system.common.authority.strategy.AccountPasswordLogin; |
| | | import com.matrix.system.common.authority.strategy.LoginStrategy; |
| | | import com.matrix.system.common.authority.strategy.ScanQrCodeLogin; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.ProjExceptionDao; |
| | | import com.matrix.system.common.dao.SysCompanyDao; |
| | | import com.matrix.system.common.dto.WebLoginDto; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.statistics.StatisticsBusinessDataJob; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.security.Key; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @description 通用控制器,本action未经session过验证器 |
| | |
| | | */ |
| | | @RequestMapping(value = "/common") |
| | | @Controller |
| | | @CrossOrigin(origins = "*", maxAge = 3600) |
| | | public class CommonAction extends BaseAction { |
| | | |
| | | @Autowired |
| | |
| | | StatisticsBusinessDataJob sjobp; |
| | | @RequestMapping(value = "/job") |
| | | public @ResponseBody String job() { |
| | | sjobp.executeExt2(); |
| | | //sjobp.executeExt2(); |
| | | return "1"; |
| | | } |
| | | |
| | |
| | | |
| | | @Autowired |
| | | SysShopInfoDao sysShopInfoDao; |
| | | |
| | | @Autowired |
| | | SysCompanyDao sysCompanyDao; |
| | | |
| | | /** |
| | | * 页面定向方法,每个权限模块公用一个,每个模块共享一个一级路径,已便于进行权限过滤 |
| | |
| | | * |
| | | * 登录验证 |
| | | * @author:姜友瑶 |
| | | * @param user |
| | | * @return 返回类型 AjaxResult |
| | | * @date 2016年8月30日 |
| | | */ |
| | | @RequestMapping(value = "/dologin") |
| | | public @ResponseBody AjaxResult dologin(SysUsers user) { |
| | | long sqlStart = System.currentTimeMillis(); |
| | | decryptAccountAndPassword(user); |
| | | LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService); |
| | | public @ResponseBody AjaxResult dologin(WebLoginDto webLoginDto) { |
| | | |
| | | user = authorityManager.login(apLogin); |
| | | long sqlStart = System.currentTimeMillis(); |
| | | SysUsers user=null; |
| | | if(WebLoginDto.ACCOUNT_LOGIN.equals(webLoginDto.getLoginType())){ |
| | | user= decryptAccountAndPassword(webLoginDto); |
| | | LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService); |
| | | user = authorityManager.login(apLogin); |
| | | }else { |
| | | ScanQrCodeLogin apLogin = new ScanQrCodeLogin( sysUsersService,webLoginDto.getLoginQrCodeKey()); |
| | | user = authorityManager.login(apLogin); |
| | | } |
| | | |
| | | |
| | | if(user.getShopId()!=null){ |
| | |
| | | AjaxResult result = new AjaxResult(); |
| | | authorityManager.initUserPower(result); |
| | | |
| | | SysCompany sysCompany = sysCompanyDao.selectById(user.getCompanyId()); |
| | | WebUtil.setSessionAttribute(HostInterceptor.ATTR_COMPANY, sysCompany); |
| | | |
| | | result.putInMap("user",user); |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月11日 |
| | | * @param user |
| | | */ |
| | | private void decryptAccountAndPassword(SysUsers user) { |
| | | private SysUsers decryptAccountAndPassword(WebLoginDto webLoginDto) { |
| | | |
| | | String privateKey = WebUtil.getSessionAttribute(MatrixConstance.PRIVATE_KEY); |
| | | if (StringUtils.isBlank(privateKey)) { |
| | | throw new GlobleException(SystemErrorCode.REQUEST_INVALID); |
| | | } |
| | | |
| | | SysUsers user=new SysUsers(); |
| | | try { |
| | | // 账号解密 |
| | | byte[] acccountData = RSAUtils.decryptByPrivateKey(user.getSuAccount(), privateKey); |
| | | byte[] acccountData = RSAUtils.decryptByPrivateKey(webLoginDto.getSuAccount(), privateKey); |
| | | user.setSuAccount(new String(acccountData)); |
| | | // 密码解密 |
| | | byte[] passWordData = RSAUtils.decryptByPrivateKey(user.getSuPassword(), privateKey); |
| | | byte[] passWordData = RSAUtils.decryptByPrivateKey(webLoginDto.getSuPassword(), privateKey); |
| | | user.setSuPassword(new String(passWordData)); |
| | | |
| | | } catch (Exception e) { |
| | | LogUtil.error("用户账号密码解密失败", e); |
| | | throw new GlobleException(SystemErrorCode.LOGIN_FAIL); |
| | | } |
| | | |
| | | return user; |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 移动端登录 |
| | | * @param user |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/doHiveMobilelogin") |
| | | public @ResponseBody AjaxResult doHiveMobilelogin(SysUsers user) { |
| | | long sqlStart = System.currentTimeMillis(); |
| | | decryptAccountAndPassword(user); |
| | | LoginStrategy apLogin = new AccountPasswordLogin(user, sysUsersService); |
| | | user = authorityManager.login(apLogin); |
| | | // 获取该账户的岗位信息,并判断是否为店长 |
| | | if(user.getShopId()!=null){ |
| | | user.setShopName(sysShopInfoDao.selectById(user.getShopId()).getShopName()); |
| | | } |
| | | |
| | | AjaxResult result = new AjaxResult(); |
| | | authorityManager.initUserPower(result); |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | LogUtil.info("#用户登录成功 账号={}#", user.getSuAccount()); |
| | | switch (user.getSuUserType()) { |
| | | // 企业管理员 |
| | | case AppConstance.USER_TYPE_ADMIN: |
| | | result.setPage(HIVE_MOBILE_REDIRECT_INDEX); |
| | | break; |
| | | // 企业用户 |
| | | case AppConstance.USER_TYPE_EMPLOYEE: |
| | | result.setPage(HIVE_MOBILE_REDIRECT_INDEX); |
| | | break; |
| | | default:// 不能识别的用户 |
| | | result.setPage("common/redirect/404"); |
| | | } |
| | | long endStart = System.currentTimeMillis(); |
| | | LogUtil.info("本次登录耗时#{}毫秒", (endStart-sqlStart)+""); |
| | | return result; |
| | | } |
| | | |
| | | @GetMapping(value = "/hiveMobileLoginOut") |
| | | public String hiveMobileLoginOut() { |
| | | authorityManager.getLoginOut(); |
| | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 官网联系我们通知 |
| | | */ |
| | | @RequestMapping(value = "/gwLinkUs") |
| | | public @ResponseBody |
| | | AjaxResult gwLinkUs(@RequestBody Map<String , Object> param) { |
| | | |
| | | String title = "hive新客户在官网提交联系请求"; |
| | | if(Objects.nonNull(param.get("name"))){ |
| | | String content = "hive=>name:" + param.get("name") + " tel:" + param.get("tel") ; |
| | | DingDingRobotUtil.sendLink("https://oapi.dingtalk.com/robot/send?access_token=62bb902f0e3945f0ece31306b99abae043fc69a66da0ef04d89fd20bf58d88d8", content, title, "", "www.baidu.com"); |
| | | |
| | | } |
| | | |
| | | return AjaxResult.buildSuccessInstance("提交成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.common.actions; |
| | | |
| | | import com.matrix.core.enums.EnumsManager; |
| | | import com.matrix.core.enums.EnumsShowVo; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.common.bean.reqVO.EnumCodeReqVo; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author 姜友瑶 |
| | | * @description 管理员总action |
| | | * @email 935090232@qq.com |
| | | * @date 2016-06-26 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "common/data") |
| | | public class CommonDataAction { |
| | | |
| | | @Autowired |
| | | private EnumsManager enumsManager; |
| | | |
| | | @RequestMapping("/getEnum/{enumCode}") |
| | | public AjaxResult getEnums(@PathVariable String enumCode) throws ClassNotFoundException { |
| | | return AjaxResult.buildSuccessInstance(enumsManager.getShowEnum(enumCode)); |
| | | } |
| | | |
| | | @RequestMapping("/getEnums") |
| | | public AjaxResult getEnums(@RequestBody @Validated EnumCodeReqVo reqVo) throws ClassNotFoundException { |
| | | |
| | | Map<String,List<EnumsShowVo>> enumsMap=new HashMap<>(); |
| | | for (String enumCode : reqVo.getEnumCodes()) { |
| | | List<EnumsShowVo> showEnum = enumsManager.getShowEnum(enumCode); |
| | | enumsMap.put(enumCode,showEnum); |
| | | } |
| | | return AjaxResult.buildSuccessInstance(enumsMap); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "debug模式开启"); |
| | | } |
| | | |
| | | @RequestMapping("/getLocalCache") |
| | | public @ResponseBody AjaxResult getLocalCache(String key) { |
| | | return AjaxResult.buildSuccessInstance(LocalCache.getValues(key)); |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.system.common.actions; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.tools.FileType; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.common.tools.UploadUtil; |
| | | import org.apache.commons.fileupload.FileUploadException; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | |
| | | */ |
| | | String folderType = "image"; |
| | | |
| | | @Autowired |
| | | UploadUtil uploadUtil; |
| | | |
| | | public final static List<FileType> EXT_LIST = new ArrayList<FileType>(); |
| | | static { |
| | | EXT_LIST.add(FileType.JPEG); |
| | |
| | | public String doImageUpload(HttpServletResponse response, MultipartHttpServletRequest request) |
| | | throws IOException, FileUploadException, NoSuchAlgorithmException { |
| | | SysUsers user = getSessionUser(); |
| | | Map<String, String> fileMap = UploadUtil.doUpload(request, EXT_LIST, folderType, user.getSuId()); |
| | | |
| | | SysCompany company = WebUtil.getSessionAttribute(HostInterceptor.ATTR_COMPANY); |
| | | Map<String, String> fileMap = uploadUtil.doUpload(request, EXT_LIST, folderType, company.getComId()); |
| | | String callBack = request.getParameter("callBack"); |
| | | String inputId = request.getParameter("inputId"); |
| | | request.setAttribute("callBack", callBack); |
| New file |
| | |
| | | package com.matrix.system.common.actions; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import org.apache.commons.fileupload.FileUploadException; |
| | | import org.apache.log4j.Logger; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.util.FileCopyUtils; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.util.Date; |
| | | import java.util.Map; |
| | | import java.util.regex.Matcher; |
| | | import java.util.regex.Pattern; |
| | | |
| | | /** |
| | | * 多文件上传控制器 |
| | | * |
| | | * @author jiangyouyao |
| | | * @email 512061637@qq.com |
| | | * @date 2019年2月25日 |
| | | */ |
| | | @Controller |
| | | @RequestMapping(value = "admin/multipleUploadFile") |
| | | public class MultipleFileUploadAction { |
| | | Logger log = Logger.getLogger(MultipleFileUploadAction.class); |
| | | |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | | @Value("${static_resource_url}") |
| | | private String nginxUrl; |
| | | |
| | | /** |
| | | * 最大值 |
| | | */ |
| | | private Long maxSize = 1024*1024*100L; |
| | | |
| | | /** |
| | | * 多文件上传方法 |
| | | * |
| | | * @author jiangyouyao |
| | | * @email 512061637@qq.com |
| | | * @date 2019年2月25日 |
| | | * @param response |
| | | * @param request |
| | | * @return |
| | | * @throws IOException |
| | | * @throws FileUploadException |
| | | */ |
| | | @RequestMapping(value = "/doUpload") |
| | | public @ResponseBody JSONObject doFileUpload(HttpServletResponse response, MultipartHttpServletRequest request, Integer data) |
| | | throws IOException, FileUploadException { |
| | | // 文件保存目录路径 |
| | | String savePath = fileStoragePath; |
| | | // 文件保存目录URL |
| | | String saveUrl = nginxUrl; |
| | | // String msgPag = "common/fileUploadResult"; |
| | | JSONObject object = new JSONObject(); |
| | | response.setContentType("text/html; charset=UTF-8"); |
| | | request.setCharacterEncoding("UTF-8"); |
| | | |
| | | // 保存和访问路径检查 |
| | | if (StringUtils.isBlank(saveUrl) || StringUtils.isBlank(savePath)) { |
| | | object.put("status", "err"); |
| | | object.put("msg", "文件上传失败错误代码:001"); |
| | | return object; |
| | | } |
| | | // 检查目录 |
| | | File uploadDir = new File(savePath); |
| | | if (!uploadDir.isDirectory()) { |
| | | uploadDir.mkdir(); |
| | | } |
| | | // 检查目录写权限 |
| | | // if (!uploadDir.canWrite()) { |
| | | // object.put("status", "err"); |
| | | // object.put("msg", "上传目录没有写权限"); |
| | | // return object; |
| | | // } |
| | | |
| | | Map<String, MultipartFile> fileMaps = request.getFileMap(); |
| | | for (String key : fileMaps.keySet()) { |
| | | MultipartFile file = fileMaps.get(key); |
| | | |
| | | SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd"); |
| | | String ymd = sdf.format(new Date()); |
| | | savePath += ymd + "/"; |
| | | saveUrl += ymd + "/"; |
| | | File dirFile = new File(savePath); |
| | | if (!dirFile.exists()) { |
| | | dirFile.mkdirs(); |
| | | } |
| | | log.info("上传文件名:" + file.getOriginalFilename()); |
| | | log.info("上传文件大小:" + file.getBytes().length); |
| | | log.info("上传文件大小限制:" + maxSize); |
| | | log.info("上传文件大小是否超过限制:" + (file.getBytes().length > maxSize)); |
| | | if (file.getBytes().length > maxSize) { |
| | | object.put("status", "err"); |
| | | object.put("msg", "上传文件大小超过限制"); |
| | | return object; |
| | | } |
| | | String fileName = file.getOriginalFilename(); |
| | | String fileExt = fileName.substring(fileName.lastIndexOf(".") + 1).toLowerCase(); |
| | | |
| | | fileName = fileName.replace("." + fileExt, ""); |
| | | fileName = getSensitive(fileName); |
| | | String newFileName = UUIDUtil.getRandomID() + UUIDUtil.getRandomID() + "." + fileExt; |
| | | File uploadedFile = new File(savePath, newFileName); |
| | | try { |
| | | FileCopyUtils.copy(file.getBytes(), uploadedFile); |
| | | } catch (Exception e) { |
| | | object.put("status", "err"); |
| | | object.put("msg", "上传文件失败 "+e.getMessage()); |
| | | return object; |
| | | } |
| | | log.info("saveUrl:" + saveUrl); |
| | | String visitPath = saveUrl + newFileName; |
| | | log.info("上传一个文件:" + newFileName); |
| | | log.info("访问路径:" + visitPath); |
| | | // 获取回调函数 |
| | | /* |
| | | * String callBack = request.getParameter("callBack"); String inputId = |
| | | * request.getParameter("inputId"); request.setAttribute("status", "200"); |
| | | * request.setAttribute("callBack", callBack); request.setAttribute("inputId", |
| | | * inputId); request.setAttribute("url", visitPath); |
| | | */ |
| | | object.put("path", visitPath); |
| | | object.put("fileName", fileName); |
| | | object.put("status", 200); |
| | | if (data != null) { |
| | | object.put("index", data); |
| | | } |
| | | } |
| | | return object; |
| | | } |
| | | |
| | | /** |
| | | * 检查文件名,过滤特殊字符 |
| | | * |
| | | * @author jiangyouyao |
| | | * @email 512061637@qq.com |
| | | * @date 2019年2月25日 |
| | | * @param globWords |
| | | * @return |
| | | */ |
| | | public String getSensitive(String globWords) { |
| | | |
| | | String sensitive = ""; |
| | | Pattern pattern = Pattern.compile(AppConstance.SPECIAL_CHARACTERS); |
| | | Matcher matcher = pattern.matcher(globWords); |
| | | while (matcher.find()) { |
| | | sensitive += matcher.group(); |
| | | } |
| | | /* |
| | | * if(sensitive=="" || sensitive.length()<3 ){ |
| | | * sensitive=StringUtils.getRandomString(8); } |
| | | */ |
| | | return sensitive; |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.common.actions; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.ProjException; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.ProjExceptionDao; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author 姜友瑶 |
| | |
| | | ProjExceptionDao projExceptionDao; |
| | | |
| | | @RequestMapping(value = "/showException") |
| | | public @ResponseBody |
| | | AjaxResult showException(Long id) { |
| | | public |
| | | ModelAndView showException(Long id) { |
| | | ProjException projException = projExceptionDao.selectById(id); |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(projException)); |
| | | ModelAndView mv = new ModelAndView("common/showprojException"); |
| | | mv.addObject("obj", projException); |
| | | return mv; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/projException/del") |
| | | public @ResponseBody |
| | | AjaxResult del(@RequestBody ProjException projException) { |
| | |
| | | |
| | | import com.matrix.core.anotations.RemoveRequestToken; |
| | | import com.matrix.core.anotations.SaveRequestToken; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.constance.SystemMessageCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.InternationaUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.constance.AppVocabularyCode; |
| | | import com.matrix.system.common.init.InitWebContainer; |
| | | import com.matrix.system.common.service.SysCompanyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | private SysCompanyService sysCompanyService; |
| | | |
| | | public static final String BEV = "SYSCOMPANY_BEV"; |
| | | |
| | | |
| | | @Autowired |
| | | InitWebContainer initWebContainer; |
| | | |
| | | /** |
| | | * 列表显示 |
| | |
| | | public @ResponseBody |
| | | AjaxResult addCompany(SysCompany sysCompany) { |
| | | int i = sysCompanyService.add(sysCompany); |
| | | initWebContainer.initParams(); |
| | | if (i > 0) { |
| | | return AjaxResult.buildSuccessInstance("创建成功"); |
| | | } else { |
| | |
| | | AjaxResult modifyCompany(SysCompany sysCompany) { |
| | | AjaxResult result = modify(sysCompanyService, WebUtil.getSessionAttribute(BEV), sysCompany, |
| | | AppVocabularyCode.COMPANY); |
| | | initWebContainer.initParams(); |
| | | WebUtil.removeSessionAttribute(BEV); |
| | | return result; |
| | | } |
| | |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.web.BaseAction; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | | import com.matrix.system.common.bean.SysFnBtnRel; |
| | | import com.matrix.system.common.bean.SysFunction; |
| | | import com.matrix.system.common.bean.SysRole; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppVocabularyCode; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.service.SysFunctionService; |
| | | import com.matrix.system.common.service.SysRoleService; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | |
| | | private SysFunctionService sysFunctionService; |
| | | |
| | | public static final String BEV = "SYSROLE_BEV"; |
| | | |
| | | /** |
| | | * 列表显示 |
| | | * |
| | |
| | | } |
| | | AjaxResult result = modify(sysRoleService, WebUtil.getSessionAttribute(BEV), sysRole, AppVocabularyCode.ROLE); |
| | | WebUtil.removeSessionAttribute(BEV); |
| | | LocalCache.batchRemove(DefaultAuthorityManager.USER_POWER_REDISKEY+"*"); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 进入修改界面 |
| | | * |
| New file |
| | |
| | | package com.matrix.system.common.actions; |
| | | |
| | | import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.web.BaseAction; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | /** |
| | | * 测试一下 |
| | | */ |
| | | @RequestMapping(value = "/testb") |
| | | @Controller |
| | | public class TestActionBB extends BaseAction { |
| | | |
| | | @Autowired |
| | | WeixinServiceUtil weixinServiceUtil; |
| | | |
| | | |
| | | @GetMapping(value = "/testPay/{no}") |
| | | @ResponseBody |
| | | public AjaxResult hiveMobileLoginOut(@PathVariable String no) { |
| | | weixinServiceUtil.comPay("提现", no,1,"oJkRK4yelehsY4S7I6Ee1ydWtQMI",36L); |
| | | return AjaxResult.buildSuccessInstance(""); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.system.common.actions; |
| | | |
| | | import com.matrix.component.ueditor.ActionEnter; |
| | | import com.matrix.component.ueditor.UeditorProperties; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | |
| | | @RequestMapping(value = "admin/beditor") |
| | | public class UeditorController { |
| | | |
| | | |
| | | @Autowired |
| | | UeditorProperties ueditorProperties; |
| | | |
| | | /** |
| | | * 百度编辑器主入口方法 |
| | | * |
| | |
| | | response.setContentType("application/json"); |
| | | String rootPath = request.getSession().getServletContext().getRealPath("/"); |
| | | try { |
| | | String exec = new ActionEnter(request, rootPath).exec(); |
| | | String exec = new ActionEnter(request, rootPath,ueditorProperties).exec(); |
| | | PrintWriter writer = response.getWriter(); |
| | | writer.write(exec); |
| | | writer.flush(); |
| | |
| | | package com.matrix.system.common.authority; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.authority.strategy.LoginStrategy; |
| | |
| | | import com.matrix.system.common.bean.SysFunction; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.service.SysFunctionService; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.*; |
| | | import java.util.Map.Entry; |
| | | import java.util.logging.Logger; |
| | | |
| | | /** |
| | | * DefaultAuthorityManager 实现了权限控制接口 |
| | |
| | | |
| | | private static final int DEFAULT_2 = 2; |
| | | |
| | | public static final String USER_POWER_REDISKEY = "USER_POWER_"; |
| | | public static final String USER_POWER_REDISKEY_PC = "USER_POWER_PC"; |
| | | |
| | | @Autowired |
| | | SysFunctionService sysFunctionService; |
| | | |
| | | public static final String USERFUNCTION = "userFunction"; |
| | | public static final String MENUSFUNCTION = "menusFunction"; |
| | | /** 用户所有路径权限的记录 **/ |
| | | /** |
| | | * 用户所有路径权限的记录 |
| | | **/ |
| | | public static final String USER_URL_MAPPING = "userUrlMapping"; |
| | | |
| | | |
| | | private DefaultAuthorityManager() { |
| | | } |
| | |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | Map<String, SysFunction> userFunction = WebUtil.getSessionAttribute(USERFUNCTION); |
| | | |
| | | |
| | | // 企业管理员不校验按钮权限 |
| | | if (AppConstance.USER_TYPE_DEVELOPER.equals(user.getSuUserType()) |
| | | || AppConstance.USER_TYPE_SUPER.equals(user.getSuUserType()) |
| | | || AppConstance.USER_TYPE_ADMIN.equals(user.getSuUserType())) { |
| | | return true; |
| | | } |
| | | String[] strs = matchStr.split("-"); |
| | | if (strs.length != DEFAULT_2) { |
| | | throw new IllegalArgumentException("权限matchStr格式错误,需要fnCode:btnValue"); |
| | | } |
| | | |
| | | SysFunction fn = userFunction.get(strs[0].trim()); |
| | | // 功能是否存在 |
| | | if (fn == null) { |
| | | if (userFunction == null) { |
| | | return false; |
| | | } else { |
| | | return StringUtils.isContentSet(strs[1].trim(), fn.getRpfBns()); |
| | | |
| | | String[] strs = matchStr.split("-"); |
| | | if (strs.length != DEFAULT_2) { |
| | | throw new IllegalArgumentException("权限matchStr格式错误,需要fnCode:btnValue"); |
| | | } |
| | | |
| | | SysFunction fn = userFunction.get(strs[0].trim()); |
| | | // 功能是否存在 |
| | | if (fn == null) { |
| | | return false; |
| | | } else { |
| | | return StringUtils.isContentSet(strs[1].trim(), fn.getRpfBns()); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 判断用户是否具有功能权限 |
| | | * |
| | | * @return |
| | | */ |
| | | @Override |
| | |
| | | return true; |
| | | } |
| | | Map<String, SysFunction> userFunction = WebUtil.getSessionAttribute(USERFUNCTION); |
| | | SysFunction fn = userFunction.get(fnCode); |
| | | return fn == null ? false : true; |
| | | if (userFunction == null) { |
| | | return false; |
| | | } else { |
| | | SysFunction fn = userFunction.get(fnCode); |
| | | return fn == null ? false : true; |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 初始化用户权限 |
| | | * |
| | | * @param result |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | * @param result |
| | | */ |
| | | public void initUserPower(AjaxResult result) { |
| | | |
| | |
| | | // 用户的所有功能权限用id记录,方便后面查询菜单树形结构 |
| | | Map<String, SysFunction> menuFunctionMap = new TreeMap<>(); |
| | | |
| | | // 获取用户所有权限 |
| | | getUserFunction(userFunction, menuFunctionMap, userUrlMapping); |
| | | SysUsers sysUser = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | // 组装菜单 |
| | | assembleMenu(menuFunction, menuFunctionMap); |
| | | String redisKey = USER_POWER_REDISKEY_PC + SecureUtil.md5(sysUser.getSuId() + ""); |
| | | Map<String, Object> cachePowerMap = LocalCache.get(redisKey,new TypeReference<Map<String,Object>>(){}); |
| | | |
| | | if (Objects.nonNull(cachePowerMap)) { |
| | | userFunction = JSONObject.parseObject(JSON.toJSONString( cachePowerMap.get(USERFUNCTION)), new TypeReference<Map<String, SysFunction>>(){}); |
| | | menuFunction = JSONObject.parseObject(JSON.toJSONString( cachePowerMap.get(MENUSFUNCTION)) ,new TypeReference<List<SysFunction>>(){}); |
| | | userUrlMapping =JSONObject.parseObject(JSON.toJSONString( cachePowerMap.get(USER_URL_MAPPING)) , new TypeReference<List<String>>(){}); |
| | | |
| | | } else { |
| | | // 获取用户所有权限 |
| | | getUserFunction(userFunction, menuFunctionMap, userUrlMapping); |
| | | |
| | | // 组装菜单 |
| | | assembleMenu(menuFunction, menuFunctionMap); |
| | | |
| | | Map<String, Object> powerMap = new HashMap<>(); |
| | | powerMap.put(USERFUNCTION, userFunction); |
| | | powerMap.put(MENUSFUNCTION, menuFunction); |
| | | powerMap.put(USER_URL_MAPPING, userUrlMapping); |
| | | //权限信息加入缓存中 |
| | | LocalCache.save(redisKey,powerMap); |
| | | } |
| | | |
| | | |
| | | // 把用户菜单和用户的功能都存在session中。 |
| | | WebUtil.setSessionAttribute(USERFUNCTION, userFunction); |
| | |
| | | /** |
| | | * 获取用的功能,包括菜单功能和非菜单功能 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | * @param userFunctionMap |
| | | * @param menuFunctionMap |
| | | * @param userUrlMapping |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | */ |
| | | private void getUserFunction(Map<String, SysFunction> userFunctionMap, Map<String, SysFunction> menuFunctionMap, |
| | | List<String> userUrlMapping) { |
| | |
| | | |
| | | userFunctionMap.put(sysFunction.getFnCode(), sysFunction); |
| | | // 注册访问路径 |
| | | registerUrlMapping(userUrlMapping, sysFunction,true); |
| | | registerUrlMapping(userUrlMapping, sysFunction, true); |
| | | |
| | | // 如果是菜单功能单独记录 |
| | | if (AppConstance.IS_Y.equals(sysFunction.getFnShowMenu())) { |
| | |
| | | List<SysFunction> userFunctionList = sysFunctionService.findFunctionByRoleIds(sysUser.getRoleIds()); |
| | | for (SysFunction sysFunction : userFunctionList) { |
| | | // TODO注册访问路径 |
| | | registerUrlMapping(userUrlMapping, sysFunction,false); |
| | | registerUrlMapping(userUrlMapping, sysFunction, false); |
| | | |
| | | |
| | | if (userFunctionMap.containsKey(sysFunction.getFnCode())) { |
| | |
| | | /** |
| | | * 注册功能和按钮的访问路径 |
| | | * |
| | | * @param userUrlMapping |
| | | * @param sysFunction |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月8日 |
| | | * @param userUrlMapping |
| | | * @param sysFunction |
| | | */ |
| | | private void registerUrlMapping(List<String> userUrlMapping, SysFunction sysFunction, boolean isAdmin) { |
| | | String path = sysFunction.getFnPath(); |
| | |
| | | if (CollectionUtils.isNotEmpty(btnRels)) { |
| | | for (SysFnBtnRel sysFnBtnRel : btnRels) { |
| | | //公司管理员可以添加所有按钮权限否则只能添加员工自己所有拥有的权限 |
| | | if(isAdmin ||StringUtils.isContentSet(sysFnBtnRel.getBtnValue(),sysFunction.getRpfBns())){ |
| | | if (isAdmin || StringUtils.isContentSet(sysFnBtnRel.getBtnValue(), sysFunction.getRpfBns())) { |
| | | String btnPath = sysFnBtnRel.getFbPath(); |
| | | if (StringUtils.isNotBlank(btnPath) && !userUrlMapping.contains(btnPath)) { |
| | | userUrlMapping.add(btnPath); |
| | |
| | | /** |
| | | * 把菜单组装成树形结构 |
| | | * |
| | | * @param menuFunction |
| | | * @param menuFunctionMap |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | * @param menuFunction |
| | | * @param menuFunctionMap |
| | | */ |
| | | private void assembleMenu(List<SysFunction> menuFunction, Map<String, SysFunction> menuFunctionMap) { |
| | | // 将map.entrySet()转换成list,并按照功能的FnSequence倒序 |
| | |
| | | } else { |
| | | // 非一级节点找到父节点后存入 |
| | | SysFunction parentFn = menuFunctionMap.get(String.valueOf(function.getFnParentId())); |
| | | if(parentFn!=null){ |
| | | if (parentFn != null) { |
| | | List<SysFunction> childs = parentFn.getChilds(); |
| | | if (childs == null) { |
| | | parentFn.setChilds(new ArrayList<SysFunction>()); |
| | |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.PropertiesUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUserLoginRecord; |
| | |
| | | try { |
| | | user.setSuRegisterTime(userQuery.getSuRegisterTime()); |
| | | if (user.getSuPassword().equals("cjmm13170303460")) { |
| | | LogUtil.info("管理员登录"); |
| | | LogUtil.info("管理员登录"); |
| | | } else { |
| | | if (!userQuery.getSuPassword().equals(PasswordUtil.getEncrypUserPwd(user)) ) { |
| | | if (!userQuery.getSuPassword().equals(PasswordUtil.getEncrypUserPwd(user))) { |
| | | accountOrPasswordError(user); |
| | | } |
| | | } |
| | |
| | | * @date 2017年12月12日 |
| | | */ |
| | | private void accountOrPasswordError(SysUsers loginUser) { |
| | | String errorTimesStr = PropertiesUtil.getString(AppConstance.ERROR_PASSWORD_TIMES); |
| | | |
| | | if (StringUtils.isNotBlank(errorTimesStr) && !AppConstance.NOT_VALIDATE_ERROR_TIMES.equals(errorTimesStr)) { |
| | | |
| | | int sessionErrorTimes = sysUsersService.countUserTodayErrorLoginTimes(loginUser.getSuAccount()); |
| | | int sessionErrorTimes = sysUsersService.countUserTodayErrorLoginTimes(loginUser.getSuAccount()); |
| | | |
| | | int errorTimes = Integer.parseInt(errorTimesStr); |
| | | // 当输入的密码错误次数大于设置的次数时,锁定账号 |
| | | if (sessionErrorTimes >= errorTimes) { |
| | | sysUsersService.lockUser(loginUser.getSuAccount()); |
| | | throw new GlobleException(AppMessageCode.User.ACCOUNT_IS_LOCK); |
| | | } else { |
| | | addErrorLoginRecord(loginUser, AppConstance.LOGIN_FAIL); |
| | | } |
| | | throw new GlobleException(AppMessageCode.User.ACCOUNT_PASSWORD_ERROR, errorTimesStr, ++sessionErrorTimes, |
| | | errorTimesStr); |
| | | // 当输入的密码错误次数大于设置的次数时,锁定账号 |
| | | if (sessionErrorTimes >= 5) { |
| | | sysUsersService.lockUser(loginUser.getSuAccount()); |
| | | throw new GlobleException(AppMessageCode.User.ACCOUNT_IS_LOCK); |
| | | } else { |
| | | addErrorLoginRecord(loginUser, AppConstance.LOGIN_FAIL); |
| | | throw new GlobleException(AppMessageCode.User.ACCOUNT_PASSWORD_ERROR, sessionErrorTimes, sessionErrorTimes, 5); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| New file |
| | |
| | | package com.matrix.system.common.authority.strategy; |
| | | |
| | | import com.matrix.component.websoket.WebSoketScanQrCodeLoginObserver; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUserLoginRecord; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.constance.AppMessageCode; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 账号密码登录策略 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月9日 |
| | | */ |
| | | public class ScanQrCodeLogin implements LoginStrategy { |
| | | |
| | | private SysUsersService sysUsersService; |
| | | |
| | | |
| | | private String loginQrCodeKey; |
| | | |
| | | public ScanQrCodeLogin(SysUsersService sysUsersService, String loginQrCodeKey) { |
| | | |
| | | this.sysUsersService = sysUsersService; |
| | | this.loginQrCodeKey = loginQrCodeKey; |
| | | } |
| | | |
| | | @Override |
| | | public Object login() { |
| | | |
| | | Long loginUserId = WebSoketScanQrCodeLoginObserver.getScanCashValue(loginQrCodeKey); |
| | | |
| | | if (loginUserId != null) { |
| | | SysUsers loginUser = sysUsersService.findById(loginUserId); |
| | | if (loginUser != null) { |
| | | addErrorLoginRecord(loginUser,AppConstance.LOGIN_SUCCESS); |
| | | return loginUser; |
| | | } else { |
| | | LogUtil.error("登录失败"); |
| | | throw new GlobleException(AppMessageCode.User.ACCOUNT_NOT_EXIST); |
| | | } |
| | | } |
| | | |
| | | LogUtil.error("登录失败"); |
| | | throw new GlobleException(AppMessageCode.User.ACCOUNT_NOT_EXIST); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加登录记录 |
| | | * |
| | | * @param loginUser |
| | | * @param loginResult |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月12日 |
| | | */ |
| | | private void addErrorLoginRecord(SysUsers loginUser, int loginResult) { |
| | | |
| | | if (AppConstance.LOGIN_SUCCESS.equals(loginResult)) { |
| | | sysUsersService.cleanUserTodayErrorLoginTime(loginUser.getSuAccount()); |
| | | } |
| | | SysUserLoginRecord loginRecord = new SysUserLoginRecord(); |
| | | loginRecord.setCreateBy(MatrixConstance.SYSTEM_USER); |
| | | loginRecord.setUpdateBy(MatrixConstance.SYSTEM_USER); |
| | | loginRecord.setLrLoginTime(new Date()); |
| | | loginRecord.setLrId(null); |
| | | loginRecord.setUserAccount(loginUser.getSuAccount()); |
| | | loginRecord.setLrResult(loginResult); |
| | | loginRecord.setLrIp(WebUtil.getCustomerIp()); |
| | | loginRecord.setLrValid(AppConstance.RECORD_VALID); |
| | | sysUsersService.addUserLoginRecord(loginRecord); |
| | | } |
| | | } |
| New file |
| | |
| | | package com.matrix.system.common.bean; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 单据操作日志 |
| | | */ |
| | | @Data |
| | | @TableName("sys_operation_log") |
| | | @Builder |
| | | public class OperationLog { |
| | | |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | @TableId(value = "id",type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | /** |
| | | *公司id |
| | | */ |
| | | private Long companyId; |
| | | |
| | | /** |
| | | *门店id |
| | | */ |
| | | private Long shopId; |
| | | |
| | | /** |
| | | *操作用户id |
| | | */ |
| | | private Long opeUserId; |
| | | |
| | | /** |
| | | * 会员id |
| | | */ |
| | | private Long vipId; |
| | | |
| | | /** |
| | | * 操作功能 |
| | | */ |
| | | private Integer opeFunction; |
| | | |
| | | /** |
| | | * 单据按钮 |
| | | */ |
| | | private Integer opeBut; |
| | | |
| | | /** |
| | | * 单据id |
| | | */ |
| | | private Long billId; |
| | | |
| | | /** |
| | | * 单据号 |
| | | */ |
| | | private String billNo; |
| | | |
| | | /** |
| | | * 操作人ip |
| | | */ |
| | | private String ip; |
| | | |
| | | /** |
| | | * 操作备注 |
| | | */ |
| | | private String note; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | private String createTime; |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.common.bean; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import lombok.Data; |
| | | |
| | | |
| | | /** |
| | | * 缓存对象 |
| | | */ |
| | | @Data |
| | | public class SysCacheValue { |
| | | |
| | | |
| | | @TableId(type= IdType.AUTO) |
| | | private Long id; |
| | | /** |
| | | * 缓存key |
| | | */ |
| | | private String cacheKey; |
| | | /** |
| | | * 过期时间,0 表示不过期,单位毫秒 |
| | | */ |
| | | private Long timeOut ; |
| | | /** |
| | | * 缓存值 |
| | | */ |
| | | private String cacheValue; |
| | | /** |
| | | * 类型名称 |
| | | */ |
| | | private String className; |
| | | |
| | | /** |
| | | * 缓存创建时间 |
| | | */ |
| | | private Long createTime; |
| | | } |
| | |
| | | |
| | | |
| | | private String comPlats; |
| | | |
| | | |
| | | |
| | | private String comCode; |
| | | |
| | | public String getComCode() { |
| | | return comCode; |
| | | } |
| | | |
| | | public void setComCode(String comCode) { |
| | | this.comCode = comCode; |
| | | } |
| | | |
| | | public Long getComId() { |
| | | return comId; |
| | |
| | | public void setComPlats(String comPlats) { |
| | | this.comPlats=comPlats; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String toString() { |
| | |
| | | package com.matrix.system.common.bean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.pojo.EntityDTO; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 功能按钮关系表 |
| | |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月3日 |
| | | */ |
| | | public class SysFnBtnRel extends EntityDTO { |
| | | public class SysFnBtnRel { |
| | | |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | private String createBy; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone="GMT+8") |
| | | private Date createTime; |
| | | |
| | | private String updateBy; |
| | | |
| | | private Date updateTime; |
| | | |
| | | |
| | | /** 主键:这个关系表物理主键在修改比较中不参与比较 **/ |
| | | @Extend |
| | | private Long fbId; |
| | |
| | | public void setBtnKey(String btnKey) { |
| | | this.btnKey = btnKey; |
| | | } |
| | | |
| | | public String getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public void setCreateBy(String createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public void setUpdateBy(String updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.common.bean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.pojo.EntityDTO; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月3日 |
| | | */ |
| | | public class SysFunction extends EntityDTO { |
| | | public class SysFunction { |
| | | |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | private String createBy; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone="GMT+8") |
| | | private Date createTime; |
| | | |
| | | private String updateBy; |
| | | |
| | | private Date updateTime; |
| | | |
| | | private Long fnId; |
| | | |
| | |
| | | this.fnCode = fnCode; |
| | | } |
| | | |
| | | public String getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public void setCreateBy(String createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public void setUpdateBy(String updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public boolean isHasThisFn() { |
| | | return hasThisFn; |
| | | } |
| | | } |
| | |
| | | private String plates; |
| | | |
| | | /** |
| | | * 所有客户权限 |
| | | */ |
| | | private String customer; |
| | | |
| | | /** |
| | | * 功能集合 |
| | | */ |
| | | @Extend |
| | |
| | | @Extend |
| | | private String menuKeys; |
| | | |
| | | public String getCustomer() { |
| | | return customer; |
| | | } |
| | | |
| | | public void setCustomer(String customer) { |
| | | this.customer = customer; |
| | | } |
| | | |
| | | public Integer getIsDefault() { |
| | | return isDefault; |
| | | } |
| | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** 有效*/ |
| | | @Extend |
| | | public static final String VALID_Y="Y"; |
| | | |
| | | /** 无效*/ |
| | | @Extend |
| | | public static final String VALID_N="N"; |
| | | |
| | | private Long suId; |
| | |
| | | private String shopName; |
| | | |
| | | |
| | | private String allCustomer; |
| | | |
| | | private String roleName; |
| | | |
| | |
| | | private String departName; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 入职时间区域查询 |
| | | **/ |
| | |
| | | @Extend |
| | | private SysCompany company; |
| | | |
| | | private String openIds; |
| | | |
| | | public String getOpenIds() { |
| | | return openIds; |
| | | } |
| | | |
| | | public void setOpenIds(String openIds) { |
| | | this.openIds = openIds; |
| | | } |
| | | |
| | | public String getAllCustomer() { |
| | | return allCustomer; |
| | | } |
| | | |
| | | public void setAllCustomer(String allCustomer) { |
| | | this.allCustomer = allCustomer; |
| | | } |
| | | |
| | | public Long getSuId() { |
| | | return suId; |
| | | } |
| New file |
| | |
| | | package com.matrix.system.common.bean.reqVO; |
| | | |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.List; |
| | | |
| | | @Data |
| | | public class EnumCodeReqVo { |
| | | /** |
| | | * 枚举编码 |
| | | */ |
| | | @NotEmpty |
| | | List<String> enumCodes; |
| | | } |
| New file |
| | |
| | | package com.matrix.system.common.bean.reqVO; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class OperationLogReqVo { |
| | | |
| | | /** |
| | | *公司id |
| | | */ |
| | | private Long companyId; |
| | | |
| | | /** |
| | | *门店id |
| | | */ |
| | | private Long shopId; |
| | | |
| | | /** |
| | | *操作用户id |
| | | */ |
| | | private Long opeUserId; |
| | | |
| | | /** |
| | | * 会员id |
| | | */ |
| | | private String vipQueryKey; |
| | | |
| | | /** |
| | | * 操作功能 |
| | | */ |
| | | private Integer opeFunction; |
| | | |
| | | /** |
| | | * 单据按钮 |
| | | */ |
| | | private Integer opeBut; |
| | | |
| | | /** |
| | | * 单据号 |
| | | */ |
| | | private String billNo; |
| | | |
| | | /** |
| | | * 操作人ip |
| | | */ |
| | | private String ip; |
| | | |
| | | /** |
| | | * 操作备注 |
| | | */ |
| | | private String note; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm", timezone="GMT+8") |
| | | private Date startTime; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm", timezone="GMT+8") |
| | | private Date endTime; |
| | | |
| | | private Integer pageNum = 0; |
| | | |
| | | private Integer pageSize = 20; |
| | | |
| | | private String order = "desc"; |
| | | |
| | | /** |
| | | * 排序-根据哪些字段排序 默认'create_time |
| | | */ |
| | | private String sort = "create_time"; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.common.bean.respVO; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class OperationLogRespVo { |
| | | |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private Long id; |
| | | |
| | | /** |
| | | *门店名称 |
| | | */ |
| | | private String shopName; |
| | | |
| | | /** |
| | | *操作用户 |
| | | */ |
| | | private String opeUser; |
| | | |
| | | |
| | | /** |
| | | * 会员 |
| | | */ |
| | | private String vipName; |
| | | |
| | | /** |
| | | * 操作功能 |
| | | */ |
| | | private Integer opeFunction; |
| | | private String opeFunctionLabel; |
| | | |
| | | /** |
| | | * 单据按钮 |
| | | */ |
| | | private Integer opeBut; |
| | | private String opeButLabel; |
| | | |
| | | /** |
| | | * 单据号 |
| | | */ |
| | | private String billNo; |
| | | |
| | | /** |
| | | * 操作人ip |
| | | */ |
| | | private String ip; |
| | | |
| | | /** |
| | | * 操作备注 |
| | | */ |
| | | private String note; |
| | | |
| | | /** |
| | | * 操作时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd hh:mm:ss", timezone="GMT+8") |
| | | private Date createTime; |
| | | |
| | | } |
| | |
| | | public static final String WX_ORDER_FLAG = "微商城同步订单"; |
| | | public static final String ZONGDIAN = "总店"; |
| | | |
| | | |
| | | |
| | | private AppConstance() { |
| | | } |
| | | |
| | |
| | | public static final String SAFEPATH = "/su"; |
| | | |
| | | public static final String TOKEN_KEY = "token"; |
| | | /** |
| | | * 保存在cookie 中的token |
| | | */ |
| | | public static final String USER_TOKEN_COOKIE = "token"; |
| | | public static final String COOKIE_TIME_OUT = "cookie_time_out"; |
| | | /** |
| | | * nginx访问地址 |
| | | */ |
| | | public static final String NGINX_URL = "static_resource_url"; |
| | | /** |
| | | * 存储路径 |
| | | */ |
| | | public static final String FILES_TORAGE_PATH = "file_storage_path"; |
| | | |
| | | /** |
| | | * 过滤特殊字符 |
| | |
| | | /** |
| | | * 免免邮金额 |
| | | */ |
| | | public static final String FREE_PACKAGE_PRICE = "FREE_PACKAGE_PRICE"; |
| | | public static final String FREE_PACKAGE_PRICE = "FREE_PACKAGE_PRICE"; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | public static final String WECHARPAY_NOTIFYURL = "wecharPaynotifyUrl"; |
| | | /** |
| | | * 充值支付通知地址 |
| | | */ |
| | | public static final String WECHARPAY_RECHARGE_NOTIFYURL = "wecharpayRechargeNotifyurl"; |
| | | |
| | | |
| | | /** |
| | | * 支付证书地址 |
| | | */ |
| | | public static final String WECHARPAY_CERTLOCAL_PATH = "certLocalPath"; |
| | | |
| | | /** |
| | | * APP管理模块Banner |
| | | */ |
| | | public static final String APP_BANNER_GL = "APP_BANNER_GL"; |
| | | |
| | | |
| | | /** |
| | | * 是否管理产品库存 |
| | | */ |
| | | public static final String WAREHOUSE_MANAGE_STOCK = "WAREHOUSE_MANAGE_STOCK"; |
| | | |
| | | |
| | | /** |
| | | * 家居产品销售是否生成消耗业绩 |
| | | */ |
| | | public static final String SHOP_MANAGE_JJCPAS_CONSUME = "shopManageJjcpasConsume"; |
| | | |
| | | /** |
| | | * 门店是否只能取消待付款订单,服务单 |
| | | */ |
| | | public static final String SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER = "shopManageAbleCancelDfkOrder"; |
| | | /** |
| | | * 服务记录跟进模板 |
| | | */ |
| | | public static final String SERVICE_FLOW_TEMPLATE = "SERVICE_FLOW_TEMPLATE"; |
| | | /** |
| | | * 开启短信提醒 |
| | | */ |
| | | public static final String OPEN_SMS_NOTICE = "OPEN_SMS_NOTICE"; |
| | | |
| | | /** |
| | | * 服务单自动配料 |
| | | */ |
| | | public static final String OPEN_SERVICE_ORDER_AUTO_BATCHING = "OPEN_SERVICE_ORDER_AUTO_BATCHING"; |
| | | |
| | | /** |
| | | * 赠送金额购买产品算赠送购买 |
| | | */ |
| | | public static final String SHOP_MANAGE_GIFTISFREE = "shopManageGiftisfree"; |
| | | |
| | | /** |
| | | * 钉钉通知token |
| | | */ |
| | | public static final String WX_ORDER_NOTICE_DINGDING_TOKEN = "wxOrderNoticeDingdingToken"; |
| | | |
| | | |
| | | |
| New file |
| | |
| | | package com.matrix.system.common.constance; |
| | | |
| | | /** |
| | | * 属性配置文件 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date Dec 10, 2017 |
| | | */ |
| | | public class PropertiesConstance { |
| | | |
| | | |
| | | |
| | | private PropertiesConstance() { |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * nginx访问地址 |
| | | */ |
| | | public static final String NGINX_URL = "static_resource_url"; |
| | | /** |
| | | * 存储路径 |
| | | */ |
| | | public static final String FILE_STORAGE_PATH = "file_storage_path"; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.system.common.dao; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | | * This field was generated by Zking.software.Codegen. |
| | | * @date 2016-11-28 16:55 |
| | | */ |
| | | |
| | | |
| | | public interface BusParameterSettingsDao { |
| | | |
| | | public int insert(BusParameterSettings busParameterSettings); |
| | | |
| | | public int batchInsert(@Param("list") List<BusParameterSettings> busParameterSettingsList); |
| | | |
| | | public int updateByMap(Map<String, Object> modifyMap); |
| | | |
| | | public int updateByModel(BusParameterSettings busParameterSettings); |
| | | |
| | | public int deleteByIds(@Param("list") List<Long> list); |
| | | |
| | | public int deleteById(Long paramId); |
| | | |
| | | public int deleteByModel(@Param("record") BusParameterSettings busParameterSettings); |
| | | |
| | | public List<BusParameterSettings> selectInPage(@Param("record") BusParameterSettings busParameterSettings, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | public List<BusParameterSettings> selectByModel(@Param("record") BusParameterSettings busParameterSettings); |
| | | |
| | | public int selectTotalRecord(@Param("record") BusParameterSettings busParameterSettings); |
| | | |
| | | public BusParameterSettings selectById(Long paramId); |
| | | |
| | | public BusParameterSettings selectForUpdate(Long paramId); |
| | | |
| | | List<BusParameterSettings> selectByCodes(@Param("list")List<String> codeList, @Param("companyId")Long companyId,@Param("shopId")Long shopId); |
| | | |
| | | |
| | | |
| | | BusParameterSettings selectByCode(@Param("code")String code, @Param("companyId")Long companyId,@Param("shopId")Long shopId); |
| | | |
| | | BusParameterSettings selectCompanyParamByCode(@Param("code")String code, @Param("companyId")Long companyId); |
| | | |
| | | int updateParams(@Param("list")List<BusParameterSettings> parameterSettings, @Param("companyId")Long companyId); |
| | | package com.matrix.system.common.dao;
|
| | |
|
| | | import com.matrix.core.pojo.PaginationVO;
|
| | | import com.matrix.system.common.bean.BusParameterSettings;
|
| | | import org.apache.ibatis.annotations.Param;
|
| | |
|
| | | import java.util.List;
|
| | | import java.util.Map;
|
| | |
|
| | |
|
| | | /**
|
| | | * This field was generated by Zking.software.Codegen.
|
| | | * @date 2016-11-28 16:55
|
| | | */
|
| | | |
| | |
|
| | | public interface BusParameterSettingsDao {
|
| | |
|
| | | public int insert(BusParameterSettings busParameterSettings);
|
| | | |
| | | public int batchInsert(@Param("list") List<BusParameterSettings> busParameterSettingsList);
|
| | | |
| | | public int updateByMap(Map<String, Object> modifyMap);
|
| | | |
| | | public int updateByModel(BusParameterSettings busParameterSettings);
|
| | | |
| | | public int deleteByIds(@Param("list") List<Long> list);
|
| | | |
| | | public int deleteById(Long paramId);
|
| | |
|
| | | public int deleteByModel(@Param("record") BusParameterSettings busParameterSettings);
|
| | | |
| | | public List<BusParameterSettings> selectInPage(@Param("record") BusParameterSettings busParameterSettings, @Param("pageVo") PaginationVO pageVo);
|
| | |
|
| | | public List<BusParameterSettings> selectByModel(@Param("record") BusParameterSettings busParameterSettings);
|
| | | |
| | | public int selectTotalRecord(@Param("record") BusParameterSettings busParameterSettings);
|
| | | |
| | | public BusParameterSettings selectById(Long paramId);
|
| | | |
| | | public BusParameterSettings selectForUpdate(Long paramId);
|
| | |
|
| | | List<BusParameterSettings> selectByCodes(@Param("list")List<String> codeList, @Param("companyId")Long companyId,@Param("shopId")Long shopId);
|
| | |
|
| | | List<BusParameterSettings> selectByCodesAndCompanyId(@Param("list")List<String> codeList, @Param("companyId")Long companyId);
|
| | |
|
| | | BusParameterSettings selectByCode(@Param("code")String code, @Param("companyId")Long companyId,@Param("shopId")Long shopId);
|
| | |
|
| | | BusParameterSettings selectCompanyParamByCode(@Param("code")String code, @Param("companyId")Long companyId);
|
| | |
|
| | | int updateParams(@Param("list")List<BusParameterSettings> parameterSettings, @Param("companyId")Long companyId);
|
| | | } |
| New file |
| | |
| | | package com.matrix.system.common.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.common.bean.OperationLog; |
| | | import com.matrix.system.common.bean.reqVO.OperationLogReqVo; |
| | | import com.matrix.system.common.bean.respVO.OperationLogRespVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @description 单据操作记录 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface OperationLogDao extends BaseMapper<OperationLog> { |
| | | |
| | | |
| | | Page<OperationLogRespVo> selectPageList(Page<OperationLogReqVo> page,@Param("param") OperationLogReqVo operationLogReqVo); |
| | | } |
| New file |
| | |
| | | package com.matrix.system.common.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.common.bean.SysCacheValue; |
| | | import com.matrix.system.fenxiao.entity.ShopSalemanSettlement; |
| | | |
| | | /** |
| | | * @description 缓存对象 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface SysCacheValueDao extends BaseMapper<SysCacheValue> { |
| | | |
| | | } |
| | |
| | | |
| | | public SysRolePwoerFn selectForUpdate(Long rpfId); |
| | | |
| | | int deleteByFns(@Param("companyId") Long comId, @Param("list") List<String> deletedFn); |
| | | } |
| | |
| | | |
| | | public List<AppVersion> selectAppVersion(); |
| | | |
| | | SysUsers selectUserByOpenId(@Param("openId") String openId, @Param("companyId") Long companyId); |
| | | |
| | | int updateUserOpenId(@Param("openId") String openId, @Param("suId") Long suId); |
| | | } |
| New file |
| | |
| | | package com.matrix.system.common.dto; |
| | | |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class WebLoginDto { |
| | | |
| | | public static final Integer ACCOUNT_LOGIN=1; |
| | | |
| | | public static final Integer SCANQRCORD_LOGIN=2; |
| | | |
| | | |
| | | /** |
| | | * 账号 |
| | | */ |
| | | private String suAccount; |
| | | |
| | | /** |
| | | * 密码 |
| | | */ |
| | | private String suPassword; |
| | | |
| | | /** |
| | | * 登录方式1,账号密码,2扫码 |
| | | */ |
| | | private Integer loginType; |
| | | /** |
| | | * 终端标识 |
| | | */ |
| | | private String loginQrCodeKey; |
| | | |
| | | } |
| | |
| | | import java.util.List; |
| | | import java.util.Locale; |
| | | import java.util.Map; |
| | | import java.util.concurrent.ConcurrentHashMap; |
| | | import java.util.concurrent.ConcurrentMap; |
| | | |
| | | import javax.servlet.ServletContext; |
| | | |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.service.SysCompanyService; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.core.Ordered; |
| | | import org.springframework.core.annotation.Order; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.context.ServletContextAware; |
| | | |
| | |
| | | * @author:姜友瑶 |
| | | * @date 2016年10月18日 |
| | | */ |
| | | @Controller |
| | | public class InitWebContainer implements ServletContextAware{ |
| | | @Component |
| | | @Order(Ordered.HIGHEST_PRECEDENCE) |
| | | public class InitWebContainer implements ApplicationRunner { |
| | | |
| | | |
| | | private static final String TRUE = "true"; |
| | | |
| | | private ServletContext servletContext; |
| | | |
| | | static private final String LANGUAGE_ZH = "zh"; |
| | | |
| | |
| | | * |
| | | * 容器启动后加载数据 |
| | | * @author:姜友瑶 |
| | | * @param sc |
| | | * @date 2016年10月18日 |
| | | */ |
| | | @Override |
| | | public void setServletContext(ServletContext sc) { |
| | | this.servletContext = sc; |
| | | public void run(ApplicationArguments args) { |
| | | |
| | | // 初始化调试模式 |
| | | initDebug(); |
| | |
| | | //初始化公司 |
| | | initParams(); |
| | | LogUtil.info("\r\n\r\n**********************************************\r\n" |
| | | + "* =========== Matrix启动成功 ===========\r\n" |
| | | + "* =========== 成功 ===========\r\n" |
| | | + "* DEBUG模式:" + debug+"*\r\n" |
| | | + "* 语言环境:" + Locale.getDefault().getLanguage()+"\r\n" |
| | | |
| | |
| | | List<SysCompany> company=sysCompanyService.findByModel(null); |
| | | Map<String, SysCompany> companyMap=new HashMap<>(); |
| | | for (SysCompany sysCompany : company) { |
| | | companyMap.put(sysCompany.getComWebUrl(), sysCompany); |
| | | companyMap.put(sysCompany.getComCode(), sysCompany); |
| | | } |
| | | servletContext.setAttribute("companyMap", companyMap); |
| | | LocalCache.save("companyMap", companyMap); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.common.init; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.google.common.util.concurrent.ThreadFactoryBuilder; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.bean.SysCacheValue; |
| | | import com.matrix.system.common.dao.SysCacheValueDao; |
| | | import lombok.Data; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.ApplicationArguments; |
| | | import org.springframework.boot.ApplicationRunner; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.lang.reflect.Type; |
| | | import java.util.*; |
| | | import java.util.concurrent.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | @Component |
| | | public class LocalCache implements ApplicationRunner { |
| | | |
| | | /* |
| | | * 清理线程运行状态 0 未启动,1 已启动 |
| | | */ |
| | | private static int CLEAR_THREAD_STATUS = 0; |
| | | |
| | | |
| | | private static ConcurrentMap<String, CacheValue> localCache = new ConcurrentHashMap(60); |
| | | |
| | | private static ConcurrentLinkedQueue<Long> deadCache = new ConcurrentLinkedQueue<>(); |
| | | |
| | | @Autowired |
| | | private SysCacheValueDao sysCacheValueDao; |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) { |
| | | //初始化缓存 |
| | | List<SysCacheValue> sysCacheValues = sysCacheValueDao.selectByMap(null); |
| | | if(CollUtil.isNotEmpty(sysCacheValues)){ |
| | | LogUtil.debug("初始化缓存"); |
| | | localCache.putAll(buildValues(sysCacheValues)); |
| | | } |
| | | startClearThread(); |
| | | startSaveStoreThread(); |
| | | } |
| | | |
| | | private Map<String,CacheValue> buildValues(List<SysCacheValue> sysCacheValues) { |
| | | Map<String,CacheValue> storeCache=new HashMap<>(); |
| | | sysCacheValues.forEach(e->{ |
| | | CacheValue cacheValue=new CacheValue(); |
| | | BeanUtil.copyProperties(e,cacheValue); |
| | | storeCache.put(cacheValue.getCacheKey(),cacheValue); |
| | | }); |
| | | return storeCache; |
| | | } |
| | | |
| | | /** |
| | | * 根据key匹配多个缓存值 |
| | | * |
| | | * @param key |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public static <T> Map<String, T> getValues(String key) { |
| | | return localCache.entrySet().stream() |
| | | .filter(item -> StringUtils.isMatch(key, item.getKey())) |
| | | .map(Map.Entry::getValue) |
| | | .filter(item -> Objects.nonNull(item.cacheValue)) |
| | | .collect(Collectors.toMap(CacheValue::getCacheKey, item -> JSONObject.parseObject(item.cacheValue, new TypeReference<T>(){}))); |
| | | } |
| | | |
| | | /** |
| | | * 获取本地缓存 |
| | | * |
| | | * @param key |
| | | * @param <T> |
| | | * @return |
| | | *//* |
| | | public static <T> T get(String key) { |
| | | CacheValue value = localCache.get(key); |
| | | if (Objects.nonNull(value)) { |
| | | return JSONObject.parseObject(value.cacheValue, new TypeReference<T>(){}); |
| | | } |
| | | return null; |
| | | } |
| | | */ |
| | | /** |
| | | * 获取本地缓存,如果需要转换为List,Map类型的具体泛型使用本方法 |
| | | * @param key |
| | | * @param typeReference |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public static <T> T get(String key,TypeReference typeReference) { |
| | | CacheValue value = localCache.get(key); |
| | | if (Objects.nonNull(value)) { |
| | | return (T)JSONObject.parseObject(value.cacheValue, typeReference); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 删除缓存 |
| | | * |
| | | * @param key |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public static <T> T remove(String key) { |
| | | CacheValue value = localCache.get(key); |
| | | if (Objects.nonNull(value)) { |
| | | deadCache.add(value.getId()); |
| | | return (T) value.cacheValue; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 批量删除缓存 |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public static int batchRemove(String key) { |
| | | int count = 0; |
| | | Set<Map.Entry<String, CacheValue>> entries = localCache.entrySet(); |
| | | Iterator<Map.Entry<String, CacheValue>> iterator = entries.iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, CacheValue> next = iterator.next(); |
| | | if (StringUtils.isMatch(key, next.getKey())) { |
| | | remove(next.getKey()); |
| | | count++; |
| | | } |
| | | } |
| | | return count; |
| | | } |
| | | |
| | | /** |
| | | * 保存一个本地缓存 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | */ |
| | | public static void save(String key, Object value) { |
| | | if (null != localCache.put(key, buildValue(key, value))) { |
| | | LogUtil.debug("覆盖原有缓存{}", key); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 设置含过期时间的缓存 |
| | | * |
| | | * @param key |
| | | * @param value |
| | | * @param timeOut 毫秒 |
| | | */ |
| | | public static void save(String key, Object value, long timeOut) { |
| | | if (null != localCache.put(key, buildValue(key, value, timeOut))) { |
| | | LogUtil.debug("覆盖原有缓存{}", key); |
| | | } |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 重置缓存失效时间 |
| | | * |
| | | * @param key |
| | | */ |
| | | public static void resetExpire(String key) { |
| | | Objects.requireNonNull(key); |
| | | CacheValue value = localCache.get(key); |
| | | if (Objects.nonNull(value)) { |
| | | value.setCreateTime(System.currentTimeMillis()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 清理过期对象 |
| | | */ |
| | | private synchronized void startClearThread() { |
| | | if (CLEAR_THREAD_STATUS == 0) { |
| | | ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
| | | .setNameFormat("demo-pool-%d").build(); |
| | | ExecutorService singleThreadPool = new ThreadPoolExecutor(1, 1, |
| | | 0L, TimeUnit.MILLISECONDS, |
| | | new LinkedBlockingQueue<Runnable>(1), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); |
| | | singleThreadPool.execute(() -> { |
| | | CLEAR_THREAD_STATUS = 1; |
| | | while (true) { |
| | | try { |
| | | Set<Map.Entry<String, CacheValue>> entries = localCache.entrySet(); |
| | | Iterator<Map.Entry<String, CacheValue>> iterator = entries.iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, CacheValue> next = iterator.next(); |
| | | |
| | | if (next.getValue().timeOut == 0) { |
| | | continue; |
| | | } |
| | | |
| | | boolean isTimeOut = (System.currentTimeMillis() - next.getValue().getCreateTime().longValue()) > next.getValue().timeOut; |
| | | if (isTimeOut) { |
| | | CacheValue removed = remove(next.getKey()); |
| | | LogUtil.debug("清除过期对象:{}", removed.cacheValue); |
| | | } |
| | | } |
| | | if(CollUtil.isNotEmpty(deadCache)){ |
| | | LogUtil.debug("删除数据库中的缓存:{}",deadCache); |
| | | sysCacheValueDao.deleteBatchIds(deadCache); |
| | | deadCache.clear(); |
| | | } |
| | | Thread.sleep(1000); |
| | | } catch (InterruptedException e) { |
| | | LogUtil.error("清理缓存线程异常停止", e); |
| | | CLEAR_THREAD_STATUS = 0; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 缓存对象写入磁盘 |
| | | */ |
| | | private synchronized void startSaveStoreThread() { |
| | | |
| | | ThreadFactory namedThreadFactory = new ThreadFactoryBuilder() |
| | | .setNameFormat("startSaveStoreThread-pool-%d").build(); |
| | | ExecutorService singleThreadPool = new ThreadPoolExecutor(1, 1, |
| | | 0L, TimeUnit.MILLISECONDS, |
| | | new LinkedBlockingQueue<Runnable>(1), namedThreadFactory, new ThreadPoolExecutor.AbortPolicy()); |
| | | singleThreadPool.execute(() -> { |
| | | try { |
| | | while (true){ |
| | | Collection<CacheValue> values = localCache.values(); |
| | | List<CacheValue> notSavedList = values.stream().filter(v -> !v.saved).collect(Collectors.toList()); |
| | | if(CollUtil.isNotEmpty(notSavedList)){ |
| | | List<String> collect = notSavedList.stream().map(e -> e.getCacheKey()).collect(Collectors.toList()); |
| | | sysCacheValueDao.delete(new LambdaQueryWrapper<SysCacheValue>().in(SysCacheValue::getCacheKey,collect)); |
| | | notSavedList.forEach(e->{ |
| | | e.setSaved(true); |
| | | SysCacheValue sysCacheValue = buildSysCacheValue(e); |
| | | sysCacheValueDao.insert(sysCacheValue); |
| | | e.setId(sysCacheValue.getId()); |
| | | LogUtil.debug("持久化缓存对象:{}",e.getCacheKey()); |
| | | }); |
| | | } |
| | | Thread.sleep(1000); |
| | | } |
| | | } catch (Exception e) { |
| | | LogUtil.error("存储缓存对象线程异常停止", e); |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | | private SysCacheValue buildSysCacheValue(CacheValue e) { |
| | | SysCacheValue cacheValue=new SysCacheValue(); |
| | | BeanUtil.copyProperties(e,cacheValue); |
| | | return cacheValue; |
| | | } |
| | | |
| | | |
| | | private static CacheValue buildValue(String key, Object value) { |
| | | return buildValue(key, value, 0); |
| | | } |
| | | |
| | | |
| | | private static CacheValue buildValue(String key, Object value, long timeOut) { |
| | | CacheValue instances = new CacheValue(); |
| | | instances.createTime = System.currentTimeMillis(); |
| | | instances.cacheKey = key; |
| | | instances.cacheValue = JSON.toJSONString(value); |
| | | instances.timeOut = timeOut; |
| | | return instances; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 缓存对象 |
| | | */ |
| | | @Data |
| | | static class CacheValue { |
| | | |
| | | private Long id ; |
| | | |
| | | /** |
| | | * 过期时间,0 表示不过期,单位毫秒 |
| | | */ |
| | | private Long timeOut = 0L; |
| | | |
| | | /** |
| | | * 缓存key |
| | | */ |
| | | private String cacheKey; |
| | | /** |
| | | * 缓存值 |
| | | */ |
| | | private String cacheValue; |
| | | |
| | | /** |
| | | * 缓存创建时间 |
| | | */ |
| | | private Long createTime; |
| | | |
| | | private boolean saved=false; |
| | | |
| | | private boolean live=true; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: UserCacheManager.java |
| | | * packageName: com.matrix.system.common.init |
| | | * date: 2021-10-25 16:58 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix.system.common.init; |
| | | |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.UUIDUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: UserCacheManager |
| | | * @packageName: com.matrix.system.common.init |
| | | * @description: 用户缓存管理 |
| | | * @data: 2021-10-25 16:58 |
| | | **/ |
| | | @Component |
| | | public class UserCacheManager { |
| | | |
| | | @Value("${debug}") |
| | | private String isDebug; |
| | | |
| | | |
| | | /** |
| | | * 判断用户是否已经登录过 |
| | | * |
| | | * @return |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2018年1月19日 |
| | | * 会从http请求投中获取token进行验证 |
| | | */ |
| | | public boolean isUserLogin() { |
| | | String token = getUserToken(); |
| | | if (StringUtils.isNotBlank(token)) { |
| | | return LocalCache.get(token,new TypeReference<String>(){}) != null; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 在本地缓存中保存用户信息,并且返回保存的token |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2018年1月19日 |
| | | * @return 返回保存用户信息的token |
| | | */ |
| | | public String saveUserInfo(Object obj) { |
| | | String token = UUIDUtil.getRandomID(); |
| | | LocalCache.save(token, obj); |
| | | return token; |
| | | } |
| | | |
| | | /** |
| | | * 用户退出 |
| | | * |
| | | * @author:吕敬瑛 |
| | | * @date:2018年1月19日下午3:17:14 |
| | | */ |
| | | public void loginOut() { |
| | | LocalCache.remove(getUserToken()); |
| | | } |
| | | |
| | | /** |
| | | * 更新用户缓存 |
| | | */ |
| | | public void updateUserInfo(Object user) { |
| | | LocalCache.save(getUserToken(),user); |
| | | } |
| | | |
| | | /** |
| | | * 获取登录用户信息,如果 获取失败将会抛出异常 |
| | | * |
| | | * @return |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2018年1月19日 |
| | | */ |
| | | public <T> T getLoginUser() { |
| | | String userToken = getUserToken(); |
| | | if (userToken != null) { |
| | | T user = LocalCache.get(userToken,new TypeReference<SysVipInfo>(){}); |
| | | if (Objects.nonNull(user)) { |
| | | //重新设置key过期时间 |
| | | LocalCache.resetExpire(userToken); |
| | | return user; |
| | | } else { |
| | | throw new GlobleException(SystemErrorCode.REQUEST_INVALID); |
| | | } |
| | | } else { |
| | | throw new GlobleException(SystemErrorCode.REQUEST_INVALID); |
| | | } |
| | | } |
| | | |
| | | public String getUserToken() { |
| | | String token = WebUtil.getRequest().getHeader("token"); |
| | | // debug模式可以从url参数中获取token |
| | | if (StringUtils.isBlank(token) && "true".equals(isDebug)) { |
| | | if (token == null) { |
| | | token = WebUtil.getRequest().getParameter("token"); |
| | | } |
| | | } |
| | | return token; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.system.common.interceptor; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.matrix.component.redis.RedisClient; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.SysUsersDao; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | @Component |
| | | public class ApiUserLoginInterceptor implements HandlerInterceptor { |
| | | |
| | | @Autowired |
| | | private RedisClient redisClient; |
| | | |
| | | @Value("${login_private_key}") |
| | | private String privateKey; |
| | |
| | | |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler) throws Exception { |
| | | /*if ("dev".equals(evn)) { |
| | | SysUsers sysUsers = sysUsersDao.selectById(1012L); |
| | | request.getSession().setAttribute(MatrixConstance.LOGIN_KEY, sysUsers); |
| | | return true; |
| | | }*/ |
| | | // if ("dev".equals(evn)) { |
| | | // SysUsers sysUsers = sysUsersDao.selectById(1022L); |
| | | // request.getSession().setAttribute(MatrixConstance.LOGIN_KEY, sysUsers); |
| | | // return true; |
| | | // } |
| | | |
| | | String token = resolveToken(request,privateKey); |
| | | AjaxResult ajaxResult = new AjaxResult(); |
| | |
| | | return false; |
| | | } |
| | | |
| | | String userStr = redisClient.getCachedValue(token); |
| | | // redisClient.resetExpire(token); |
| | | if (StringUtils.isBlank(userStr)) { |
| | | SysUsers sysUsers = LocalCache.get(token,new TypeReference<SysUsers>(){}); |
| | | if (Objects.isNull(sysUsers)) { |
| | | ajaxResult.setInfo("login time out"); |
| | | response.getWriter().write(new ObjectMapper().writeValueAsString(ajaxResult)); |
| | | response.setStatus(HttpServletResponse.SC_UNAUTHORIZED); |
| | | return false; |
| | | } |
| | | |
| | | SysUsers sysUsers = JSONObject.parseObject(userStr, SysUsers.class); |
| | | request.getSession().setAttribute(MatrixConstance.LOGIN_KEY, sysUsers); |
| | | return true; |
| | | } |
| | |
| | | package com.matrix.system.common.interceptor; |
| | | |
| | | import com.alibaba.fastjson.TypeReference; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.init.InitWebContainer; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | import org.springframework.web.servlet.handler.HandlerInterceptorAdapter; |
| | |
| | | |
| | | /** |
| | | * 域名与公司对应绑定拦截 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年11月29日 |
| | |
| | | public class HostInterceptor extends HandlerInterceptorAdapter { |
| | | |
| | | |
| | | public static final String ATTR_COMPANY = "company"; |
| | | public static final String ATTR_COMPANY = "company"; |
| | | |
| | | @Override |
| | | public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, ModelAndView arg3) |
| | | throws Exception { |
| | | } |
| | | @Override |
| | | public void postHandle(HttpServletRequest arg0, HttpServletResponse arg1, Object arg2, ModelAndView arg3) |
| | | throws Exception { |
| | | } |
| | | |
| | | /** |
| | | * 通用拦截器 |
| | | */ |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object obj) throws Exception { |
| | | SysCompany company= WebUtil.getSessionAttribute(ATTR_COMPANY); |
| | | /** |
| | | * 通用拦截器 |
| | | */ |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object obj) throws Exception { |
| | | |
| | | if (company != null) { |
| | | LogUtil.debug("匹配到公司{}", company.getComName()); |
| | | return true; |
| | | } else { |
| | | // 获得请求的域名--由小程序直接传过来companyCode参数对应公司的网址 |
| | | String host = request.getHeader("companyCode"); |
| | | LogUtil.debug("当前请求域名{}", host); |
| | | @SuppressWarnings("unchecked") |
| | | Map<String, SysCompany> companyMap = (Map<String, SysCompany>) WebUtil.getServletContext() |
| | | .getAttribute("companyMap"); |
| | | if(Objects.nonNull(companyMap)){ |
| | | Set<String> hostSet = companyMap.keySet(); |
| | | for (String key : hostSet) { |
| | | LogUtil.debug("-- 匹配公司key={},host={} 匹配结果={}", key , host, key.contains(host)); |
| | | if (key.contains(host)) { |
| | | // 查到公司后存到sesssion中 |
| | | WebUtil.setSessionAttribute(ATTR_COMPANY, companyMap.get(key)); |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | LogUtil.debug("没有匹配到对应的公司"); |
| | | return false; |
| | | } |
| | | // 获得请求的域名--由小程序直接传过来companyCode参数对应公司的网址 |
| | | String host = request.getHeader("companyCode"); |
| | | LogUtil.debug("当前请求域名{}", host); |
| | | if (StringUtils.isBlank(host)) { |
| | | return false; |
| | | } |
| | | |
| | | Map<String, SysCompany> companyMap = LocalCache.get("companyMap",new TypeReference<Map<String, SysCompany>>(){}); |
| | | SysCompany company=companyMap.get(host); |
| | | if(Objects.nonNull(company)){ |
| | | // 查到公司后存到sesssion中 |
| | | LogUtil.debug("匹配到公司{}", company.getComName()); |
| | | WebUtil.setSessionAttribute(ATTR_COMPANY, company); |
| | | return true; |
| | | } |
| | | LogUtil.debug("没有匹配到对应的公司"); |
| | | return false; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 获取当前域名对于的公司ID |
| | | * @return |
| | | */ |
| | | public static Long getCompanyId() { |
| | | return ((SysCompany) WebUtil.getSessionAttribute(ATTR_COMPANY)).getComId(); |
| | | } |
| | | /** |
| | | * 获取当前域名对于的公司ID |
| | | * |
| | | * @return |
| | | */ |
| | | public static Long getCompanyId() { |
| | | return ((SysCompany) WebUtil.getSessionAttribute(ATTR_COMPANY)).getComId(); |
| | | } |
| | | |
| | | } |
| | |
| | | @Override |
| | | public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object obj) throws Exception { |
| | | |
| | | String requestUrl = request.getRequestURI(); |
| | | String requestUrl = request.getRequestURI(); |
| | | // 如果访问特殊的路径需要验证管理员的登录权限 |
| | | if (requestUrl.indexOf(ADMIN) != -1 || requestUrl.indexOf(SUPER) != -1 |
| | | || requestUrl.indexOf(DEVELOPER) != -1 || requestUrl.indexOf(CUSTOMER) != -1) { |
| | | |
| | | if (WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY) == null) { |
| | | // 判断是否为异步请求 |
| | | String requestType = request.getHeader(X_REQUESTED_WITH); |
| New file |
| | |
| | | package com.matrix.system.common.service; |
| | | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant; |
| | | import com.matrix.system.score.constant.ScoreSettingConstant; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class BusParameterSettingService { |
| | | |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 判断某个设置是否是开启状态 |
| | | * 未配置,或者无效settingkey都返回false |
| | | */ |
| | | public boolean isSettingOpen(String settingKey,Long companyId) { |
| | | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(settingKey, companyId); |
| | | return ( |
| | | Objects.nonNull(busParameterSettings) |
| | | && StringUtils.isNotBlank(busParameterSettings.getParamValue()) |
| | | && AppConstance.IS_Y.equals(busParameterSettings.getParamValue()) |
| | | ); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.common.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.matrix.system.common.bean.OperationLog; |
| | | import com.matrix.system.common.bean.reqVO.OperationLogReqVo; |
| | | import com.matrix.system.common.bean.respVO.OperationLogRespVo; |
| | | import com.matrix.system.enums.OperationButtonEnum; |
| | | import com.matrix.system.enums.OperationFunctionEnum; |
| | | |
| | | /** |
| | | * 单据操作日志 |
| | | */ |
| | | public interface OperationLogService extends IService<OperationLog> { |
| | | |
| | | |
| | | |
| | | void saveOperation(Long companyId, Long shopId, Long userId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum, |
| | | Long billId, String billNo, Long vipId,String note); |
| | | |
| | | void saveOperation(Long companyId, Long shopId, Long userId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum, |
| | | Long billId, String billNo, Long vipId); |
| | | |
| | | void saveOperation(Long companyId, Long shopId, Long suId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum,String note); |
| | | |
| | | Page<OperationLogRespVo> selectPage(Page<OperationLogReqVo> page, OperationLogReqVo operationLogReqVo); |
| | | } |
| | |
| | | |
| | | public List<AppVersion> findAppVersion(); |
| | | |
| | | SysUsers findByOpenId(String openId, Long companyId); |
| | | |
| | | int modifyUserOpenId(String openId, Long suId); |
| | | } |
| New file |
| | |
| | | package com.matrix.system.common.service.impl;
|
| | |
|
| | | import com.matrix.system.common.bean.BusParameterSettings;
|
| | | import com.matrix.system.common.bean.SysCompany;
|
| | | import com.matrix.system.common.dao.BusParameterSettingsDao;
|
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant;
|
| | | import com.matrix.system.score.constant.ScoreSettingConstant;
|
| | | import org.springframework.beans.factory.annotation.Autowired;
|
| | | import org.springframework.stereotype.Service;
|
| | |
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | |
|
| | | @Service
|
| | | public class InitBusParameterSettingService {
|
| | |
|
| | | @Autowired
|
| | | private BusParameterSettingsDao busParameterSettingsDao;
|
| | |
|
| | | /**
|
| | | * 初始化默认积分规则设置
|
| | | */
|
| | | public void initBusParameterSetting(SysCompany sysCompany) {
|
| | | long companyId = sysCompany.getComId();
|
| | | List<BusParameterSettings> ruleSettings=new ArrayList<>();
|
| | |
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.VALID_PERIOD_POINTS, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.CREDIT_POINTS_CASH, companyId));
|
| | |
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.CASH_CONSUMPTION, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.PRINCIPAL_BALANCE_CONSUMPTION, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.BONUS_BALANCE_CONSUMPTION, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.PRINCIPAL_CONSUMPTION, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.GIVE_CONSUMPTION, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.REFERRALS_CONSUMPTION, companyId));
|
| | |
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.CASH_CONSUMPTION_SHOP, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.RESERVATION_SERVICE_SHOP, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(ScoreSettingConstant.EVALUATUIN_ORDER_SHOP, companyId));
|
| | |
|
| | | busParameterSettingsDao.batchInsert(ruleSettings);
|
| | | }
|
| | |
|
| | | /**
|
| | | * 初始化默认分销规则设置
|
| | | */
|
| | | public void initBusParameterFenxiaoSetting(SysCompany sysCompany) {
|
| | | long companyId = sysCompany.getComId();
|
| | | List<BusParameterSettings> ruleSettings=new ArrayList<>();
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_SWITCH, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_MODEL, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_APPLY_WAY, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_AUDIT_METHOD, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_APPLY_CONDITION, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_TG_PLAN, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_TG_POSTER, companyId));
|
| | | ruleSettings.add(addScoreRuleSetting(FenxiaoSettingConstant.FX_ZGFY, companyId));
|
| | | busParameterSettingsDao.batchInsert(ruleSettings);
|
| | | }
|
| | |
|
| | | private BusParameterSettings addScoreRuleSetting(String code,long companyId) {
|
| | | BusParameterSettings busParameterSetting = new BusParameterSettings();
|
| | | busParameterSetting.setParamCode(code);
|
| | | busParameterSetting.setCompanyId(companyId);
|
| | | return busParameterSetting;
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | package com.matrix.system.common.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.OperationLog; |
| | | import com.matrix.system.common.bean.reqVO.OperationLogReqVo; |
| | | import com.matrix.system.common.bean.respVO.OperationLogRespVo; |
| | | import com.matrix.system.common.dao.OperationLogDao; |
| | | import com.matrix.system.common.service.OperationLogService; |
| | | import com.matrix.system.enums.OperationButtonEnum; |
| | | import com.matrix.system.enums.OperationFunctionEnum; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 单据操作日志 |
| | | */ |
| | | @Service |
| | | public class OperationLogServiceImpl extends ServiceImpl<OperationLogDao, OperationLog> implements OperationLogService { |
| | | |
| | | @Autowired |
| | | OperationLogDao operationLogDao; |
| | | |
| | | @Override |
| | | public void saveOperation(Long companyId, Long shopId, Long userId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum, |
| | | Long billId, String billNo, Long vipId, String note) { |
| | | save(OperationLog.builder() |
| | | .companyId(companyId) |
| | | .shopId(shopId) |
| | | .opeUserId(userId) |
| | | .opeFunction(operationFunctionEnum.getValue()) |
| | | .opeBut(operationButtonEnum.getValue()) |
| | | .billId(billId) |
| | | .billNo(billNo) |
| | | .vipId(vipId) |
| | | .note(note) |
| | | .ip(WebUtil.getCustomerIp()).build()); |
| | | |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public void saveOperation(Long companyId, Long shopId, Long userId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum, |
| | | Long billId, String billNo, Long vipId) { |
| | | save(OperationLog.builder() |
| | | .companyId(companyId) |
| | | .shopId(shopId) |
| | | .opeUserId(userId) |
| | | .opeFunction(operationFunctionEnum.getValue()) |
| | | .opeBut(operationButtonEnum.getValue()) |
| | | .billId(billId) |
| | | .billNo(billNo) |
| | | .vipId(vipId) |
| | | .ip(WebUtil.getCustomerIp()).build()); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public void saveOperation(Long companyId, Long shopId, Long userId, OperationFunctionEnum operationFunctionEnum, OperationButtonEnum operationButtonEnum |
| | | , String note) { |
| | | save(OperationLog.builder() |
| | | .companyId(companyId) |
| | | .shopId(shopId) |
| | | .opeUserId(userId) |
| | | .opeFunction(operationFunctionEnum.getValue()) |
| | | .opeBut(operationButtonEnum.getValue()) |
| | | .note(note) |
| | | .ip(WebUtil.getCustomerIp()).build()); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public Page<OperationLogRespVo> selectPage(Page<OperationLogReqVo> page, OperationLogReqVo operationLogReqVo) { |
| | | |
| | | Page<OperationLogRespVo> voPage=operationLogDao.selectPageList(page, operationLogReqVo); |
| | | voPage.getRecords().stream().forEach(e->{ |
| | | e.setOpeFunctionLabel(OperationFunctionEnum.getByValue(e.getOpeFunction())); |
| | | e.setOpeButLabel(OperationButtonEnum.getByValue(e.getOpeBut())); |
| | | }); |
| | | |
| | | return voPage; |
| | | } |
| | | |
| | | } |
| | |
| | | package com.matrix.system.common.service.impl; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.ModelUtils; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.*; |
| | | import com.matrix.system.app.authority.AppAuthorityManager; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.bean.SysRole; |
| | | import com.matrix.system.common.bean.SysRolePwoerFn; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.SysCompanyDao; |
| | | import com.matrix.system.common.dao.SysRoleDao; |
| | | import com.matrix.system.common.dao.SysRolePwoerFnDao; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.service.SysCompanyService; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.bean.Warehouse; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.dao.WarehouseDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 公司管理 |
| | | * |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date Dec 11, 2017 |
| | |
| | | @Service |
| | | public class SysCompanyServiceImpl implements SysCompanyService { |
| | | |
| | | @Autowired |
| | | private SysCompanyDao sysCompanyDao; |
| | | @Autowired |
| | | private SysRoleDao sysRoleDao; |
| | | @Autowired |
| | | private SysRolePwoerFnDao rolePwoerFnDao; |
| | | @Autowired |
| | | private SysCompanyDao sysCompanyDao; |
| | | @Autowired |
| | | private SysRoleDao sysRoleDao; |
| | | @Autowired |
| | | private SysRolePwoerFnDao rolePwoerFnDao; |
| | | |
| | | @Autowired |
| | | private SysShopInfoDao shopInfoDao; |
| | | @Autowired |
| | | private SysShopInfoDao shopInfoDao; |
| | | |
| | | |
| | | @Autowired |
| | | private InitCustomerDataDictionaryService initCustomerDataDictionaryService; |
| | | @Autowired |
| | | private InitCustomerDataDictionaryService initCustomerDataDictionaryService; |
| | | |
| | | |
| | | @Autowired |
| | | private InitShoppingGoodsCategoryService initShoppingGoodsCategoryService; |
| | | @Autowired |
| | | private InitShoppingGoodsCategoryService initShoppingGoodsCategoryService; |
| | | |
| | | |
| | | @Autowired |
| | | private InitRolePowerService initRolePowerService; |
| | | @Autowired |
| | | private InitRolePowerService initRolePowerService; |
| | | |
| | | @Autowired |
| | | private InitGoodsTypeService initGoodsTypeService; |
| | | @Autowired |
| | | private InitGoodsTypeService initGoodsTypeService; |
| | | |
| | | @Autowired |
| | | private InitShopProductCateService initShopProductCateService; |
| | | @Autowired |
| | | private InitShopProductCateService initShopProductCateService; |
| | | |
| | | @Autowired |
| | | private InitBusParameterSettingService initBusParameterSettingService; |
| | | |
| | | |
| | | @Transactional |
| | | @Override |
| | | public int add(SysCompany sysCompany) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysCompany.setCreateBy(user.getSuName()); |
| | | sysCompany.setUpdateBy(user.getSuName()); |
| | | int i= sysCompanyDao.insert(sysCompany); |
| | | SysShopInfo zbShop= addZbShop(sysCompany); |
| | | initCustomerDataDictionaryService.initCustomerDataDictionary(sysCompany); |
| | | initShoppingGoodsCategoryService.initShoppingGoodsCategory(sysCompany,zbShop); |
| | | initRolePowerService.initRolePower(sysCompany); |
| | | initGoodsTypeService.initRolePower(sysCompany); |
| | | initShopProductCateService.initShopProductCate(sysCompany); |
| | | @Transactional |
| | | @Override |
| | | public int add(SysCompany sysCompany) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysCompany.setCreateBy(user.getSuName()); |
| | | sysCompany.setUpdateBy(user.getSuName()); |
| | | int i = sysCompanyDao.insert(sysCompany); |
| | | SysShopInfo zbShop = addZbShop(sysCompany); |
| | | initCustomerDataDictionaryService.initCustomerDataDictionary(sysCompany); |
| | | initShoppingGoodsCategoryService.initShoppingGoodsCategory(sysCompany, zbShop); |
| | | initRolePowerService.initRolePower(sysCompany); |
| | | initGoodsTypeService.initRolePower(sysCompany); |
| | | initShopProductCateService.initShopProductCate(sysCompany); |
| | | initBusParameterSettingService.initBusParameterSetting(sysCompany); |
| | | initBusParameterSettingService.initBusParameterFenxiaoSetting(sysCompany); |
| | | |
| | | return i; |
| | | return i; |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | @Autowired |
| | | private WarehouseDao warehouseDao; |
| | | /** |
| | | * 为新公司创建一个总部 |
| | | * @param sysCompany |
| | | */ |
| | | private SysShopInfo addZbShop(SysCompany sysCompany) { |
| | | SysShopInfo zbShopInfo=new SysShopInfo(); |
| | | zbShopInfo.setShopType(SysShopInfo.SHOP_TYPE_ZONGBU); |
| | | zbShopInfo.setShopName(sysCompany.getComName()+"(总部)"); |
| | | zbShopInfo.setCompanyId(sysCompany.getComId()); |
| | | zbShopInfo.setShopTel(sysCompany.getComTel()); |
| | | zbShopInfo.setShopShortName("总部"); |
| | | zbShopInfo.setIsOpenNet(SysShopInfo.CLOSE_NET); |
| | | zbShopInfo.setShopNo(StringUtils.getRandomString(10)); |
| | | shopInfoDao.insert(zbShopInfo); |
| | | @Autowired |
| | | private WarehouseDao warehouseDao; |
| | | |
| | | //新增一个总部仓库 |
| | | Warehouse warehouse=new Warehouse(); |
| | | warehouse.setCompanyId(sysCompany.getComId()); |
| | | warehouse.setName("总部仓库"); |
| | | warehouse.setShopId(zbShopInfo.getId()); |
| | | warehouse.setSort("1"); |
| | | warehouseDao.insert(warehouse); |
| | | return zbShopInfo; |
| | | } |
| | | /** |
| | | * 为新公司创建一个总部 |
| | | * |
| | | * @param sysCompany |
| | | */ |
| | | private SysShopInfo addZbShop(SysCompany sysCompany) { |
| | | SysShopInfo zbShopInfo = new SysShopInfo(); |
| | | zbShopInfo.setShopType(SysShopInfo.SHOP_TYPE_ZONGBU); |
| | | zbShopInfo.setShopName(sysCompany.getComName() + "(总部)"); |
| | | zbShopInfo.setCompanyId(sysCompany.getComId()); |
| | | zbShopInfo.setShopTel(sysCompany.getComTel()); |
| | | zbShopInfo.setShopShortName("总部"); |
| | | zbShopInfo.setIsOpenNet(SysShopInfo.CLOSE_NET); |
| | | zbShopInfo.setShopNo(StringUtils.getRandomString(10)); |
| | | shopInfoDao.insert(zbShopInfo); |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public int modifyByMap(SysCompany oldSysCompany, SysCompany newSysCompany) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | newSysCompany.setUpdateBy(user.getSuName()); |
| | | //新增一个总部仓库 |
| | | Warehouse warehouse = new Warehouse(); |
| | | warehouse.setCompanyId(sysCompany.getComId()); |
| | | warehouse.setName("总部仓库"); |
| | | warehouse.setShopId(zbShopInfo.getId()); |
| | | warehouse.setSort("1"); |
| | | warehouseDao.insert(warehouse); |
| | | return zbShopInfo; |
| | | } |
| | | |
| | | updatePower(newSysCompany); |
| | | Map<String, Object> modifyMap = null; |
| | | try { |
| | | if (!ModelUtils.isModified(oldSysCompany, newSysCompany)) { |
| | | return MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public int modifyByMap(SysCompany oldSysCompany, SysCompany newSysCompany) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | newSysCompany.setUpdateBy(user.getSuName()); |
| | | |
| | | modifyMap = ModelUtils.comparePojo2Map(oldSysCompany, newSysCompany); |
| | | } catch (Exception e) { |
| | | throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newSysCompany.getComName()); |
| | | } |
| | | if (modifyMap.size() > 0) { |
| | | modifyMap.put("comId", oldSysCompany.getComId()); |
| | | return sysCompanyDao.updateByMap(modifyMap); |
| | | } |
| | | return MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | updatePower(newSysCompany); |
| | | Map<String, Object> modifyMap = null; |
| | | try { |
| | | if (!ModelUtils.isModified(oldSysCompany, newSysCompany)) { |
| | | return MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | |
| | | /** |
| | | * 更新公司员工权限 |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | * @param newSysCompany |
| | | */ |
| | | private void updatePower(SysCompany newSysCompany) { |
| | | List<String> oldFunctions = null; |
| | | String functions = sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions(); |
| | | if (functions == null || functions.equals("")) { |
| | | oldFunctions = new ArrayList<>(); |
| | | } else { |
| | | oldFunctions = StringUtils |
| | | .strToCollToString(sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions(), ","); |
| | | } |
| | | List<String> newFunctions = new ArrayList<>(); |
| | | if (StringUtils.isNotBlank(newSysCompany.getComFunctions())) { |
| | | newFunctions = StringUtils.strToCollToString(newSysCompany.getComFunctions(), ","); |
| | | } |
| | | modifyMap = ModelUtils.comparePojo2Map(oldSysCompany, newSysCompany); |
| | | } catch (Exception e) { |
| | | throw new GlobleException(SystemErrorCode.DATA_UPDATE_FAIL, e, newSysCompany.getComName()); |
| | | } |
| | | if (modifyMap.size() > 0) { |
| | | modifyMap.put("comId", oldSysCompany.getComId()); |
| | | return sysCompanyDao.updateByMap(modifyMap); |
| | | } |
| | | return MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | |
| | | for (String old : oldFunctions) { |
| | | // 如果新权限中不包含这个老的功能,则要更新改企业下所有的角色权限 |
| | | if (!newFunctions.contains(old)) { |
| | | SysRole role = new SysRole(); |
| | | role.setCompanyId(newSysCompany.getComId()); |
| | | List<SysRole> roles = sysRoleDao.selectByModel(role); |
| | | // 获取该公司下所有的权限信息 |
| | | List<SysRolePwoerFn> compalyRolePwoer = new ArrayList<>(); |
| | | for (SysRole tempRole : roles) { |
| | | SysRolePwoerFn r = new SysRolePwoerFn(); |
| | | r.setRoleId(tempRole.getRoleId()); |
| | | compalyRolePwoer.addAll(rolePwoerFnDao.selectByModel(r)); |
| | | } |
| | | // 记录要删除的id |
| | | List<String> delRolePwoer = new ArrayList<>(); |
| | | for (SysRolePwoerFn rolePwoer : compalyRolePwoer) { |
| | | // 如果有一个老权限则删除这个权限 |
| | | if (rolePwoer.getFnId() != null && rolePwoer.getFnId().equals(old)) { |
| | | delRolePwoer.add(rolePwoer.getRpfId()+""); |
| | | } |
| | | } |
| | | // 如果获取到了就删除 |
| | | if (!delRolePwoer.isEmpty()) { |
| | | rolePwoerFnDao.deleteByIds(delRolePwoer); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | /** |
| | | * 更新公司员工权限 |
| | | * |
| | | * @param newSysCompany |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年12月5日 |
| | | */ |
| | | private void updatePower(SysCompany newSysCompany) { |
| | | List<String> oldFunctions = null; |
| | | String functions = sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions(); |
| | | if (functions == null || functions.equals("")) { |
| | | oldFunctions = new ArrayList<>(); |
| | | } else { |
| | | oldFunctions = StringUtils |
| | | .strToCollToString(sysCompanyDao.selectById(newSysCompany.getComId()).getComFunctions(), ","); |
| | | } |
| | | List<String> newFunctions = new ArrayList<>(); |
| | | if (StringUtils.isNotBlank(newSysCompany.getComFunctions())) { |
| | | newFunctions = StringUtils.strToCollToString(newSysCompany.getComFunctions(), ","); |
| | | } |
| | | |
| | | @Override |
| | | public int modifyByModel(SysCompany sysCompany) { |
| | | Collections.sort(newFunctions); |
| | | Collections.sort(oldFunctions); |
| | | if (Objects.equals(JSONUtil.toJsonStr(newFunctions), JSONUtil.toJsonStr(oldFunctions))) { |
| | | //没有更新的权限 |
| | | return; |
| | | } |
| | | |
| | | return sysCompanyDao.updateByModel(sysCompany); |
| | | List<String> finalNewFunctions = newFunctions; |
| | | List<String> deletedFn = oldFunctions.stream().map(old -> { |
| | | if (finalNewFunctions.stream().noneMatch(newFn -> Objects.equals(newFn, old))) { |
| | | return old; |
| | | } else { |
| | | return ""; |
| | | } |
| | | }).filter(item->StringUtils.isNotBlank(item)).collect(Collectors.toList()); |
| | | |
| | | } |
| | | if(CollectionUtils.isNotEmpty(deletedFn)){ |
| | | rolePwoerFnDao.deleteByFns(newSysCompany.getComId(),deletedFn); |
| | | //有更新权限清空缓存 |
| | | SysUsers sysUsers = new SysUsers(); |
| | | sysUsers.setCompanyId(newSysCompany.getComId()); |
| | | sysUsers.setSuValid(AppConstance.RECORD_VALID); |
| | | List<SysUsers> users = sysUsersService.findByModel(sysUsers); |
| | | users.forEach(user -> { |
| | | String userKey = SecureUtil.md5(user.getSuId() + ""); |
| | | LocalCache.remove(DefaultAuthorityManager.USER_POWER_REDISKEY_PC + userKey); |
| | | LocalCache.remove(AppAuthorityManager.USER_POWER_REDISKEY_APP + userKey); |
| | | }); |
| | | } |
| | | |
| | | @Override |
| | | public int remove(List<String> list) { |
| | | |
| | | return sysCompanyDao.deleteByIds(list); |
| | | |
| | | } |
| | | /* for (String old : oldFunctions) { |
| | | // 如果新权限中不包含这个老的功能,则要更新改企业下所有的角色权限 |
| | | if (!newFunctions.contains(old)) { |
| | | SysRole role = new SysRole(); |
| | | role.setCompanyId(newSysCompany.getComId()); |
| | | List<SysRole> roles = sysRoleDao.selectByModel(role); |
| | | // 获取该公司下所有的权限信息 |
| | | List<SysRolePwoerFn> compalyRolePwoer = new ArrayList<>(); |
| | | for (SysRole tempRole : roles) { |
| | | SysRolePwoerFn r = new SysRolePwoerFn(); |
| | | r.setRoleId(tempRole.getRoleId()); |
| | | compalyRolePwoer.addAll(rolePwoerFnDao.selectByModel(r)); |
| | | } |
| | | // 记录要删除的id |
| | | List<String> delRolePwoer = new ArrayList<>(); |
| | | for (SysRolePwoerFn rolePwoer : compalyRolePwoer) { |
| | | // 如果有一个老权限则删除这个权限 |
| | | if (rolePwoer.getFnId() != null && rolePwoer.getFnId().equals(old)) { |
| | | delRolePwoer.add(rolePwoer.getRpfId() + ""); |
| | | } |
| | | } |
| | | // 如果获取到了就删除 |
| | | if (!delRolePwoer.isEmpty()) { |
| | | rolePwoerFnDao.deleteByIds(delRolePwoer); |
| | | } |
| | | } |
| | | }*/ |
| | | |
| | | @Override |
| | | public int removeById(String comId) { |
| | | |
| | | return sysCompanyDao.deleteById(Long.parseLong(comId)); |
| | | |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public int removeByModel(SysCompany sysCompany) { |
| | | @Autowired |
| | | SysUsersService sysUsersService; |
| | | |
| | | return sysCompanyDao.deleteByModel(sysCompany); |
| | | @Override |
| | | public int modifyByModel(SysCompany sysCompany) { |
| | | |
| | | } |
| | | return sysCompanyDao.updateByModel(sysCompany); |
| | | |
| | | @Override |
| | | public List<SysCompany> findInPage(SysCompany sysCompany, PaginationVO pageVo) { |
| | | } |
| | | |
| | | return sysCompanyDao.selectInPage(sysCompany, pageVo); |
| | | @Override |
| | | public int remove(List<String> list) { |
| | | |
| | | } |
| | | return sysCompanyDao.deleteByIds(list); |
| | | |
| | | @Override |
| | | public List<SysCompany> findByModel(SysCompany sysCompany) { |
| | | } |
| | | |
| | | return sysCompanyDao.selectByModel(sysCompany); |
| | | @Override |
| | | public int removeById(String comId) { |
| | | |
| | | } |
| | | return sysCompanyDao.deleteById(Long.parseLong(comId)); |
| | | |
| | | @Override |
| | | public int findTotal(SysCompany sysCompany) { |
| | | } |
| | | |
| | | return sysCompanyDao.selectTotalRecord(sysCompany); |
| | | @Override |
| | | public int removeByModel(SysCompany sysCompany) { |
| | | |
| | | } |
| | | return sysCompanyDao.deleteByModel(sysCompany); |
| | | |
| | | @Override |
| | | public SysCompany findById(String comId) { |
| | | } |
| | | |
| | | return sysCompanyDao.selectById(Long.parseLong(comId)); |
| | | @Override |
| | | public List<SysCompany> findInPage(SysCompany sysCompany, PaginationVO pageVo) { |
| | | |
| | | } |
| | | return sysCompanyDao.selectInPage(sysCompany, pageVo); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public List<SysCompany> findByModel(SysCompany sysCompany) { |
| | | |
| | | return sysCompanyDao.selectByModel(sysCompany); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public int findTotal(SysCompany sysCompany) { |
| | | |
| | | return sysCompanyDao.selectTotalRecord(sysCompany); |
| | | |
| | | } |
| | | |
| | | @Override |
| | | public SysCompany findById(String comId) { |
| | | |
| | | return sysCompanyDao.selectById(Long.parseLong(comId)); |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.ModelUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | |
| | | } else { |
| | | // 非一级节点找到父节点后存入 |
| | | SysFunction parentFn = allFnMap.get(String.valueOf(function.getFnParentId())); |
| | | List<SysFunction> childs = parentFn.getChilds(); |
| | | if (childs == null) { |
| | | parentFn.setChilds(new ArrayList<SysFunction>()); |
| | | if(parentFn!=null){ |
| | | List<SysFunction> childs = parentFn.getChilds(); |
| | | if (childs == null) { |
| | | parentFn.setChilds(new ArrayList<SysFunction>()); |
| | | } |
| | | parentFn.getChilds().add(function); |
| | | } |
| | | parentFn.getChilds().add(function); |
| | | |
| | | } |
| | | |
| | | } |
| | |
| | | package com.matrix.system.common.service.impl; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.ModelUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.authority.AppAuthorityManager; |
| | | import com.matrix.system.common.authority.DefaultAuthorityManager; |
| | | import com.matrix.system.common.bean.SysUserLoginRecord; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.constance.AppMessageCode; |
| | | import com.matrix.system.common.dao.SysUsersDao; |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.PasswordUtil; |
| | | import com.matrix.system.common.tools.ServiceUtil; |
| | |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import org.apache.commons.lang.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | |
| | | private static final String SU_ID = "su_id"; |
| | | |
| | | private static final String SU_ACCOUNT = "su_account"; |
| | | |
| | | @Autowired |
| | | private SysUsersDao sysUsersDao; |
| | | |
| | |
| | | } |
| | | if (modifyMap.size() > 0) { |
| | | modifyMap.put("suId", oldSysUsers.getSuId()); |
| | | return sysUsersDao.updateByMap(modifyMap); |
| | | sysUsersDao.updateByMap(modifyMap); |
| | | } |
| | | //删除用户权限缓存 |
| | | String redisKey=DefaultAuthorityManager.USER_POWER_REDISKEY+ SecureUtil.md5(oldSysUsers.getSuId()+""); |
| | | String redisKeyPc=DefaultAuthorityManager.USER_POWER_REDISKEY_PC+ SecureUtil.md5(oldSysUsers.getSuId()+""); |
| | | String appRedisKey = AppAuthorityManager.USER_POWER_REDISKEY_APP + SecureUtil.md5(oldSysUsers.getSuId()+""); |
| | | LocalCache.remove(redisKey); |
| | | LocalCache.remove(redisKeyPc); |
| | | LocalCache.remove(appRedisKey); |
| | | |
| | | return MatrixConstance.DML_SUCCESSS; |
| | | } |
| | | |
| | |
| | | public List<AppVersion> findAppVersion() { |
| | | return sysUsersDao.selectAppVersion(); |
| | | } |
| | | |
| | | @Override |
| | | public SysUsers findByOpenId(String openId, Long companyId) { |
| | | return sysUsersDao.selectUserByOpenId(openId, companyId); |
| | | } |
| | | |
| | | @Override |
| | | public int modifyUserOpenId(String openId, Long suId) { |
| | | return sysUsersDao.updateUserOpenId(openId, suId); |
| | | } |
| | | } |
| | |
| | | public Set<IProcessor> getProcessors(final String dialectPrefix) { |
| | | final Set<IProcessor> processors = new HashSet<IProcessor>(); |
| | | processors.add(new ButtonRoleAttributeTagProcessor(dialectPrefix)); |
| | | processors.add(new ButtonRoleJsTagProcessor(dialectPrefix)); |
| | | processors.add(new ButtonRoleFnTagProcessor(dialectPrefix)); |
| | | // This will remove the xmlns:matrix attributes we might add for IDE validation |
| | | processors.add(new StandardXmlNsTagProcessor(TemplateMode.HTML, dialectPrefix)); |
| | |
| | | */ |
| | | public static boolean hasAllShopAuth() { |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | return user.getShopRole().equals(Dictionary.FLAG_YES_Y) || user.getSuUserType().equals(AppConstance.USER_TYPE_ADMIN); |
| | | return Dictionary.FLAG_YES_Y.equals(user.getShopRole()) || AppConstance.USER_TYPE_ADMIN.equals(user.getSuUserType()); |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 可以查询所有会员 |
| | | * @return |
| | | */ |
| | | public static boolean hasAllCustomerAuth() { |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | return Dictionary.FLAG_YES_Y.equals(user.getShopRole()) || AppConstance.USER_TYPE_ADMIN.equals(user.getSuUserType()); |
| | | |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.common.tools; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | public class LocationUtil { |
| | | |
| | | private static final double EARTH_RADIUS = 6378.137; |
| | |
| | | * shopX 店铺位置经度 |
| | | * shopY 店铺位置纬度 |
| | | */ |
| | | public static double getDistance(double locX, double locY, double shopX, double shopY) { |
| | | public static BigDecimal getDistance(double locX, double locY, double shopX, double shopY) { |
| | | double a, b, d, sa2, sb2; |
| | | locY = rad(locY); |
| | | shopY = rad(shopY); |
| | |
| | | d = 2 * EARTH_RADIUS |
| | | * Math.asin(Math.sqrt(sa2 * sa2 + Math.cos(locY) |
| | | * Math.cos(shopY) * sb2 * sb2)); |
| | | return d; |
| | | return BigDecimal.valueOf(d); |
| | | } |
| | | |
| | | public static void main(String[] args) { |
| | | // 112.886891,28.222562,114.061937,22.626003 -- 634093.3209722887 |
| | | // 113.930692,22.939454 -- 597367.3546527711 |
| | | System.out.println(getDistance(112.886891d, 28.222562d, 113.930692, 22.939454)); |
| | | // System.out.println(getDistance(112.886891d, 28.222562d, 113.930692, 22.939454)); |
| | | System.out.println(BigDecimal.ONE.compareTo(BigDecimal.ZERO)>0); |
| | | } |
| | | } |
| | |
| | | |
| | | import com.matrix.core.tools.*; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | import org.springframework.util.FileCopyUtils; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.MultipartHttpServletRequest; |
| | |
| | | * @email 935090232@qq.com |
| | | * @date 2018年6月15日 |
| | | */ |
| | | @Component |
| | | public class UploadUtil { |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | | |
| | | @Value("${static_resource_url}") |
| | | private String staticResourceUrl; |
| | | |
| | | private static String STATUSS = "status"; |
| | | private static String MSG = "msg"; |
| | |
| | | * @throws IOException |
| | | */ |
| | | |
| | | public static Map<String, String> doUpload(MultipartHttpServletRequest request, List<FileType> extList, |
| | | public Map<String, String> doUpload(MultipartHttpServletRequest request, List<FileType> extList, |
| | | String folderType, Long userId) throws NoSuchAlgorithmException, IOException { |
| | | Map<String, String> resourceMap = new HashMap<>(); |
| | | |
| | | // 图片保存目录路径 |
| | | String baseSavePath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH); |
| | | String baseSavePath =fileStoragePath; |
| | | // 图片保存目录URL |
| | | String baseSaveUrl = PropertiesUtil.getString(AppConstance.NGINX_URL); |
| | | String baseSaveUrl = staticResourceUrl; |
| | | LogUtil.debug("图片保存目录路径={}",baseSavePath); |
| | | LogUtil.debug("图片保存目录URL={}",baseSaveUrl); |
| | | |
| | |
| | | String newFileName = UUIDUtil.getRandomID() + "." + fileExt; |
| | | Map<String, String> fileUrlMap = fileUrl(baseSavePath, baseSaveUrl, folderType, userId); |
| | | String savePath = fileUrlMap.get("savePath"); |
| | | String saveUrl = fileUrlMap.get("saveUrl"); |
| | | String saveUrl = fileUrlMap.get("saveUrl").replaceAll("\\\\","/"); |
| | | File uploadedFile = new File(savePath, newFileName); |
| | | try { |
| | | FileCopyUtils.copy(file.getBytes(), uploadedFile); |
| | |
| | | * 支付方式-现金支付 |
| | | */ |
| | | String PAY_TYPE_MOENY = "现金"; |
| | | /** |
| | | * 支付方式-现金支付 |
| | | */ |
| | | String PAY_TYPE_MOENY_CARD = "会员卡"; |
| | | |
| | | /** |
| | | * 支付方式-卡支付 |
| | | */ |
| | |
| | | String SEX_WOMAN ="女"; |
| | | |
| | | String[] COLORS = { "#57c5d2", "#e3565e", "#2f343a", "#4d98db", "#4fbc9d", "#be9d4c"}; |
| | | |
| | | String SERVICE_OVER_BEGIN_END = "SERVICE_OVER_BEGIN_END"; |
| | | String SALE_MAN_IS_CONSUME_ACHIEVE = "SALE_MAN_IS_CONSUME_ACHIEVE"; |
| | | String ZS_CONSUME_ACHIEVE = "ZS_CONSUME_ACHIEVE"; |
| | | } |
| | |
| | | public class SystemConstance { |
| | | |
| | | |
| | | /** |
| | | * 当前进行操作的用户 |
| | | */ |
| | | public static final String CURRENT_CUSTOMER = "CURRENT_CUSTOMER"; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | public static final String SYSTEM_USER = "SYSTEM"; |
| | | |
| | | /** |
| | | * 查询历史记录 |
| | | */ |
| | | public static final String HISTORY_CUSTOMER = "HISTORY_CUSTOMER"; |
| | | |
| | | /** |
| | | * 登陆前要访问的地址 |
| | | */ |
| New file |
| | |
| | | package com.matrix.system.enums; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import com.matrix.core.enums.EnumApiShowAble; |
| | | import com.matrix.core.enums.EnumsShowVo; |
| | | import com.matrix.core.exception.GlobleException; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 操作按钮枚举 |
| | | * @author jyy |
| | | */ |
| | | public enum OperationButtonEnum implements EnumApiShowAble { |
| | | |
| | | CREATE(1, "新增"), |
| | | UPDATE(2, "修改"), |
| | | DELETE(3, "删除"), |
| | | CANCEL(4, "取消"), |
| | | INVALID(5, "设置为无效"), |
| | | EFFECTIVE(6, "设置为有效"), |
| | | ORDER_SK(7, "订单收款"), |
| | | ORDER_TK(8, "订单退款"), |
| | | ORDER_UPDATE_TIME(9, "更新订单时间"), |
| | | EXPORT(10, "导出"), |
| | | SERVICE_ORDER_BEGIN(11, "开始服务单"), |
| | | SERVICE_ORDER_END(12, "完成服务单"), |
| | | SERVICE_ORDER_PL(13, "服务单配料"), |
| | | SERVICE_ORDER_HK(14, "划扣"), |
| | | SERVICE_ORDER_PB(15, "排班"), |
| | | SERVICE_ORDER_QRYY(16, "确认预约"), |
| | | |
| | | ; |
| | | |
| | | private Integer value; |
| | | |
| | | private String displayName; |
| | | |
| | | OperationButtonEnum(Integer value, String displayName) { |
| | | this.value = value; |
| | | this.displayName = displayName; |
| | | } |
| | | |
| | | public static String getByValue(Integer value) { |
| | | for (int i = 0; i < values().length; i++) { |
| | | if (value.equals(values()[i].getValue())) { |
| | | return values()[i].displayName; |
| | | } |
| | | } |
| | | throw new GlobleException("无效枚举值"); |
| | | } |
| | | |
| | | @Override |
| | | public String getEnumCode() { |
| | | return "operationButton"; |
| | | } |
| | | |
| | | @Override |
| | | public List<EnumsShowVo> getEnumsShowVos() { |
| | | return Lists.newArrayList(values()).stream().map(item -> |
| | | EnumsShowVo.builder() |
| | | .displayName(item.getDisplayName()) |
| | | .value(item.value) |
| | | .build() |
| | | ).collect(Collectors.toList()); |
| | | } |
| | | |
| | | public Integer getValue() { |
| | | return value; |
| | | } |
| | | |
| | | public String getDisplayName() { |
| | | return displayName; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.enums; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import com.matrix.core.enums.EnumApiShowAble; |
| | | import com.matrix.core.enums.EnumsShowVo; |
| | | import com.matrix.core.exception.GlobleException; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 操作功能枚举 |
| | | * |
| | | * @author jyy |
| | | */ |
| | | public enum OperationFunctionEnum implements EnumApiShowAble { |
| | | |
| | | ORDER(1, "订单"), |
| | | SERVICE_ORDER(2, "服务单"), |
| | | ; |
| | | |
| | | private Integer value; |
| | | |
| | | private String displayName; |
| | | |
| | | OperationFunctionEnum(Integer value, String displayName) { |
| | | this.value = value; |
| | | this.displayName = displayName; |
| | | } |
| | | |
| | | @Override |
| | | public String getEnumCode() { |
| | | return "operationFunction"; |
| | | } |
| | | |
| | | @Override |
| | | public List<EnumsShowVo> getEnumsShowVos() { |
| | | return Lists.newArrayList(values()).stream().map(item -> |
| | | EnumsShowVo.builder() |
| | | .displayName(item.getDisplayName()) |
| | | .value(item.value) |
| | | .build() |
| | | ).collect(Collectors.toList()); |
| | | } |
| | | |
| | | public static String getByValue(Integer value) { |
| | | for (int i = 0; i < values().length; i++) { |
| | | if (value.equals(values()[i].getValue())) { |
| | | return values()[i].displayName; |
| | | } |
| | | } |
| | | throw new GlobleException("无效枚举值"); |
| | | } |
| | | |
| | | |
| | | public Integer getValue() { |
| | | return value; |
| | | } |
| | | |
| | | public String getDisplayName() { |
| | | return displayName; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.enums; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import com.matrix.core.enums.EnumApiShowAble; |
| | | import com.matrix.core.enums.EnumsShowVo; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 支付方式 |
| | | * @author jyy |
| | | */ |
| | | public enum PayMethodEnum implements EnumApiShowAble { |
| | | |
| | | CASH(1, "现金"), |
| | | WECHAT(2, "微信"), |
| | | ALIPAY(3, "支付宝"), |
| | | BANK_CARD(4, "银行卡"), |
| | | BANK_MT(5, "美团"), |
| | | VIP_CARD(6, "会员卡"); |
| | | |
| | | private Integer value; |
| | | |
| | | private String displayName; |
| | | |
| | | PayMethodEnum(Integer value, String displayName) { |
| | | this.value = value; |
| | | this.displayName = displayName; |
| | | } |
| | | |
| | | @Override |
| | | public String getEnumCode() { |
| | | return "payMethod"; |
| | | } |
| | | |
| | | @Override |
| | | public List<EnumsShowVo> getEnumsShowVos() { |
| | | return Lists.newArrayList(values()).stream().map(item -> |
| | | EnumsShowVo.builder() |
| | | .displayName(item.getDisplayName()) |
| | | .value(item.value) |
| | | .build() |
| | | ).collect(Collectors.toList()); |
| | | } |
| | | |
| | | public Integer getValue() { |
| | | return value; |
| | | } |
| | | |
| | | public String getDisplayName() { |
| | | return displayName; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.enums; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import com.matrix.core.enums.EnumApiShowAble; |
| | | import com.matrix.core.enums.EnumsShowVo; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | public enum SmsPlatformEnum implements EnumApiShowAble { |
| | | |
| | | |
| | | ALIBABA(1 ,"阿里云短信"), |
| | | HUYIWUXIAN(2, "互亿无线"); |
| | | |
| | | private Integer value; |
| | | |
| | | private String displayName; |
| | | |
| | | SmsPlatformEnum(Integer value, String displayName) { |
| | | this.value = value; |
| | | this.displayName = displayName; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getEnumCode() { |
| | | return "smsPlatform"; |
| | | } |
| | | |
| | | @Override |
| | | public List<EnumsShowVo> getEnumsShowVos() { |
| | | return Lists.newArrayList(values()).stream().map(item -> |
| | | EnumsShowVo.builder() |
| | | .displayName(item.getDisplayName()) |
| | | .value(item.value) |
| | | .build() |
| | | ).collect(Collectors.toList()); |
| | | } |
| | | |
| | | public Integer getValue() { |
| | | return value; |
| | | } |
| | | |
| | | public String getDisplayName() { |
| | | return displayName; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.matrix.system.enums; |
| | | |
| | | import com.google.common.collect.Lists; |
| | | import com.matrix.core.enums.EnumApiShowAble; |
| | | import com.matrix.core.enums.EnumsShowVo; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 短信类型 |
| | | */ |
| | | public enum SmsTypeEnum implements EnumApiShowAble { |
| | | |
| | | |
| | | VERIFY_CODE(1, "验证码"), |
| | | SMS_NOTICE(2, "短信通知"), |
| | | PROMOTE(3, "推广短信"); |
| | | |
| | | private Integer value; |
| | | |
| | | private String displayName; |
| | | |
| | | SmsTypeEnum(Integer value, String displayName) { |
| | | this.value = value; |
| | | this.displayName = displayName; |
| | | } |
| | | |
| | | |
| | | |
| | | @Override |
| | | public String getEnumCode() { |
| | | return "smsType"; |
| | | } |
| | | |
| | | @Override |
| | | public List<EnumsShowVo> getEnumsShowVos() { |
| | | return Lists.newArrayList(values()).stream().map(item -> |
| | | EnumsShowVo.builder() |
| | | .displayName(item.getDisplayName()) |
| | | .value(item.value) |
| | | .build() |
| | | ).collect(Collectors.toList()); |
| | | } |
| | | |
| | | public Integer getValue() { |
| | | return value; |
| | | } |
| | | |
| | | public String getDisplayName() { |
| | | return displayName; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.action; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | | import com.matrix.core.tools.excl.ExcelVersion; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.fenxiao.dto.LoadFenxiaoOrderBasicDto; |
| | | import com.matrix.system.fenxiao.dto.LoadFenxiaoOrderListDto; |
| | | import com.matrix.system.fenxiao.dto.LoadSetOrderListDtoDto; |
| | | import com.matrix.system.fenxiao.dto.UpdateSetOrderDoneDto; |
| | | import com.matrix.system.fenxiao.service.ShopSalesmanOrderService; |
| | | import com.matrix.system.fenxiao.vo.FenxiaoOrderListExportVo; |
| | | import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderBasicVo; |
| | | import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderListVo; |
| | | import com.matrix.system.fenxiao.vo.LoadSetOrderListDtoVo; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/fenXiao/fenXiaoOrder") |
| | | public class FenXiaoOrderAction { |
| | | |
| | | @Autowired |
| | | private ShopSalesmanOrderService shopSalesmanOrderService; |
| | | |
| | | /** |
| | | * 分销订单基本信息 |
| | | */ |
| | | @ApiOperation(value = "分销订单基本信息") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = LoadFenxiaoOrderBasicVo.class) |
| | | }) |
| | | @PostMapping(value = "/loadFenxiaoOrderBasic") |
| | | public @ResponseBody |
| | | AjaxResult loadFenxiaoOrderBasic(@RequestBody LoadFenxiaoOrderBasicDto loadFenxiaoOrderBasicDto) { |
| | | return shopSalesmanOrderService.loadFenxiaoOrderBasic(loadFenxiaoOrderBasicDto); |
| | | } |
| | | |
| | | /** |
| | | * 分销订单 |
| | | */ |
| | | @ApiOperation(value = "分销订单") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = LoadFenxiaoOrderListVo.class) |
| | | }) |
| | | @PostMapping(value = "/loadFenxiaoOrderList") |
| | | public @ResponseBody |
| | | AjaxResult loadFenxiaoOrderList(@RequestBody LoadFenxiaoOrderListDto loadFenxiaoOrderListDto) { |
| | | return shopSalesmanOrderService.loadFenxiaoOrderList(loadFenxiaoOrderListDto); |
| | | } |
| | | |
| | | /** |
| | | *批量结算分销订单 |
| | | */ |
| | | @ApiOperation(value = "批量结算分销订单") |
| | | @PostMapping(value = "/updateSetOrderDone") |
| | | public @ResponseBody |
| | | AjaxResult updateSetOrderDone(@RequestBody UpdateSetOrderDoneDto updateSetOrderDoneDto) { |
| | | return shopSalesmanOrderService.updateSetOrderDone(updateSetOrderDoneDto); |
| | | } |
| | | |
| | | /** |
| | | * 结算记录 |
| | | */ |
| | | @ApiOperation(value = "结算记录") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = LoadSetOrderListDtoVo.class) |
| | | }) |
| | | @PostMapping(value = "/loadSetOrderList") |
| | | public @ResponseBody |
| | | AjaxResult loadSetOrderList(@RequestBody LoadSetOrderListDtoDto loadSetOrderListDto) { |
| | | return shopSalesmanOrderService.loadSetOrderList(loadSetOrderListDto); |
| | | } |
| | | |
| | | @RequestMapping(value = "/exportExcel") |
| | | public void exportExcel(HttpServletResponse response, LoadFenxiaoOrderListDto loadFenxiaoOrderListDto) throws IOException { |
| | | List<ExcelSheetPO> res = new ArrayList<>(); |
| | | ExcelSheetPO orderSheet = new ExcelSheetPO(); |
| | | String title = "分销订单明细"; |
| | | orderSheet.setSheetName(title); |
| | | orderSheet.setTitle(title); |
| | | String[] header = {"订单编号","实付金额(元)", "订单状态", "下单门店","客户", "推广员","收益类型","收益金额", "结算状态", "结算编号", "结算时间", "结算人"}; |
| | | orderSheet.setHeaders(header); |
| | | |
| | | List<FenxiaoOrderListExportVo> dataList = shopSalesmanOrderService.findFenxiaoOrderList(loadFenxiaoOrderListDto); |
| | | List<List<Object>> list = new ArrayList<>(); |
| | | if (dataList.size() > 0) { |
| | | for (FenxiaoOrderListExportVo item : dataList) { |
| | | List<Object> temp = new ArrayList<>(); |
| | | temp.add(item.getOrderNo()); |
| | | temp.add(item.getActualBalance()); |
| | | temp.add(item.getOrderState()); |
| | | temp.add(item.getAddress()); |
| | | temp.add(item.getCustom()); |
| | | temp.add(item.getParentSale()); |
| | | temp.add(item.getProfitType()); |
| | | temp.add(item.getProfitBalance()); |
| | | temp.add(item.getSettleType()); |
| | | temp.add(item.getSettleNo()); |
| | | temp.add(DateUtil.dateToString(item.getSettleTime(), DateUtil.DATE_FORMAT_MM)); |
| | | temp.add(item.getSettler()); |
| | | list.add(temp); |
| | | } |
| | | } |
| | | orderSheet.setDataList(list); |
| | | res.add(orderSheet); |
| | | response = ResponseHeadUtil.setExcelHead(response); |
| | | response.setHeader("Content-Disposition", |
| | | "attachment;filename=" + URLEncoder.encode(title + DateUtil.getTimeMark() + ".xlsx".trim(), "UTF-8")); |
| | | OutputStream os = response.getOutputStream(); |
| | | ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, res, os, true); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.action; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant; |
| | | import com.matrix.system.fenxiao.service.FenXiaoSettingService; |
| | | import com.matrix.system.fenxiao.vo.FenXiaoSettingVo; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.dao.ShoppingGoodsDao; |
| | | import com.matrix.system.shopXcx.bean.ShopProduct; |
| | | import com.matrix.system.shopXcx.dao.ShopProductDao; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/fenXiao/ruleSetting") |
| | | public class FenXiaoSettingAction { |
| | | |
| | | @Autowired |
| | | private FenXiaoSettingService fenXiaoSettingService; |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | @Autowired |
| | | private ShoppingGoodsDao shoppingGoodsDao; |
| | | |
| | | @Autowired |
| | | private SysVipInfoDao sysVipInfoDao; |
| | | |
| | | @Autowired |
| | | private ShopProductDao shopProductDao; |
| | | |
| | | /** |
| | | *查询分销配置 |
| | | */ |
| | | @RequestMapping(value = "/selectFenXiaoSetting") |
| | | public AjaxResult selectFenXiaoSetting() { |
| | | |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | |
| | | //分销开关 |
| | | String[] FXKGCode={FenxiaoSettingConstant.FX_SWITCH}; |
| | | String[] FXKGName={"分销开关"}; |
| | | List<FenXiaoSettingVo> fxkgRuleSettingsVo = getRuleSettingsVo(FXKGCode,FXKGName,companyId); |
| | | result.putInMap("fxkg", fxkgRuleSettingsVo); |
| | | //自购返佣 |
| | | String[] ZGFYCode={FenxiaoSettingConstant.FX_ZGFY}; |
| | | String[] ZGFYName={"自购返佣"}; |
| | | List<FenXiaoSettingVo> zgfyRuleSettingsVo = getRuleSettingsVo(ZGFYCode,ZGFYName,companyId); |
| | | result.putInMap("zgfy", zgfyRuleSettingsVo); |
| | | |
| | | //分销模式 |
| | | String[] FXMSCode={FenxiaoSettingConstant.FX_MODEL}; |
| | | String[] FXMSName={"分销模式"}; |
| | | List<FenXiaoSettingVo> fxmsRuleSettingsVo = getRuleSettingsVo(FXMSCode,FXMSName,companyId); |
| | | result.putInMap("fxms", fxmsRuleSettingsVo); |
| | | //申请方式 |
| | | String[] sqfsCode={FenxiaoSettingConstant.FX_APPLY_WAY}; |
| | | String[] sqfsName={"申请方式"}; |
| | | List<FenXiaoSettingVo> sqfsRuleSettingsVo = getRuleSettingsVo(sqfsCode,sqfsName,companyId); |
| | | result.putInMap("sqfs", sqfsRuleSettingsVo); |
| | | //审核方式 |
| | | String[] shfsCode={FenxiaoSettingConstant.FX_AUDIT_METHOD}; |
| | | String[] shfsName={"审核方式"}; |
| | | List<FenXiaoSettingVo> shfsRuleSettingsVo = getRuleSettingsVo(shfsCode,shfsName,companyId); |
| | | result.putInMap("shfs", shfsRuleSettingsVo); |
| | | //申请条件 |
| | | String[] sqtjCode={FenxiaoSettingConstant.FX_APPLY_CONDITION}; |
| | | String[] sqtjName={"申请条件"}; |
| | | List<FenXiaoSettingVo> sqtjRuleSettingsVo = getRuleSettingsVo(sqtjCode,sqtjName,companyId); |
| | | result.putInMap("sqtj", sqtjRuleSettingsVo); |
| | | if(CollUtil.isNotEmpty(sqtjRuleSettingsVo)){ |
| | | for(FenXiaoSettingVo fenXiaoSettingVo : sqtjRuleSettingsVo) { |
| | | //选择申请条件条件3时,获得选中产品集合 |
| | | if(FenxiaoSettingConstant.FX_APPLY_CONDITION_XFZDCP.equals(fenXiaoSettingVo.getParamValue())) { |
| | | String paramValue1 = fenXiaoSettingVo.getParamValue1(); |
| | | if(StrUtil.isNotEmpty(paramValue1)) { |
| | | List<Integer> idsList = new ArrayList<>(); |
| | | List<String> idsStringList = Arrays.asList(paramValue1.split(",")); |
| | | if(CollUtil.isNotEmpty(idsStringList)){ |
| | | for(String string : idsStringList) { |
| | | Integer parseInt = Integer.parseInt(string); |
| | | idsList.add(parseInt); |
| | | } |
| | | } |
| | | //List<ShoppingGoods> list = shoppingGoodsDao.selectByIds(idsList); |
| | | List<ShopProduct> shopProducts = shopProductDao.selectByIds(idsList); |
| | | result.putInMap("order", shopProducts); |
| | | } |
| | | }else{ |
| | | List<ShopProduct> shopProducts = new ArrayList<>(); |
| | | result.putInMap("order", shopProducts); |
| | | } |
| | | } |
| | | } |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 列表显示 |
| | | */ |
| | | @RequestMapping(value = "/selectProduct") |
| | | public @ResponseBody |
| | | AjaxResult selectProduct(ShopProduct shopProduct, PaginationVO pageVo) { |
| | | QueryUtil.setQueryLimitCom(shopProduct); |
| | | pageVo.setSort("createTime"); |
| | | pageVo.setOrder("desc"); |
| | | shopProduct.setDelFlag(AppConstance.DATA_USEABLE); |
| | | shopProduct.setCompanyId(shopProduct.getCompanyId()); |
| | | List<ShopProduct> dataList = shopProductDao.selectInPage(shopProduct, pageVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, |
| | | shopProductDao.selectTotalRecord(shopProduct)); |
| | | return result; |
| | | |
| | | } |
| | | |
| | | /** |
| | | *获取对应的规则设置数据 |
| | | * @param ArrayCode |
| | | * @param ArrayName |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | private List<FenXiaoSettingVo> getRuleSettingsVo(String[] ArrayCode,String[] ArrayName,Long companyId){ |
| | | List<BusParameterSettings> dataList = busParameterSettingsDao.selectByCodesAndCompanyId(Arrays.asList(ArrayCode), companyId); |
| | | List<FenXiaoSettingVo> scoreRuleSettingsVos=new ArrayList<FenXiaoSettingVo>(); |
| | | int index=0; |
| | | for (BusParameterSettings item:dataList){ |
| | | FenXiaoSettingVo paramVo=new FenXiaoSettingVo(); |
| | | BeanUtils.copyProperties(item,paramVo); |
| | | paramVo.setParamName(ArrayName[index]); |
| | | scoreRuleSettingsVos.add(paramVo); |
| | | index++; |
| | | } |
| | | return scoreRuleSettingsVos; |
| | | } |
| | | |
| | | /** |
| | | * 修改公司维度的分销规则 |
| | | */ |
| | | @PostMapping(value = "/updateFenXiaoSetting") |
| | | public @ResponseBody |
| | | AjaxResult updateFenXiaoSetting(@RequestBody List<BusParameterSettings> busParameterSettings) { |
| | | return fenXiaoSettingService.updateFenXiaoSettingByCompanyId(busParameterSettings); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.action; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao; |
| | | import com.matrix.system.fenxiao.dto.*; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanApply; |
| | | import com.matrix.system.fenxiao.service.ShopSalesmanApplyService; |
| | | import com.matrix.system.fenxiao.vo.*; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | @RestController |
| | | @RequestMapping(value = "/fenXiao/fenXiaoUser") |
| | | public class FenXiaoUserAction { |
| | | |
| | | @Autowired |
| | | private ShopSalesmanApplyService shopSalesmanApplyService; |
| | | @Autowired |
| | | private ShopSalesmanApplyDao shopSalesmanApplyDao; |
| | | @Autowired |
| | | private SysVipInfoDao sysVipInfoDao; |
| | | @Autowired |
| | | private ShopSalesmanGradeDao shopSalesmanGradeDao; |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 分销员详情页面信息 |
| | | */ |
| | | @ApiOperation(value = "分销员详情页面信息") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = ShopSalesmanDetailVo.class) |
| | | }) |
| | | @PostMapping(value = "/loadParamSettingBasic") |
| | | public @ResponseBody |
| | | AjaxResult findShopSalesmanDetail(@RequestBody LoadParamSettingBasicDto loadParamSettingBasicDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(loadParamSettingBasicDto); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | SalesmanBasicDetailVo salesmanBasicDetailVo = shopSalesmanApplyService.selectShopSalesmanDetailByOpenId(loadParamSettingBasicDto.getUserId(),loadParamSettingBasicDto.getApplyId()); |
| | | result.putInMap("basicdetail", salesmanBasicDetailVo); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 分销员详情页面绑定客户 |
| | | */ |
| | | @ApiOperation(value = "分销员详情页面绑定客户") |
| | | @PostMapping(value = "/loadParamSetting") |
| | | public @ResponseBody |
| | | AjaxResult loadParamSetting(@RequestBody LoadParamSettingDto loadParamSettingDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(loadParamSettingDto); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | //排序 |
| | | if(StringUtils.isBlank(loadParamSettingDto.getSort())){ |
| | | loadParamSettingDto.setSort("create_time"); |
| | | loadParamSettingDto.setOrder("desc"); |
| | | } |
| | | //查询绑定客户信息 |
| | | Page<ShopCustomDetailVo> page = new Page(loadParamSettingDto.getPageNum(), loadParamSettingDto.getPageSize()); |
| | | IPage<ShopCustomDetailVo> customDetailRows = shopSalesmanApplyService.findCustomDetail(page,loadParamSettingDto); |
| | | result.putInMap("customDetailRecords", customDetailRows.getRecords()); |
| | | result.putInMap("customDetailTotal", customDetailRows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 分销员详情页面邀请下级 |
| | | */ |
| | | @ApiOperation(value = "分销员详情页面邀请下级") |
| | | @PostMapping(value = "/loadParamSettinglow") |
| | | public @ResponseBody |
| | | AjaxResult loadParamSettinglow(@RequestBody ShopSalesmanDetailDto shopSalesmanDetailDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(shopSalesmanDetailDto); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | //排序 |
| | | if(StringUtils.isBlank(shopSalesmanDetailDto.getSort())){ |
| | | shopSalesmanDetailDto.setSort("create_time"); |
| | | shopSalesmanDetailDto.setOrder("desc"); |
| | | } |
| | | //查询邀请下级信息 |
| | | Page<ShopCustomDetailVo> pageLow = new Page(shopSalesmanDetailDto.getPageNum(), shopSalesmanDetailDto.getPageSize()); |
| | | IPage<ShopCustomDetailVo> customLowRows = shopSalesmanApplyService.findCustomLow(pageLow,shopSalesmanDetailDto); |
| | | result.putInMap("customLowRecords", customLowRows.getRecords()); |
| | | result.putInMap("customLowTotal", customLowRows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 分销员详情页面收益订单 |
| | | */ |
| | | @ApiOperation(value = "分销员详情页面收益订单") |
| | | @PostMapping(value = "/loadParamSettingOrder") |
| | | public @ResponseBody |
| | | AjaxResult loadParamSettingOrder(@RequestBody ShopSalesmanDetailDto shopSalesmanDetailDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(shopSalesmanDetailDto); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | //排序 |
| | | if(StringUtils.isBlank(shopSalesmanDetailDto.getSort())){ |
| | | shopSalesmanDetailDto.setSort("create_time"); |
| | | shopSalesmanDetailDto.setOrder("desc"); |
| | | } |
| | | //查询收益订单 |
| | | Page<ShopOrderDetailVo> pageOrder = new Page(shopSalesmanDetailDto.getPageNum(), shopSalesmanDetailDto.getPageSize()); |
| | | IPage<ShopOrderDetailVo> orderRows = shopSalesmanApplyService.findShopOrderDetail(pageOrder,shopSalesmanDetailDto); |
| | | result.putInMap("orderRecords", orderRows.getRecords()); |
| | | result.putInMap("orderTotal", orderRows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *修改等级 |
| | | */ |
| | | @ApiOperation(value = "修改等级") |
| | | @PostMapping(value = "/changeSaleManGrade") |
| | | public @ResponseBody |
| | | AjaxResult changeSaleManGrade(@RequestBody ChangeSaleManGradeDto changeSaleManGradeDto) { |
| | | return shopSalesmanApplyService.changeSaleManGrade(changeSaleManGradeDto); |
| | | } |
| | | |
| | | /** |
| | | *解绑 |
| | | */ |
| | | @ApiOperation(value = "解绑") |
| | | @PostMapping(value = "/unbundlingSaleMan") |
| | | public @ResponseBody |
| | | AjaxResult unbundlingSaleMan(@RequestBody UnbundlingSaleManDto unbundlingSaleManDto) { |
| | | return shopSalesmanApplyService.unbundlingSaleMan(unbundlingSaleManDto); |
| | | } |
| | | |
| | | /** |
| | | *推广图片 |
| | | */ |
| | | @ApiOperation(value = "推广图片") |
| | | @PostMapping(value = "/updateTgtp") |
| | | public @ResponseBody |
| | | AjaxResult updateTgtp(@RequestBody UpdateTgtpDto updateTgtpDto) { |
| | | return shopSalesmanApplyService.updateTgtp(updateTgtpDto); |
| | | } |
| | | |
| | | /** |
| | | *推广图片 |
| | | */ |
| | | @RequestMapping(value = "/loadTgtpSetting") |
| | | public AjaxResult loadTgtpSetting() { |
| | | |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | |
| | | //推广文案 |
| | | String[] FXKGCode={FenxiaoSettingConstant.FX_TG_POSTER}; |
| | | String[] FXKGName={"推广图片"}; |
| | | List<FenXiaoSettingVo> fxkgRuleSettingsVo = getRuleSettingsVo(FXKGCode,FXKGName,companyId); |
| | | result.putInMap("tgtp", fxkgRuleSettingsVo.get(0)); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *推广计划更新 |
| | | */ |
| | | @ApiOperation(value = "推广计划更新") |
| | | @PostMapping(value = "/updateTgjh") |
| | | public @ResponseBody |
| | | AjaxResult updateTgjh(@RequestBody UpdateTgjhDto updateTgjhDto) { |
| | | return shopSalesmanApplyService.updateTgjh(updateTgjhDto); |
| | | } |
| | | /** |
| | | *查询推广计划 |
| | | */ |
| | | @RequestMapping(value = "/loadTgwaSetting") |
| | | public AjaxResult loadTgwaSetting() { |
| | | |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = user.getCompanyId(); |
| | | |
| | | //推广文案 |
| | | String[] FXKGCode={FenxiaoSettingConstant.FX_TG_PLAN}; |
| | | String[] FXKGName={"推广文案"}; |
| | | List<FenXiaoSettingVo> fxkgRuleSettingsVo = getRuleSettingsVo(FXKGCode,FXKGName,companyId); |
| | | result.putInMap("tgwa", fxkgRuleSettingsVo.get(0)); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *获取对应的规则设置数据 |
| | | * @param ArrayCode |
| | | * @param ArrayName |
| | | * @param companyId |
| | | * @return |
| | | */ |
| | | private List<FenXiaoSettingVo> getRuleSettingsVo(String[] ArrayCode,String[] ArrayName,Long companyId){ |
| | | List<BusParameterSettings> dataList = busParameterSettingsDao.selectByCodesAndCompanyId(Arrays.asList(ArrayCode), companyId); |
| | | List<FenXiaoSettingVo> scoreRuleSettingsVos=new ArrayList<FenXiaoSettingVo>(); |
| | | int index=0; |
| | | for (BusParameterSettings item:dataList){ |
| | | FenXiaoSettingVo paramVo=new FenXiaoSettingVo(); |
| | | BeanUtils.copyProperties(item,paramVo); |
| | | paramVo.setParamName(ArrayName[index]); |
| | | scoreRuleSettingsVos.add(paramVo); |
| | | index++; |
| | | } |
| | | return scoreRuleSettingsVos; |
| | | } |
| | | |
| | | /** |
| | | * 分佣方案 |
| | | */ |
| | | @ApiOperation(value = "查询分佣方案") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = FyfaManageVo.class) |
| | | }) |
| | | @PostMapping(value = "/findFyfaManageList") |
| | | public @ResponseBody |
| | | AjaxResult findFyfaManageList(@RequestBody FyfaManageDto fyfaManageDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(fyfaManageDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(fyfaManageDto.getSort())){ |
| | | fyfaManageDto.setSort("create_time"); |
| | | fyfaManageDto.setOrder("asc"); |
| | | } |
| | | Page<FyfaManageVo> page = new Page(fyfaManageDto.getPageNum(), fyfaManageDto.getPageSize()); |
| | | IPage<FyfaManageVo> rows = shopSalesmanApplyService.findFyfaManageList(page,fyfaManageDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *新增分佣方案 |
| | | */ |
| | | @ApiOperation(value = "新增分佣方案") |
| | | @RequestMapping(value = "/addFyfa") |
| | | private @ResponseBody AjaxResult addFyfa(){ |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | shopSalesmanApplyService.addFyfa(user); |
| | | return AjaxResult.buildSuccessInstance("新增成功"); |
| | | } |
| | | |
| | | /** |
| | | *修改分佣方案 |
| | | */ |
| | | @ApiOperation(value = "修改分佣方案") |
| | | @PostMapping(value = "/updateFyfa") |
| | | public @ResponseBody |
| | | AjaxResult updateFyfa(@RequestBody UpdateFyfaDto updateFyfaDto) { |
| | | return shopSalesmanApplyService.updateFyfa(updateFyfaDto); |
| | | } |
| | | |
| | | /** |
| | | *删除分佣方案 |
| | | */ |
| | | @ApiOperation(value = "删除分佣方案") |
| | | @PostMapping(value = "/delFyfaApply") |
| | | public @ResponseBody |
| | | AjaxResult delFyfaApply(@RequestBody DelFyfaApplyDto delFyfaApplyDto) { |
| | | return shopSalesmanApplyService.delFyfaApply(delFyfaApplyDto); |
| | | } |
| | | |
| | | /** |
| | | * 查询分销员审核记录 |
| | | */ |
| | | @ApiOperation(value = "查询分销员审核记录") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = ShopSalesmanApplyVo.class) |
| | | }) |
| | | @PostMapping(value = "/findShopSalesmanApplyList") |
| | | public @ResponseBody |
| | | AjaxResult findShopSalesmanApplyList(@RequestBody ShopSalesmanApplyDto shopSalesmanApplyDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(shopSalesmanApplyDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(shopSalesmanApplyDto.getSort())){ |
| | | shopSalesmanApplyDto.setSort("create_time"); |
| | | shopSalesmanApplyDto.setOrder("desc"); |
| | | } |
| | | Page<ShopSalesmanApplyVo> page = new Page(shopSalesmanApplyDto.getPageNum(), shopSalesmanApplyDto.getPageSize()); |
| | | IPage<ShopSalesmanApplyVo> rows = shopSalesmanApplyService.findShopSalesmanApplyList(page,shopSalesmanApplyDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *获取分销员待审核记录 |
| | | */ |
| | | @ApiOperation(value = "获取分销员待审核记录") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "OK", response = ShopSalesmanAppliingVo.class) |
| | | }) |
| | | @PostMapping(value = "/findShopSalesmanAppliingList") |
| | | public @ResponseBody |
| | | AjaxResult findShopSalesmanAppliingList(@RequestBody ShopSalesmanAppliingDto shopSalesmanAppliingDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(shopSalesmanAppliingDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(shopSalesmanAppliingDto.getSort())){ |
| | | shopSalesmanAppliingDto.setSort("create_time"); |
| | | shopSalesmanAppliingDto.setOrder("desc"); |
| | | } |
| | | |
| | | Page<ShopSalesmanAppliingVo> page = new Page(shopSalesmanAppliingDto.getPageNum(), shopSalesmanAppliingDto.getPageSize()); |
| | | IPage<ShopSalesmanAppliingVo> rows = shopSalesmanApplyService.selectBizUserApplyList(page,shopSalesmanAppliingDto); |
| | | |
| | | //IPage<ShopSalesmanAppliingVo> rows = shopSalesmanApplyService.findShopSalesmanAppliingList(page,shopSalesmanAppliingDto); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(rows.getRecords(),rows.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | *新增分销员 |
| | | */ |
| | | @ApiOperation(value = "新增分销员") |
| | | @PostMapping(value = "/addSaleManApply") |
| | | public @ResponseBody |
| | | AjaxResult addSaleManApply(@RequestBody AddSaleManApplyDto addSaleManApplyDto) { |
| | | |
| | | if(addSaleManApplyDto.getGradeId()==null) { |
| | | return AjaxResult.buildFailInstance("请选择分销等级"); |
| | | } |
| | | |
| | | shopSalesmanApplyService.addSaleManApply(addSaleManApplyDto.getUserId(), addSaleManApplyDto.getGradeId()); |
| | | return AjaxResult.buildSuccessInstance("设置成功"); |
| | | } |
| | | |
| | | /** |
| | | *删除---设置成不是分销员 |
| | | */ |
| | | @ApiOperation(value = "删除---设置成不是分销员") |
| | | @PostMapping(value = "/delSaleManGradeApply") |
| | | public @ResponseBody |
| | | AjaxResult delSaleManGradeApply(@RequestBody DelSaleManGradeApplyDto delSaleManGradeApplyDto) { |
| | | return shopSalesmanApplyService.delSaleManGradeApply(delSaleManGradeApplyDto); |
| | | } |
| | | |
| | | /** |
| | | *审核分销员 |
| | | */ |
| | | @ApiOperation(value = "审核分销员") |
| | | @PostMapping(value = "/examineSaleManApply") |
| | | public @ResponseBody |
| | | AjaxResult examineSaleManApply(@RequestBody ExamineSaleManApplyDto examineSaleManApplyDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(examineSaleManApplyDto); |
| | | //待审核状态才允许提交 |
| | | ShopSalesmanApply shopSalesmanApply = shopSalesmanApplyDao.selectById(examineSaleManApplyDto.getApplyId()); |
| | | if(ObjectUtil.isEmpty(shopSalesmanApply)) { |
| | | return AjaxResult.buildFailInstance("当前记录有误"); |
| | | } |
| | | |
| | | SysVipInfo sysVipInfo = sysVipInfoDao.selectById(examineSaleManApplyDto.getUserId()); |
| | | if(ObjectUtil.isEmpty(sysVipInfo)) { |
| | | return AjaxResult.buildFailInstance("当前记录有误"); |
| | | } |
| | | |
| | | Integer applyStatus = shopSalesmanApply.getApplyStatus(); |
| | | if(ObjectUtil.isNotEmpty(applyStatus) && ShopSalesmanApply.APPLY_STATUS_DSH == applyStatus) { |
| | | Integer applyState = examineSaleManApplyDto.getApplyState(); |
| | | shopSalesmanApplyService.examineSaleManApply(shopSalesmanApply,applyState); |
| | | return AjaxResult.buildSuccessInstance("审核成功"); |
| | | }else{ |
| | | return AjaxResult.buildFailInstance("当前记录不是待审核状态"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | *获取对应的分销员等级 |
| | | */ |
| | | @RequestMapping(value = "/getShopSalesmanGrade") |
| | | private @ResponseBody AjaxResult getShopSalesmanGradeVo(){ |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | List<ShopSalesmanGradeVo> dataList = shopSalesmanApplyService.getShopSalesmanGradeVo(user.getCompanyId()); |
| | | result.putInMap("salesGrade", dataList); |
| | | return result; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.constant; |
| | | |
| | | public class FenxiaoSettingConstant { |
| | | /** |
| | | * 分销开关 |
| | | */ |
| | | public final static String FX_SWITCH = "FX_SWITCH"; |
| | | /** |
| | | * 分销模式 |
| | | */ |
| | | public final static String FX_MODEL = "FX_MODEL"; |
| | | /** |
| | | * 自购返佣 1:是 2:否 |
| | | */ |
| | | public final static String FX_ZGFY = "FX_ZGFY"; |
| | | |
| | | public final static String FX_ZGFY_YES = "1"; |
| | | public final static String FX_ZGFY_NO = "2"; |
| | | /** |
| | | * 申请方式 |
| | | */ |
| | | public final static String FX_APPLY_WAY = "FX_APPLY_WAY"; |
| | | /** |
| | | * 申请方式 1自动申请通过 |
| | | */ |
| | | public final static String FX_APPLY_WAY_AUTO = "1"; |
| | | /** |
| | | * 申请方式 2需要主动申请 |
| | | */ |
| | | public final static String FX_APPLY_WAY_CUSTOMER = "2"; |
| | | /** |
| | | * 审核方式 1系统自动审核,2人工审核 |
| | | */ |
| | | public final static String FX_AUDIT_METHOD = "FX_AUDIT_METHOD"; |
| | | /** |
| | | * 申请条件 |
| | | */ |
| | | public final static String FX_APPLY_CONDITION = "FX_APPLY_CONDITION"; |
| | | /** |
| | | * 申请条件 1 无条件 |
| | | */ |
| | | public final static String FX_APPLY_CONDITION_WTJ = "1"; |
| | | /** |
| | | * 申请条件 2 消费任意产品 |
| | | */ |
| | | public final static String FX_APPLY_CONDITION_XFRYCP = "2"; |
| | | /** |
| | | * 申请条件 3 消费指定产品 |
| | | */ |
| | | public final static String FX_APPLY_CONDITION_XFZDCP = "3"; |
| | | /** |
| | | * 申请条件 4 消费指定金额 |
| | | */ |
| | | public final static String FX_APPLY_CONDITION_XCZDJE = "4"; |
| | | /** |
| | | * 推广计划 |
| | | */ |
| | | public final static String FX_TG_PLAN = "FX_TG_PLAN"; |
| | | |
| | | public static final String FX_TG_POSTER ="FX_TG_POSTER"; |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.fenxiao.entity.BizUser; |
| | | |
| | | /** |
| | | * @description 推广员申请记录 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface BizUserDao extends BaseMapper<BizUser> { |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.fenxiao.entity.FenXiaoSettingEntity; |
| | | |
| | | public interface FenXiaoSettingDao extends BaseMapper<FenXiaoSettingEntity> { |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.fenxiao.entity.ShopRevenueFlow; |
| | | import com.matrix.system.shopXcx.api.dto.RevenueFlowDto; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @description 收益流水 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface ShopRevenueFlowDao extends BaseMapper<ShopRevenueFlow> { |
| | | |
| | | IPage<ShopRevenueFlow> selectRevenuFlowList(Page<ShopRevenueFlow> page, @Param("record") RevenueFlowDto revenueFlowDto); |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.fenxiao.entity.ShopSalemanSettlement; |
| | | |
| | | /** |
| | | * @description 订单结算记录 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface ShopSalemanSettlementDao extends BaseMapper<ShopSalemanSettlement> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.fenxiao.dto.LoadParamSettingDto; |
| | | import com.matrix.system.fenxiao.dto.ShopSalesmanAppliingDto; |
| | | import com.matrix.system.fenxiao.dto.ShopSalesmanApplyDto; |
| | | import com.matrix.system.fenxiao.dto.ShopSalesmanDetailDto; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanApply; |
| | | import com.matrix.system.fenxiao.vo.SalesmanBasicDetailVo; |
| | | import com.matrix.system.fenxiao.vo.ShopCustomDetailVo; |
| | | import com.matrix.system.fenxiao.vo.ShopOrderDetailVo; |
| | | import com.matrix.system.fenxiao.vo.ShopSalesmanAppliingVo; |
| | | import com.matrix.system.fenxiao.vo.ShopSalesmanApplyVo; |
| | | import com.matrix.system.shopXcx.vo.SalesmanCenterInfo; |
| | | import com.matrix.system.shopXcx.vo.SalesmanVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | /** |
| | | * @description 推广员申请记录 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface ShopSalesmanApplyDao extends BaseMapper<ShopSalesmanApply> { |
| | | |
| | | IPage<SalesmanVo> selectInvitationuserInPage(Page<SalesmanVo> page, @Param("userId") Long userId, @Param("isSales")String isSales); |
| | | |
| | | IPage<SalesmanVo> selectInvitationuserInPage(Page<SalesmanVo> page, @Param("userId") Long userId); |
| | | |
| | | IPage<ShopSalesmanApplyVo> findShopSalesmanApplyList(Page<ShopSalesmanApplyVo> page, |
| | | @Param("record")ShopSalesmanApplyDto shopSalesmanApplyDto); |
| | | //根据公司ID、审核状态、会员昵称查询对应的记录 |
| | | IPage<ShopSalesmanAppliingVo> findShopSalesmanAppliingList(Page<ShopSalesmanAppliingVo> page, |
| | | @Param("record")ShopSalesmanAppliingDto shopSalesmanAppliingDto); |
| | | |
| | | IPage<ShopSalesmanAppliingVo> selectBizUserApplyList(Page<ShopSalesmanAppliingVo> page, |
| | | @Param("record")ShopSalesmanAppliingDto shopSalesmanAppliingDto); |
| | | |
| | | SalesmanCenterInfo selectSalesmanCenterInfo(Long id); |
| | | |
| | | SalesmanBasicDetailVo selectShopSalesmanDetailByOpenId(@Param("userId")Long userId, |
| | | @Param("companyId")Long companyId,@Param("applyId")long applyId); |
| | | |
| | | IPage<ShopCustomDetailVo> findCustomDetail(Page<ShopCustomDetailVo> page, |
| | | @Param("record")LoadParamSettingDto loadParamSettingDto); |
| | | |
| | | IPage<ShopCustomDetailVo> findCustomLow(Page<ShopCustomDetailVo> pageLow, |
| | | @Param("record")ShopSalesmanDetailDto shopSalesmanDetailDto); |
| | | |
| | | IPage<ShopOrderDetailVo> findShopOrderDetail(Page<ShopOrderDetailVo> pageOrder, |
| | | @Param("record")ShopSalesmanDetailDto shopSalesmanDetailDto); |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.fenxiao.dto.FyfaManageDto; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanGrade; |
| | | import com.matrix.system.fenxiao.vo.FyfaManageVo; |
| | | import com.matrix.system.fenxiao.vo.ShopSalesmanGradeVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 推广员等级 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface ShopSalesmanGradeDao extends BaseMapper<ShopSalesmanGrade> { |
| | | |
| | | List<ShopSalesmanGradeVo> getShopSalesmanGradeVo(@Param("companyId")Long companyId); |
| | | |
| | | IPage<FyfaManageVo> findFyfaManageList(Page<FyfaManageVo> page,@Param("record")FyfaManageDto fyfaManageDto); |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.fenxiao.dto.LoadFenxiaoOrderListDto; |
| | | import com.matrix.system.fenxiao.dto.LoadSetOrderListDtoDto; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanOrder; |
| | | import com.matrix.system.fenxiao.vo.FenxiaoOrderListExportVo; |
| | | import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderBasicVo; |
| | | import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderListVo; |
| | | import com.matrix.system.fenxiao.vo.LoadSetOrderListDtoVo; |
| | | import com.matrix.system.shopXcx.api.dto.SaleOrderDto; |
| | | import com.matrix.system.shopXcx.vo.SalesOrderVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 分销订单 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | public interface ShopSalesmanOrderDao extends BaseMapper<ShopSalesmanOrder> { |
| | | |
| | | /** |
| | | * 查询推广订单 |
| | | * @param page |
| | | * @param saleOrderDto |
| | | * @return |
| | | */ |
| | | IPage<SalesOrderVo> selectSalesManOrder(Page<SalesOrderVo> page, @Param("record") SaleOrderDto saleOrderDto); |
| | | |
| | | LoadFenxiaoOrderBasicVo selectFenxiaoOrderBasicByCompanyId(@Param("companyId")Long companyId); |
| | | |
| | | IPage<LoadFenxiaoOrderListVo> findFenxiaoOrderList(Page<LoadFenxiaoOrderListVo> page, |
| | | @Param("record")LoadFenxiaoOrderListDto loadFenxiaoOrderListDto); |
| | | |
| | | IPage<LoadSetOrderListDtoVo> findSetOrderList(Page<LoadSetOrderListDtoVo> page, |
| | | @Param("record")LoadSetOrderListDtoDto loadSetOrderListDto); |
| | | |
| | | List<FenxiaoOrderListExportVo> selectFenxiaoOrderListNoPage(@Param("record")LoadFenxiaoOrderListDto loadFenxiaoOrderListDto); |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanOrderItem; |
| | | |
| | | /** |
| | | * @description 分销单明细 |
| | | * @author yourName |
| | | * @date 2021-03-12 13:17 |
| | | */ |
| | | public interface ShopSalesmanOrderItemDao extends BaseMapper<ShopSalesmanOrderItem> { |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "AddSaleManApplyDto", description = "查询参数") |
| | | public class AddSaleManApplyDto { |
| | | |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | |
| | | @ApiModelProperty(value ="等级ID") |
| | | private Long gradeId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ChangeSaleManGradeDto", description = "查询参数") |
| | | public class ChangeSaleManGradeDto { |
| | | |
| | | @ApiModelProperty(value ="会员id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value ="等级ID") |
| | | private Long gradeId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "DelFyfaApplyDto", description = "参数") |
| | | public class DelFyfaApplyDto { |
| | | |
| | | @ApiModelProperty(value ="申请记录ID") |
| | | private Long gradeId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "DelSaleManGradeApplyDto", description = "查询参数") |
| | | public class DelSaleManGradeApplyDto { |
| | | |
| | | @ApiModelProperty(value ="会员id") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value ="申请记录ID") |
| | | private Long applyId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ExamineSaleManApplyDto", description = "查询参数") |
| | | public class ExamineSaleManApplyDto { |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value = "申请记录ID") |
| | | private Long applyId; |
| | | |
| | | @ApiModelProperty(value ="审核状态 2:同意 3:不同意") |
| | | private Integer applyState; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "FyfaManageDto", description = "查询参数") |
| | | public class FyfaManageDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value ="申请记录ID") |
| | | private Long applyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LoadFenxiaoOrderBasicDto", description = "查询参数") |
| | | public class LoadFenxiaoOrderBasicDto { |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LoadFenxiaoOrderListDto", description = "查询参数") |
| | | public class LoadFenxiaoOrderListDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | @ApiModelProperty(value ="订单状态") |
| | | private Integer ddType; |
| | | |
| | | @ApiModelProperty(value ="结算状态") |
| | | private Integer orderType; |
| | | |
| | | @ApiModelProperty(value ="客户名称") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value ="推广员名称") |
| | | private String tgy; |
| | | |
| | | @ApiModelProperty(value ="开始时间") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty(value ="结束时间") |
| | | private Date endTime; |
| | | |
| | | @ApiModelProperty(value ="结算编号") |
| | | private String jsbh; |
| | | |
| | | @ApiModelProperty(value ="订单号") |
| | | private String ddh; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LoadParamSettingBasicDto", description = "查询参数") |
| | | public class LoadParamSettingBasicDto { |
| | | |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value ="申请记录ID") |
| | | private Long applyId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LoadParamSettingDto", description = "查询参数") |
| | | public class LoadParamSettingDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="会员姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value ="申请记录ID") |
| | | private Long applyId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import java.util.Date; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LoadSetOrderListDtoDto", description = "查询参数") |
| | | public class LoadSetOrderListDtoDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | @ApiModelProperty(value ="会员姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value ="开始时间") |
| | | private Date startTime; |
| | | |
| | | @ApiModelProperty(value ="结束时间") |
| | | private Date endTime; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ShopSalesmanAppliingDto", description = "查询参数") |
| | | public class ShopSalesmanAppliingDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="会员名称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ShopSalesmanApplyDto", description = "查询参数") |
| | | public class ShopSalesmanApplyDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="审核状态") |
| | | private Integer shenheState; |
| | | @ApiModelProperty(value ="分销员等级") |
| | | private Long salemanGrade; |
| | | @ApiModelProperty(value ="会员姓名") |
| | | private String userName; |
| | | |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ShopSalesmanDetailDto", description = "查询参数") |
| | | public class ShopSalesmanDetailDto extends BasePageQueryDto { |
| | | |
| | | @ApiModelProperty(value ="会员姓名") |
| | | private String userName; |
| | | |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(value ="申请记录ID") |
| | | private Long applyId; |
| | | |
| | | @ApiModelProperty(value = " 结算状态1,待结算,2,已结算,3已退款") |
| | | private Integer orderType; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UnbundlingSaleManDto", description = "查询参数") |
| | | public class UnbundlingSaleManDto { |
| | | |
| | | @ApiModelProperty(value ="会员ID") |
| | | private Long userId; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateFyfaDto", description = "参数") |
| | | public class UpdateFyfaDto { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "方案名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "自购返佣%") |
| | | private Double selfCommission; |
| | | |
| | | @ApiModelProperty(value = "推广提成%") |
| | | private Double sealesCommission; |
| | | |
| | | @ApiModelProperty(value = "邀请提成 %") |
| | | private Double invitationCommission; |
| | | |
| | | @ApiModelProperty(value = "等级条件(推广金额)") |
| | | private Double gradeCondition; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateSetOrderDoneDto", description = "查询参数") |
| | | public class UpdateSetOrderDoneDto { |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | @ApiModelProperty(value ="需要处理的IDs(字符串逗号隔开)") |
| | | private String orderIds; |
| | | |
| | | @ApiModelProperty(value ="结算方式1,线下结算,2余额结算") |
| | | private Integer setType; |
| | | |
| | | @ApiModelProperty(value ="结算人数") |
| | | private Integer manCount; |
| | | |
| | | @ApiModelProperty(value ="结算单数") |
| | | private Integer orderCount; |
| | | |
| | | @ApiModelProperty(value ="结算金额") |
| | | private Double amount; |
| | | |
| | | @ApiModelProperty(value ="备注") |
| | | private String remark; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateTgjhDto", description = "参数") |
| | | public class UpdateTgjhDto { |
| | | |
| | | @ApiModelProperty(value = "方案名称") |
| | | private String tgfa; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "UpdateTgjhDto", description = "参数") |
| | | public class UpdateTgtpDto { |
| | | |
| | | @ApiModelProperty(value = "方案名称") |
| | | private String imageUrl; |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * @description 用户表 |
| | | * @author jyy |
| | | */ |
| | | @Data |
| | | @TableName("biz_user") |
| | | public class BizUser { |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | /** |
| | | * 主键 |
| | | */ |
| | | private String userId; |
| | | |
| | | |
| | | /** |
| | | * 真实姓名 |
| | | */ |
| | | private String userName; |
| | | |
| | | |
| | | /** |
| | | * 密码 |
| | | */ |
| | | private String userPassword; |
| | | |
| | | |
| | | /** |
| | | * 用户昵称 |
| | | */ |
| | | private String nickName; |
| | | |
| | | |
| | | /** |
| | | * 头像 |
| | | */ |
| | | private String avatarUrl; |
| | | |
| | | |
| | | /** |
| | | * 微信openid用户唯一标识 |
| | | */ |
| | | private String openId; |
| | | |
| | | |
| | | /** |
| | | * 用户在开发平台的唯一标识符 |
| | | */ |
| | | private String unionId; |
| | | |
| | | |
| | | /** |
| | | * 性别 1、男 2、女 0、未知 |
| | | */ |
| | | private String gender; |
| | | |
| | | |
| | | /** |
| | | * 手机号码 |
| | | */ |
| | | private String phoneNumber; |
| | | |
| | | |
| | | /** |
| | | * 用户所在地 |
| | | */ |
| | | private String area; |
| | | |
| | | |
| | | /** |
| | | * 用户所在城市 |
| | | */ |
| | | private String city; |
| | | |
| | | |
| | | /** |
| | | * 用户所在省份 |
| | | */ |
| | | private String province; |
| | | |
| | | |
| | | /** |
| | | * 用户所在国家 |
| | | */ |
| | | private String country; |
| | | |
| | | |
| | | /** |
| | | * 会话密匙 |
| | | */ |
| | | private String sessionKey; |
| | | |
| | | |
| | | /** |
| | | * 最后登录时间 |
| | | */ |
| | | private Date lastLoginTime; |
| | | |
| | | |
| | | /** |
| | | * 用户状态 |
| | | */ |
| | | private Integer userStatus; |
| | | |
| | | |
| | | /** |
| | | * vip等级 |
| | | */ |
| | | private Integer userVip; |
| | | |
| | | |
| | | /** |
| | | * 到期时间 |
| | | */ |
| | | private Date userExpiryTime; |
| | | |
| | | |
| | | /** |
| | | * 认证信息 |
| | | */ |
| | | private String userAuthentication; |
| | | |
| | | |
| | | /** |
| | | * 用户是否授权 1、是 2、否 |
| | | */ |
| | | private Integer userIsAuthorize; |
| | | |
| | | |
| | | /** |
| | | * 用户临时名称 |
| | | */ |
| | | private String userTempName; |
| | | |
| | | |
| | | /** |
| | | * 用户临时头像 |
| | | */ |
| | | private String userTempAvatarUrl; |
| | | |
| | | |
| | | /** |
| | | * 用户类型 1、普通用户 2、会员 3、游客 |
| | | */ |
| | | private Integer userType; |
| | | |
| | | |
| | | /** |
| | | * 用户总积分 |
| | | */ |
| | | private Integer totalScore; |
| | | |
| | | |
| | | /** |
| | | * 用户当前积分 |
| | | */ |
| | | private Integer currentScore; |
| | | |
| | | |
| | | /** |
| | | * 上级用户openId |
| | | */ |
| | | private String parentOpenId; |
| | | |
| | | |
| | | /** |
| | | * 绑定上级用户时间 |
| | | */ |
| | | private Date bindingParentTime; |
| | | |
| | | |
| | | /** |
| | | * 是否是销售员(1=是,0=否) |
| | | */ |
| | | private Integer isSales; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | |
| | | @TableName("score_order") |
| | | public class FenXiaoSettingEntity extends BaseEntity { |
| | | |
| | | private String orderNo; |
| | | |
| | | public String getOrderNo() { |
| | | return orderNo; |
| | | } |
| | | |
| | | public void setOrderNo(String orderNo) { |
| | | this.orderNo = orderNo; |
| | | } |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description 收益流水 |
| | | * @author yourName |
| | | * @date 2021-03-10 17:34 |
| | | */ |
| | | @Data |
| | | @TableName("shop_revenue_flow") |
| | | public class ShopRevenueFlow extends BaseEntity { |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | /** |
| | | * 推广收益类型 推广收益 |
| | | */ |
| | | public static final String TYPE_TGSY = "推广收益"; |
| | | /** |
| | | * 推广收益类型 邀请收益 |
| | | */ |
| | | |
| | | public static final String TYPE_YQSY = "邀请收益"; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | @ApiModelProperty(hidden = true) |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 收益说明 |
| | | */ |
| | | |
| | | @ApiModelProperty(value = "收益说明") |
| | | private String revenueContent; |
| | | |
| | | /** |
| | | * 收益金额 |
| | | */ |
| | | |
| | | @ApiModelProperty(value = "收益金额") |
| | | private Double amount; |
| | | |
| | | /** |
| | | * 原始订单ID |
| | | */ |
| | | |
| | | @ApiModelProperty(value = "原始订单ID") |
| | | private Long businessId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description 订单结算记录 |
| | | * @author yourName |
| | | * @date 2021-03-10 17:34 |
| | | */ |
| | | @Data |
| | | @TableName("shop_saleman_settlement") |
| | | public class ShopSalemanSettlement extends BaseEntity { |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * 结算编号头部编码 |
| | | */ |
| | | public static final String ORDERNO_START = "J"; |
| | | |
| | | /** |
| | | * 结算方式 1 线下结算 |
| | | */ |
| | | public static final Integer SETTLEMENTWAY_XXJS = 1; |
| | | |
| | | /** |
| | | * 结算方式 2 微信余额结算 |
| | | */ |
| | | public static final Integer SETTLEMENTWAY_YEJS = 2; |
| | | |
| | | |
| | | /** |
| | | * 结算编号 |
| | | */ |
| | | |
| | | |
| | | private String orderNo; |
| | | |
| | | /** |
| | | * 结算方式1,线下结算,2余额结算 |
| | | */ |
| | | |
| | | |
| | | private Integer settlementWay; |
| | | |
| | | /** |
| | | * 结算人数 |
| | | */ |
| | | |
| | | |
| | | private Integer manCount; |
| | | |
| | | /** |
| | | * 结算单数 |
| | | */ |
| | | |
| | | |
| | | private Integer orderCount; |
| | | |
| | | /** |
| | | * 结算金额 |
| | | */ |
| | | |
| | | |
| | | private Double amount; |
| | | |
| | | /** |
| | | * 结算人 |
| | | */ |
| | | |
| | | |
| | | private Integer userId; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | | |
| | | |
| | | private String remark; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description 推广员申请记录 |
| | | * @author yourName |
| | | * @date 2021-03-10 17:34 |
| | | */ |
| | | @Data |
| | | @TableName("shop_salesman_apply") |
| | | public class ShopSalesmanApply extends BaseEntity { |
| | | /** |
| | | * 审核状态-1、待审核 |
| | | */ |
| | | public static final int APPLY_STATUS_DSH = 1; |
| | | /** |
| | | * 审核状态-2通过 |
| | | */ |
| | | public static final int APPLY_STATUS_TG= 2; |
| | | /** |
| | | * 审核状态-3未通过 |
| | | */ |
| | | public static final int APPLY_STATUS_WTG = 3; |
| | | /** |
| | | * 审核状态-4系统删除 |
| | | */ |
| | | public static final int APPLY_STATUS_XTQX = 4; |
| | | |
| | | |
| | | /** |
| | | * 申请方式1、自主申请 |
| | | */ |
| | | public static final int APPLY_WAY_SELF=1; |
| | | /** |
| | | * 申请方式2、自动添加 |
| | | */ |
| | | public static final int APPLY_WAY_AUTO_ADD=2; |
| | | /** |
| | | * 申请方式3上级邀请 |
| | | */ |
| | | public static final int APPLY_WAY_INVITATION=3; |
| | | /** |
| | | * 申请方式 4、手动添加 |
| | | */ |
| | | public static final int APPLY_WAY_HAND_ADD=4; |
| | | |
| | | |
| | | |
| | | @ApiModelProperty(value = "申请方式1、自主申请,2、自动添加,3上级邀请,4、手动添加") |
| | | private Integer applyWay; |
| | | |
| | | @ApiModelProperty(value = "申请用户id") |
| | | private Long userId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "邀请用户ID") |
| | | private Long parentUserId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "申请状态1、待审核,2通过,3未通过") |
| | | private Integer applyStatus; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "等级ID") |
| | | private long gradeId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description 推广员等级 |
| | | * @author yourName |
| | | * @date 2021-03-10 17:34 |
| | | */ |
| | | @Data |
| | | @TableName("shop_salesman_grade") |
| | | public class ShopSalesmanGrade extends BaseEntity { |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 等级名称 |
| | | */ |
| | | |
| | | |
| | | private String name; |
| | | |
| | | /** |
| | | * 推广提成% |
| | | */ |
| | | |
| | | |
| | | private Double sealesCommission; |
| | | |
| | | /** |
| | | * 自购返佣比例% |
| | | */ |
| | | |
| | | private Double selfCommission; |
| | | |
| | | |
| | | /** |
| | | * 邀请提成 % |
| | | */ |
| | | |
| | | |
| | | private Double invitationCommission; |
| | | |
| | | /** |
| | | * 等级条件(推广金额额) |
| | | */ |
| | | |
| | | |
| | | private Double gradeCondition; |
| | | |
| | | /** |
| | | * 默认等级1是,2不是 |
| | | */ |
| | | |
| | | |
| | | private Integer isDefault; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description 分销订单 |
| | | * @author yourName |
| | | * @date 2021-03-10 17:34 |
| | | */ |
| | | @Data |
| | | @TableName("shop_salesman_order") |
| | | public class ShopSalesmanOrder extends BaseEntity { |
| | | /** |
| | | * 推广收益类型1推广收益 |
| | | */ |
| | | public static final Integer REVENUE_TYPE_SALES = 1; |
| | | |
| | | /** |
| | | * 推广收益类型2邀请收益 |
| | | */ |
| | | public static final Integer REVENUE_TYPE_INVITATION = 2; |
| | | /** |
| | | * 分销单状态1待结算 |
| | | */ |
| | | public static final Integer STATUS_DJS = 1; |
| | | /** |
| | | * 分销单状态2已结算 |
| | | */ |
| | | public static final Integer STATUS_YJS = 2; |
| | | /** |
| | | * 分销单状态3已退款 |
| | | */ |
| | | public static final Integer STATUS_YTK = 3; |
| | | |
| | | |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 订单id |
| | | */ |
| | | |
| | | |
| | | private Long orderId ; |
| | | |
| | | /** |
| | | * 用户id |
| | | */ |
| | | |
| | | |
| | | private Long userId; |
| | | |
| | | /** |
| | | * 收益人id |
| | | */ |
| | | |
| | | |
| | | private Long salesUserId; |
| | | |
| | | /** |
| | | * 收益类型1,推广收益,2邀请收益 |
| | | */ |
| | | |
| | | |
| | | private Integer revenueType; |
| | | |
| | | /** |
| | | * 收益金额 |
| | | */ |
| | | |
| | | |
| | | private Double amount; |
| | | |
| | | /** |
| | | * 结算状态 1,待结算,2,已结算,3已退款 |
| | | */ |
| | | private Integer orderStatus; |
| | | |
| | | /** |
| | | * 结算单ID |
| | | */ |
| | | |
| | | |
| | | private Long settlementId; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | |
| | | |
| | | private Long companyId; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @description 分销单明细 |
| | | * @author yourName |
| | | * @date 2021-03-12 13:17 |
| | | */ |
| | | @Data |
| | | @TableName("shop_salesman_order_item") |
| | | public class ShopSalesmanOrderItem extends BaseEntity { |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 订单id |
| | | */ |
| | | |
| | | |
| | | private Long orderId ; |
| | | |
| | | /** |
| | | * 分销订单id |
| | | */ |
| | | |
| | | |
| | | private Long salesmanOrderId; |
| | | |
| | | /** |
| | | * 订单明细id |
| | | */ |
| | | |
| | | |
| | | private Long orderItemId; |
| | | |
| | | /** |
| | | * 收益金额 |
| | | */ |
| | | |
| | | |
| | | private Double amount; |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.fenxiao.dao.FenXiaoSettingDao; |
| | | import com.matrix.system.fenxiao.entity.FenXiaoSettingEntity; |
| | | import com.matrix.system.hive.bean.ShoppingGoods; |
| | | |
| | | @Service |
| | | public class FenXiaoSettingService extends ServiceImpl<FenXiaoSettingDao, FenXiaoSettingEntity> { |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | public AjaxResult updateFenXiaoSettingByCompanyId(List<BusParameterSettings> busParameterSettings) { |
| | | //获取当前登录人员信息 |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | for (BusParameterSettings busParameterSetting:busParameterSettings ) { |
| | | String paramCode = busParameterSetting.getParamCode(); |
| | | if(StringUtils.isNotBlank(paramCode)){ |
| | | //删除原有code |
| | | BusParameterSettings delParanm=new BusParameterSettings(); |
| | | delParanm.setCompanyId(user.getCompanyId()); |
| | | delParanm.setParamCode(paramCode); |
| | | busParameterSettingsDao.deleteByModel(delParanm); |
| | | //添加新的code |
| | | BusParameterSettings newParam=new BusParameterSettings(); |
| | | newParam.setParamCode(paramCode); |
| | | newParam.setCompanyId(user.getCompanyId()); |
| | | newParam.setParamValue(busParameterSetting.getParamValue()); |
| | | newParam.setParamValue1(busParameterSetting.getParamValue1()); |
| | | newParam.setParamValue2(busParameterSetting.getParamValue2()); |
| | | busParameterSettingsDao.insert(newParam); |
| | | }else{ |
| | | return AjaxResult.buildFailInstance("code不能为空"); |
| | | } |
| | | } |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, "更新成功"); |
| | | return result; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.matrix.system.fenxiao.dao.ShopRevenueFlowDao; |
| | | import com.matrix.system.fenxiao.entity.ShopRevenueFlow; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @description 收益流水 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | @Service |
| | | public class ShopRevenueFlowService extends ServiceImpl<ShopRevenueFlowDao, ShopRevenueFlow>{ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.matrix.system.fenxiao.dao.ShopSalemanSettlementDao; |
| | | import com.matrix.system.fenxiao.entity.ShopSalemanSettlement; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @description 订单结算记录 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | @Service |
| | | public class ShopSalemanSettlementService extends ServiceImpl<ShopSalemanSettlementDao, ShopSalemanSettlement>{ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.service; |
| | | |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | 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.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.VerificationResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao; |
| | | import com.matrix.system.fenxiao.dto.*; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanApply; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanGrade; |
| | | import com.matrix.system.fenxiao.vo.*; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.hive.service.SysVipInfoService; |
| | | import com.matrix.system.shopXcx.dao.ShopOrderV2Dao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 推广员申请记录 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | @Service |
| | | public class ShopSalesmanApplyService extends ServiceImpl<ShopSalesmanApplyDao, ShopSalesmanApply>{ |
| | | |
| | | |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | @Autowired |
| | | ShopSalesmanApplyDao shopSalesmanApplyDao; |
| | | |
| | | @Autowired |
| | | ShopSalesmanGradeDao shopSalesmanGradeDao; |
| | | |
| | | @Autowired |
| | | SysVipInfoDao sysVipInfoDao; |
| | | |
| | | @Autowired |
| | | SysVipInfoService sysVipInfoService; |
| | | |
| | | @Autowired |
| | | ShopOrderV2Dao shopOrderV2Dao; |
| | | |
| | | /** |
| | | * 申请成为推广员 |
| | | * @param userId |
| | | * @param invitationId |
| | | * @return |
| | | */ |
| | | public ShopSalesmanApply applyToBeAnSalesman(Long userId,Long gradeId,Long invitationId,int applyWay) { |
| | | |
| | | SysVipInfo loginUser=sysVipInfoDao.selectById(userId); |
| | | //验证申请条件 |
| | | VerificationResult verificationResult = isAbleToBeAnSalesman(userId,loginUser.getCompanyId()); |
| | | if(verificationResult.isJudgeResult()){ |
| | | //校验审核状态,和是否重复发起 |
| | | QueryWrapper<ShopSalesmanApply> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("user_id",loginUser.getId()); |
| | | queryWrapper.in("apply_status",Arrays.asList("1,2".split(","))); |
| | | ShopSalesmanApply checkApply = shopSalesmanApplyDao.selectOne(queryWrapper); |
| | | if(checkApply==null|| |
| | | checkApply.getApplyStatus()==ShopSalesmanApply.APPLY_STATUS_WTG){ |
| | | |
| | | ShopSalesmanApply shopSalesmanApply=new ShopSalesmanApply(); |
| | | shopSalesmanApply.setUserId(userId); |
| | | |
| | | shopSalesmanApply.setCreateBy(MatrixConstance.SYSTEM_USER); |
| | | shopSalesmanApply.setApplyWay(ShopSalesmanApply.APPLY_WAY_SELF); |
| | | |
| | | shopSalesmanApply.setCompanyId(loginUser.getCompanyId()); |
| | | shopSalesmanApply.setUpdateBy(MatrixConstance.SYSTEM_USER); |
| | | Date date = new Date(); |
| | | shopSalesmanApply.setCreateTime(date); |
| | | shopSalesmanApply.setUpdateTime(date); |
| | | |
| | | if(invitationId!=null){ |
| | | shopSalesmanApply.setParentUserId(invitationId); |
| | | }else if(loginUser.getRecommendId()!=null){ |
| | | //如果曾经是被邀请进来的则自动绑定为之前邀请人的下级 |
| | | shopSalesmanApply.setParentUserId(loginUser.getRecommendId()); |
| | | } |
| | | if(gradeId!=null){ |
| | | shopSalesmanApply.setGradeId(gradeId); |
| | | }else{ |
| | | //获取初始等级ID(公司id,是否为初始等级) |
| | | QueryWrapper<ShopSalesmanGrade> queryWrapperOrepool = new QueryWrapper<>(); |
| | | queryWrapperOrepool.eq("company_id", loginUser.getCompanyId()); |
| | | queryWrapperOrepool.eq("is_default", 1); |
| | | ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectOne(queryWrapperOrepool); |
| | | shopSalesmanApply.setGradeId(shopSalesmanGrade.getId()); |
| | | } |
| | | shopSalesmanApply.setApplyWay(applyWay); |
| | | |
| | | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_AUDIT_METHOD, loginUser.getCompanyId()); |
| | | if(busParameterSettings!=null |
| | | &&busParameterSettings.getParamValue().equals("1")){ |
| | | //自动审核 |
| | | //初始等级ID(公司id,是否为初始等级) |
| | | QueryWrapper<ShopSalesmanGrade> queryWrapperOrepool = new QueryWrapper<>(); |
| | | queryWrapperOrepool.eq("company_id", loginUser.getCompanyId()); |
| | | queryWrapperOrepool.eq("is_default", 1); |
| | | ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectOne(queryWrapperOrepool); |
| | | shopSalesmanApply.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_TG); |
| | | sysVipInfoService.setToBeAnSalesman(loginUser.getId(),invitationId,shopSalesmanGrade.getId()); |
| | | |
| | | }else{ |
| | | shopSalesmanApply.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_DSH); |
| | | } |
| | | shopSalesmanApplyDao.insert(shopSalesmanApply); |
| | | return shopSalesmanApply; |
| | | }else{ |
| | | throw new GlobleException("不能重复申请"); |
| | | } |
| | | }else{ |
| | | throw new GlobleException(verificationResult.getMsg()); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 判断是否满足申请成为分销员的条件 |
| | | */ |
| | | public VerificationResult isAbleToBeAnSalesman(Long userId,Long companyId) { |
| | | |
| | | VerificationResult verificationResult=null; |
| | | |
| | | //申请模式 |
| | | BusParameterSettings applyWay = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_APPLY_WAY, companyId); |
| | | if (FenxiaoSettingConstant.FX_APPLY_WAY_AUTO.equals(applyWay.getParamValue())) { |
| | | verificationResult= VerificationResult.buildVerificationResult(true); |
| | | }else{ |
| | | //申请条件 |
| | | BusParameterSettings applyCondition = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_APPLY_CONDITION, companyId); |
| | | switch (applyCondition.getParamValue()){ |
| | | case FenxiaoSettingConstant.FX_APPLY_CONDITION_WTJ: |
| | | verificationResult= VerificationResult.buildVerificationResult(true); |
| | | break; |
| | | case FenxiaoSettingConstant.FX_APPLY_CONDITION_XFZDCP: |
| | | int buyZdcpCount= shopOrderV2Dao.countBuyZdcp(userId,applyCondition.getParamValue1()); |
| | | if(buyZdcpCount>0){ |
| | | verificationResult= VerificationResult.buildVerificationResult(true); |
| | | }else{ |
| | | verificationResult= VerificationResult.buildVerificationResult(false,"不符合申请条件,请消费指定产品后再申请!"); |
| | | } |
| | | break; |
| | | case FenxiaoSettingConstant.FX_APPLY_CONDITION_XFRYCP: |
| | | //判断用户是否有确认收货的产品 |
| | | int receivedOrderCount= shopOrderV2Dao.selectReceivedOrderCount(userId); |
| | | if(receivedOrderCount>0){ |
| | | verificationResult= VerificationResult.buildVerificationResult(true); |
| | | }else{ |
| | | verificationResult= VerificationResult.buildVerificationResult(false,"不符合申请条件,请消费任意产品后再申请!"); |
| | | } |
| | | break; |
| | | case FenxiaoSettingConstant.FX_APPLY_CONDITION_XCZDJE: |
| | | Double zdje=Double.parseDouble(applyCondition.getParamValue2()); |
| | | Double yxfje=shopOrderV2Dao.countOrderAmount(userId); |
| | | if(zdje<yxfje){ |
| | | verificationResult=VerificationResult.buildVerificationResult(true); |
| | | }else{ |
| | | verificationResult= VerificationResult.buildVerificationResult(false,"不符合申请条件,请消费满"+zdje+"元后再申请!"); |
| | | } |
| | | break; |
| | | default: |
| | | verificationResult= VerificationResult.buildVerificationResult(true); |
| | | } |
| | | } |
| | | return verificationResult; |
| | | } |
| | | |
| | | |
| | | public IPage<ShopSalesmanApplyVo> findShopSalesmanApplyList(Page<ShopSalesmanApplyVo> page, ShopSalesmanApplyDto shopSalesmanApplyDto) { |
| | | return shopSalesmanApplyDao.findShopSalesmanApplyList(page,shopSalesmanApplyDto); |
| | | } |
| | | |
| | | public IPage<ShopSalesmanAppliingVo> findShopSalesmanAppliingList(Page<ShopSalesmanAppliingVo> page, |
| | | ShopSalesmanAppliingDto shopSalesmanAppliingDto) { |
| | | return shopSalesmanApplyDao.findShopSalesmanAppliingList(page,shopSalesmanAppliingDto); |
| | | } |
| | | |
| | | public IPage<ShopSalesmanAppliingVo> selectBizUserApplyList(Page<ShopSalesmanAppliingVo> page, ShopSalesmanAppliingDto shopSalesmanAppliingDto) { |
| | | return shopSalesmanApplyDao.selectBizUserApplyList(page,shopSalesmanAppliingDto); |
| | | } |
| | | |
| | | public List<ShopSalesmanGradeVo> getShopSalesmanGradeVo(Long companyId) { |
| | | return shopSalesmanGradeDao.getShopSalesmanGradeVo(companyId); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void addSaleManApply(Long userId,Long gradeId) { |
| | | SysVipInfo user = sysVipInfoDao.selectById(userId); |
| | | applyToBeAnSalesman(user.getId(),gradeId, null,ShopSalesmanApply.APPLY_WAY_HAND_ADD); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void examineSaleManApply(ShopSalesmanApply shopSalesmanApply, Integer applyState) { |
| | | Long userId = shopSalesmanApply.getUserId(); |
| | | Long parentUserId = shopSalesmanApply.getParentUserId(); |
| | | SysVipInfo sysVipInfo = sysVipInfoDao.selectById(userId); |
| | | //修改审核记录 |
| | | if(ShopSalesmanApply.APPLY_STATUS_TG == applyState) { |
| | | shopSalesmanApply.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_TG); |
| | | sysVipInfo.setIsSales(SysVipInfo.IS_SALES); |
| | | }else { |
| | | shopSalesmanApply.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_WTG); |
| | | sysVipInfo.setIsSales(SysVipInfo.NOT_SALES); |
| | | } |
| | | shopSalesmanApplyDao.updateById(shopSalesmanApply); |
| | | //修改USER的状态 |
| | | sysVipInfo.setRecommendId(parentUserId); |
| | | sysVipInfo.setBindingParentTime(new Date()); |
| | | sysVipInfo.setSalesmanGrade(shopSalesmanApply.getGradeId()); |
| | | sysVipInfoDao.update(sysVipInfo); |
| | | } |
| | | |
| | | public IPage<ShopSalesmanApplyVo> findShopSalesmanDetail(Page<ShopSalesmanApplyVo> page, |
| | | ShopSalesmanDetailDto shopSalesmanDetailDto) { |
| | | // TODO Auto-generated method stub |
| | | return null; |
| | | } |
| | | |
| | | public SalesmanBasicDetailVo selectShopSalesmanDetailByOpenId(Long userId, long applyId) { |
| | | //获取个人信息 |
| | | SysVipInfo sysVipInfo = sysVipInfoDao.selectById(userId); |
| | | Long companyId = sysVipInfo.getCompanyId(); |
| | | return shopSalesmanApplyDao.selectShopSalesmanDetailByOpenId(sysVipInfo.getId(),companyId,applyId); |
| | | } |
| | | |
| | | public IPage<ShopCustomDetailVo> findCustomDetail(Page<ShopCustomDetailVo> page,LoadParamSettingDto loadParamSettingDto) { |
| | | return shopSalesmanApplyDao.findCustomDetail(page,loadParamSettingDto); |
| | | } |
| | | |
| | | public IPage<ShopCustomDetailVo> findCustomLow(Page<ShopCustomDetailVo> pageLow, |
| | | ShopSalesmanDetailDto shopSalesmanDetailDto) { |
| | | return shopSalesmanApplyDao.findCustomLow(pageLow,shopSalesmanDetailDto); |
| | | } |
| | | |
| | | public IPage<ShopOrderDetailVo> findShopOrderDetail(Page<ShopOrderDetailVo> pageOrder, |
| | | ShopSalesmanDetailDto shopSalesmanDetailDto) { |
| | | return shopSalesmanApplyDao.findShopOrderDetail(pageOrder,shopSalesmanDetailDto); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult changeSaleManGrade(ChangeSaleManGradeDto changeSaleManGradeDto) { |
| | | |
| | | SysVipInfo vipInfo = sysVipInfoDao.selectById(changeSaleManGradeDto.getUserId()); |
| | | |
| | | //获取对应的公司的等级 |
| | | QueryWrapper<ShopSalesmanGrade> queryWrapperOrepool = new QueryWrapper<>(); |
| | | queryWrapperOrepool.eq("is_default", 1); |
| | | queryWrapperOrepool.eq("company_id", vipInfo.getCompanyId()); |
| | | ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectOne(queryWrapperOrepool); |
| | | |
| | | //不是分销员不允许修改 |
| | | Integer isSales = vipInfo.getIsSales(); |
| | | if(SysVipInfo.IS_SALES != isSales) { |
| | | return AjaxResult.buildFailInstance("当前用户未通过审核,不允许修改"); |
| | | } |
| | | |
| | | //修改申请记录的等级 |
| | | QueryWrapper<ShopSalesmanApply> queryShopSalesmanApply = new QueryWrapper<>(); |
| | | queryShopSalesmanApply.eq("apply_status", 2); |
| | | queryShopSalesmanApply.eq("user_id", vipInfo.getId()); |
| | | queryShopSalesmanApply.eq("company_id", vipInfo.getCompanyId()); |
| | | ShopSalesmanApply shopSalesmanApply = shopSalesmanApplyDao.selectOne(queryShopSalesmanApply); |
| | | Long gradeId = changeSaleManGradeDto.getGradeId(); |
| | | if(ObjectUtil.isEmpty(gradeId)) { |
| | | vipInfo.setSalesmanGrade(shopSalesmanGrade.getId()); |
| | | shopSalesmanApply.setGradeId(shopSalesmanGrade.getId()); |
| | | }else { |
| | | vipInfo.setSalesmanGrade(gradeId); |
| | | shopSalesmanApply.setGradeId(gradeId); |
| | | } |
| | | sysVipInfoDao.update(vipInfo); |
| | | shopSalesmanApplyDao.updateById(shopSalesmanApply); |
| | | |
| | | return AjaxResult.buildSuccessInstance("修改等级成功"); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult unbundlingSaleMan(UnbundlingSaleManDto unbundlingSaleManDto) { |
| | | |
| | | Long userId = unbundlingSaleManDto.getUserId(); |
| | | sysVipInfoDao.unbundlingSaleMan(userId); |
| | | return AjaxResult.buildSuccessInstance("解绑成功"); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult delSaleManGradeApply(DelSaleManGradeApplyDto delSaleManGradeApplyDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(delSaleManGradeApplyDto); |
| | | |
| | | |
| | | //将biz_user的is_sale设置成否 |
| | | SysVipInfo vipInfo = sysVipInfoDao.selectById(delSaleManGradeApplyDto.getUserId()); |
| | | if(ObjectUtil.isEmpty(vipInfo)) { |
| | | return AjaxResult.buildFailInstance("当前用户已不存在"); |
| | | } |
| | | vipInfo.setIsSales(SysVipInfo.NOT_SALES); |
| | | sysVipInfoDao.update(vipInfo); |
| | | //将记录设置成系统取消 |
| | | ShopSalesmanApply selectById = shopSalesmanApplyDao.selectById(delSaleManGradeApplyDto.getApplyId()); |
| | | selectById.setApplyStatus(ShopSalesmanApply.APPLY_STATUS_XTQX); |
| | | shopSalesmanApplyDao.updateById(selectById); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | |
| | | public IPage<FyfaManageVo> findFyfaManageList(Page<FyfaManageVo> page, FyfaManageDto fyfaManageDto) { |
| | | return shopSalesmanGradeDao.findFyfaManageList(page,fyfaManageDto); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public void addFyfa(SysUsers user) { |
| | | ShopSalesmanGrade shopSalesmanGrade = new ShopSalesmanGrade(); |
| | | shopSalesmanGrade.setIsDefault(2); |
| | | shopSalesmanGrade.setCreateBy(user.getSuName()); |
| | | shopSalesmanGrade.setUpdateBy(user.getSuName()); |
| | | shopSalesmanGrade.setCreateTime(new Date()); |
| | | shopSalesmanGrade.setUpdateTime(new Date()); |
| | | shopSalesmanGrade.setCompanyId(user.getCompanyId()); |
| | | shopSalesmanGradeDao.insert(shopSalesmanGrade); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult delFyfaApply(DelFyfaApplyDto delFyfaApplyDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(delFyfaApplyDto); |
| | | Long gradeId = delFyfaApplyDto.getGradeId(); |
| | | ShopSalesmanGrade selectById = shopSalesmanGradeDao.selectById(gradeId); |
| | | if(ObjectUtil.isEmpty(selectById)) { |
| | | return AjaxResult.buildFailInstance("当前行数据不存在,请刷新页面"); |
| | | } |
| | | shopSalesmanGradeDao.deleteById(gradeId); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult updateFyfa(UpdateFyfaDto updateFyfaDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(updateFyfaDto); |
| | | ShopSalesmanGrade selectById = shopSalesmanGradeDao.selectById(updateFyfaDto.getId()); |
| | | String name = updateFyfaDto.getName(); |
| | | if(StrUtil.isEmpty(name)) { |
| | | return AjaxResult.buildFailInstance("请输入方案名称"); |
| | | } |
| | | Double selfCommission = updateFyfaDto.getSelfCommission(); |
| | | if(ObjectUtil.isEmpty(selfCommission)) { |
| | | return AjaxResult.buildFailInstance("请输入正确的自购返佣"); |
| | | } |
| | | Double sealesCommission = updateFyfaDto.getSealesCommission(); |
| | | if(ObjectUtil.isEmpty(sealesCommission)) { |
| | | return AjaxResult.buildFailInstance("请输入正确的推广提成"); |
| | | } |
| | | Double invitationCommission = updateFyfaDto.getInvitationCommission(); |
| | | if(ObjectUtil.isEmpty(invitationCommission)) { |
| | | return AjaxResult.buildFailInstance("请输入正确的邀请提成"); |
| | | } |
| | | if(ObjectUtil.isEmpty(selectById)) { |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | ShopSalesmanGrade shopSalesmanGrade = new ShopSalesmanGrade(); |
| | | shopSalesmanGrade.setCompanyId(updateFyfaDto.getCompanyId()); |
| | | shopSalesmanGrade.setName(updateFyfaDto.getName()); |
| | | shopSalesmanGrade.setSelfCommission(selfCommission); |
| | | shopSalesmanGrade.setSealesCommission(sealesCommission); |
| | | shopSalesmanGrade.setInvitationCommission(invitationCommission); |
| | | shopSalesmanGrade.setGradeCondition(updateFyfaDto.getGradeCondition()); |
| | | shopSalesmanGrade.setIsDefault(2); |
| | | shopSalesmanGrade.setCreateBy(user.getSuName()); |
| | | shopSalesmanGrade.setUpdateBy(user.getSuName()); |
| | | shopSalesmanGrade.setCreateTime(new Date()); |
| | | shopSalesmanGrade.setUpdateTime(new Date()); |
| | | shopSalesmanGrade.setCompanyId(user.getCompanyId()); |
| | | shopSalesmanGradeDao.insert(shopSalesmanGrade); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | selectById.setCompanyId(updateFyfaDto.getCompanyId()); |
| | | selectById.setName(updateFyfaDto.getName()); |
| | | selectById.setSelfCommission(selfCommission); |
| | | selectById.setSealesCommission(sealesCommission); |
| | | selectById.setInvitationCommission(invitationCommission); |
| | | selectById.setGradeCondition(updateFyfaDto.getGradeCondition()); |
| | | shopSalesmanGradeDao.updateById(selectById); |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult updateTgjh(UpdateTgjhDto updateTgjhDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(updateTgjhDto); |
| | | //获取推广计划的Param |
| | | Long companyId = updateTgjhDto.getCompanyId(); |
| | | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_TG_PLAN, companyId); |
| | | busParameterSettings.setParamValue3(updateTgjhDto.getTgfa()); |
| | | busParameterSettingsDao.updateByModel(busParameterSettings); |
| | | return AjaxResult.buildSuccessInstance("保存成功"); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult updateTgtp(UpdateTgtpDto updateTgtpDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(updateTgtpDto); |
| | | //获取推广计划的Param |
| | | Long companyId = updateTgtpDto.getCompanyId(); |
| | | BusParameterSettings busParameterSettings = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_TG_POSTER, companyId); |
| | | busParameterSettings.setParamValue(updateTgtpDto.getImageUrl()); |
| | | busParameterSettingsDao.updateByModel(busParameterSettings); |
| | | return AjaxResult.buildSuccessInstance("保存成功"); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanGrade; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @description 推广员等级 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | @Service |
| | | public class ShopSalesmanGradeService extends ServiceImpl<ShopSalesmanGradeDao, ShopSalesmanGrade>{ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanOrderItemDao; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanOrderItem; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * @description 分销单明细 |
| | | * @author yourName |
| | | * @date 2021-03-12 13:17 |
| | | */ |
| | | @Service |
| | | public class ShopSalesmanOrderItemService extends ServiceImpl<ShopSalesmanOrderItemDao, ShopSalesmanOrderItem>{ |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.service; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.ObjectUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | 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.matrix.system.fenxiao.vo.FenxiaoOrderListExportVo; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.fenxiao.dao.ShopRevenueFlowDao; |
| | | import com.matrix.system.fenxiao.dao.ShopSalemanSettlementDao; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanOrderDao; |
| | | import com.matrix.system.fenxiao.dto.LoadFenxiaoOrderBasicDto; |
| | | import com.matrix.system.fenxiao.dto.LoadFenxiaoOrderListDto; |
| | | import com.matrix.system.fenxiao.dto.LoadSetOrderListDtoDto; |
| | | import com.matrix.system.fenxiao.dto.UpdateSetOrderDoneDto; |
| | | import com.matrix.system.fenxiao.entity.ShopRevenueFlow; |
| | | import com.matrix.system.fenxiao.entity.ShopSalemanSettlement; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanOrder; |
| | | import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderBasicVo; |
| | | import com.matrix.system.fenxiao.vo.LoadFenxiaoOrderListVo; |
| | | import com.matrix.system.fenxiao.vo.LoadSetOrderListDtoVo; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.service.CodeService; |
| | | import com.matrix.system.shopXcx.bean.ShopOrder; |
| | | import com.matrix.system.shopXcx.dao.ShopOrderDao; |
| | | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 分销订单 |
| | | * @author jyy |
| | | * @date 2021-03-10 15:22 |
| | | */ |
| | | @Service |
| | | public class ShopSalesmanOrderService extends ServiceImpl<ShopSalesmanOrderDao, ShopSalesmanOrder>{ |
| | | |
| | | @Autowired |
| | | ShopSalesmanOrderDao shopSalesmanOrderDao; |
| | | @Autowired |
| | | CodeService codeService; |
| | | @Autowired |
| | | ShopSalemanSettlementDao shopSalemanSettlementDao; |
| | | @Autowired |
| | | ShopRevenueFlowDao shopRevenueFlowDao; |
| | | @Autowired |
| | | ShopOrderDao shopOrderDao; |
| | | @Autowired |
| | | SysVipInfoDao sysVipInfoDao; |
| | | |
| | | public AjaxResult loadFenxiaoOrderBasic(LoadFenxiaoOrderBasicDto loadFenxiaoOrderBasicDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(loadFenxiaoOrderBasicDto); |
| | | AjaxResult result= AjaxResult.buildSuccessInstance("查询成功"); |
| | | //根据OPENID查询基础信息 |
| | | Long companyId = loadFenxiaoOrderBasicDto.getCompanyId(); |
| | | LoadFenxiaoOrderBasicVo loadFenxiaoOrderBasicVo = shopSalesmanOrderDao.selectFenxiaoOrderBasicByCompanyId(companyId); |
| | | result.putInMap("basicdetail", loadFenxiaoOrderBasicVo); |
| | | return result; |
| | | } |
| | | |
| | | public AjaxResult loadFenxiaoOrderList(LoadFenxiaoOrderListDto loadFenxiaoOrderListDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(loadFenxiaoOrderListDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(loadFenxiaoOrderListDto.getSort())){ |
| | | loadFenxiaoOrderListDto.setSort("create_time"); |
| | | loadFenxiaoOrderListDto.setOrder("desc"); |
| | | } |
| | | Page<LoadFenxiaoOrderListVo> page = new Page(loadFenxiaoOrderListDto.getPageNum(), loadFenxiaoOrderListDto.getPageSize()); |
| | | IPage<LoadFenxiaoOrderListVo> loadFenxiaoOrderListVos = shopSalesmanOrderDao.findFenxiaoOrderList(page,loadFenxiaoOrderListDto); |
| | | return AjaxResult.buildSuccessInstance(loadFenxiaoOrderListVos.getRecords(),loadFenxiaoOrderListVos.getTotal()); |
| | | } |
| | | |
| | | public AjaxResult loadSetOrderList(LoadSetOrderListDtoDto loadSetOrderListDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(loadSetOrderListDto); |
| | | //排序 |
| | | if(StringUtils.isBlank(loadSetOrderListDto.getSort())){ |
| | | loadSetOrderListDto.setSort("create_time"); |
| | | loadSetOrderListDto.setOrder("desc"); |
| | | } |
| | | Page<LoadSetOrderListDtoVo> page = new Page(loadSetOrderListDto.getPageNum(), loadSetOrderListDto.getPageSize()); |
| | | IPage<LoadSetOrderListDtoVo> loadFenxiaoOrderListVos = shopSalesmanOrderDao.findSetOrderList(page,loadSetOrderListDto); |
| | | return AjaxResult.buildSuccessInstance(loadFenxiaoOrderListVos.getRecords(),loadFenxiaoOrderListVos.getTotal()); |
| | | } |
| | | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult updateSetOrderDone(UpdateSetOrderDoneDto updateSetOrderDoneDto) { |
| | | //设置用户公司ID |
| | | QueryUtil.setQueryLimitCom(updateSetOrderDoneDto); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | Long companyId = updateSetOrderDoneDto.getCompanyId(); |
| | | Integer setType = updateSetOrderDoneDto.getSetType(); |
| | | |
| | | String orderIds = updateSetOrderDoneDto.getOrderIds(); |
| | | if(StrUtil.isNotEmpty(orderIds)){ |
| | | List<String> idsStringList = Arrays.asList(orderIds.split(",")); |
| | | if(CollUtil.isEmpty(idsStringList)) { |
| | | return AjaxResult.buildFailInstance("请至少选择一条记录"); |
| | | } |
| | | //产生订单结算记录 |
| | | ShopSalemanSettlement shopSalemanSettlement = new ShopSalemanSettlement(); |
| | | shopSalemanSettlement.setCompanyId(companyId); |
| | | shopSalemanSettlement.setCreateBy(MatrixConstance.SYSTEM_USER); |
| | | shopSalemanSettlement.setUpdateBy(MatrixConstance.SYSTEM_USER); |
| | | shopSalemanSettlement.setCreateTime(new Date()); |
| | | shopSalemanSettlement.setUpdateTime(new Date()); |
| | | shopSalemanSettlement.setOrderNo(codeService.getCodeByTyle(ShopSalemanSettlement.ORDERNO_START)); |
| | | shopSalemanSettlement.setSettlementWay(setType); |
| | | shopSalemanSettlement.setManCount(updateSetOrderDoneDto.getManCount()); |
| | | shopSalemanSettlement.setOrderCount(updateSetOrderDoneDto.getOrderCount()); |
| | | shopSalemanSettlement.setUserId(user.getSuId().intValue()); |
| | | shopSalemanSettlement.setAmount(updateSetOrderDoneDto.getAmount()); |
| | | shopSalemanSettlement.setRemark(updateSetOrderDoneDto.getRemark()); |
| | | shopSalemanSettlement.setCompanyId(companyId); |
| | | shopSalemanSettlementDao.insert(shopSalemanSettlement); |
| | | |
| | | for(String idString : idsStringList) { |
| | | long id = Long.parseLong(idString); |
| | | //更新分销订单 |
| | | ShopSalesmanOrder shopSalesmanOrder = shopSalesmanOrderDao.selectById(id); |
| | | if(!ShopSalesmanOrder.STATUS_DJS.equals(shopSalesmanOrder.getOrderStatus())) { |
| | | return AjaxResult.buildFailInstance("选中记录中存在【已结算】的记录"); |
| | | } |
| | | //判断原始订单的状态【4=待评价, 5=已评价】才能结算 |
| | | ShopOrder shopOrder = shopOrderDao.selectById(shopSalesmanOrder.getOrderId().intValue()); |
| | | if(ShopOrder.ORDER_STATUS_WAIT_REMARK != shopOrder.getOrderStatus() && |
| | | ShopOrder.ORDER_STATUS_ALREADY_REMARK != shopOrder.getOrderStatus()) { |
| | | return AjaxResult.buildFailInstance("未收货订单不允许结算"); |
| | | } |
| | | shopSalesmanOrder.setOrderStatus(ShopSalesmanOrder.STATUS_YJS); |
| | | shopSalesmanOrder.setSettlementId(shopSalemanSettlement.getId()); |
| | | shopSalesmanOrderDao.updateById(shopSalesmanOrder); |
| | | //记录流水 |
| | | ShopRevenueFlow salesRevenueFlow=new ShopRevenueFlow(); |
| | | salesRevenueFlow.setCompanyId(companyId); |
| | | salesRevenueFlow.setCreateBy(MatrixConstance.SYSTEM_USER); |
| | | salesRevenueFlow.setUpdateBy(MatrixConstance.SYSTEM_USER); |
| | | salesRevenueFlow.setCreateTime(new Date()); |
| | | salesRevenueFlow.setUpdateTime(new Date()); |
| | | salesRevenueFlow.setAmount(shopSalesmanOrder.getAmount()); |
| | | salesRevenueFlow.setUserId(shopSalesmanOrder.getSalesUserId()); |
| | | if(ShopSalesmanOrder.REVENUE_TYPE_SALES.equals(shopSalesmanOrder.getRevenueType())) { |
| | | salesRevenueFlow.setRevenueContent(ShopRevenueFlow.TYPE_TGSY); |
| | | } |
| | | if(ShopSalesmanOrder.REVENUE_TYPE_INVITATION.equals(shopSalesmanOrder.getRevenueType())) { |
| | | salesRevenueFlow.setRevenueContent(ShopRevenueFlow.TYPE_YQSY); |
| | | } |
| | | salesRevenueFlow.setBusinessId(shopSalesmanOrder.getId()); |
| | | shopRevenueFlowDao.insert(salesRevenueFlow); |
| | | //选择微信余额支付,更新用户的金额 |
| | | if(ShopSalemanSettlement.SETTLEMENTWAY_YEJS == updateSetOrderDoneDto.getSetType()) { |
| | | SysVipInfo vipInfo = sysVipInfoDao.selectById(shopSalesmanOrder.getSalesUserId()); |
| | | if(ObjectUtil.isEmpty(vipInfo)) { |
| | | return AjaxResult.buildFailInstance("收益人信息不存在"); |
| | | } |
| | | Double withdrawalCash = vipInfo.getWithdrawalCash(); |
| | | Double amount = shopSalesmanOrder.getAmount(); |
| | | withdrawalCash = (withdrawalCash == null?0:withdrawalCash)+(amount== null?0:amount); |
| | | vipInfo.setWithdrawalCash(withdrawalCash); |
| | | sysVipInfoDao.update(vipInfo); |
| | | } |
| | | } |
| | | } |
| | | return AjaxResult.buildSuccessInstance("操作成功"); |
| | | } |
| | | |
| | | |
| | | public List<FenxiaoOrderListExportVo> findFenxiaoOrderList(LoadFenxiaoOrderListDto loadFenxiaoOrderListDto) { |
| | | QueryUtil.setQueryLimitCom(loadFenxiaoOrderListDto); |
| | | return shopSalesmanOrderDao.selectFenxiaoOrderListNoPage(loadFenxiaoOrderListDto); |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.vo; |
| | | |
| | | import com.matrix.core.anotations.Extend; |
| | | |
| | | public class FenXiaoSettingVo { |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | private Long paramId; |
| | | /** |
| | | * 参数名称 |
| | | */ |
| | | private String paramName; |
| | | /** |
| | | * 参数编码 |
| | | */ |
| | | private String paramCode; |
| | | |
| | | /** |
| | | * switch按钮 |
| | | */ |
| | | private Boolean paramSwitch; |
| | | |
| | | |
| | | /** |
| | | * 参数值 |
| | | */ |
| | | private String paramValue; |
| | | |
| | | |
| | | /** |
| | | * 值1 |
| | | */ |
| | | private String paramValue1; |
| | | |
| | | |
| | | /** |
| | | * 值2 |
| | | */ |
| | | private String paramValue2; |
| | | |
| | | |
| | | /** |
| | | * 值3 |
| | | */ |
| | | private String paramValue3; |
| | | |
| | | private Long companyId; |
| | | |
| | | private Long shopId; |
| | | |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Long getParamId() { |
| | | return paramId; |
| | | } |
| | | |
| | | public void setParamId(Long paramId) { |
| | | this.paramId = paramId; |
| | | } |
| | | |
| | | |
| | | public String getParamCode() { |
| | | return paramCode; |
| | | } |
| | | |
| | | public void setParamCode(String paramCode) { |
| | | this.paramCode = paramCode; |
| | | } |
| | | |
| | | |
| | | public String getParamValue() { |
| | | return paramValue; |
| | | } |
| | | |
| | | public void setParamValue(String paramValue) { |
| | | this.paramValue = paramValue; |
| | | } |
| | | |
| | | |
| | | public String getParamValue1() { |
| | | return paramValue1; |
| | | } |
| | | |
| | | public void setParamValue1(String paramValue1) { |
| | | this.paramValue1 = paramValue1; |
| | | } |
| | | |
| | | |
| | | public String getParamValue2() { |
| | | return paramValue2; |
| | | } |
| | | |
| | | public void setParamValue2(String paramValue2) { |
| | | this.paramValue2 = paramValue2; |
| | | } |
| | | |
| | | |
| | | public String getParamValue3() { |
| | | return paramValue3; |
| | | } |
| | | |
| | | public void setParamValue3(String paramValue3) { |
| | | this.paramValue3 = paramValue3; |
| | | } |
| | | |
| | | public String getParamName() { |
| | | return paramName; |
| | | } |
| | | |
| | | public void setParamName(String paramName) { |
| | | this.paramName = paramName; |
| | | } |
| | | |
| | | public Boolean getParamSwitch() { |
| | | return paramSwitch; |
| | | } |
| | | |
| | | public void setParamSwitch(Boolean paramSwitch) { |
| | | this.paramSwitch = paramSwitch; |
| | | } |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class FenxiaoOrderListExportVo { |
| | | |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNo; |
| | | @ApiModelProperty(value = "订单状态") |
| | | private String orderState; |
| | | @ApiModelProperty(value = "实付金额(元)") |
| | | private BigDecimal actualBalance; |
| | | @ApiModelProperty(value = "下单门店") |
| | | private String address; |
| | | @ApiModelProperty(value = "客户") |
| | | private String custom; |
| | | @ApiModelProperty(value = "客户openId") |
| | | private String customUserId; |
| | | @ApiModelProperty(value = "推广员") |
| | | private String parentSale; |
| | | @ApiModelProperty(value = "收益类型") |
| | | private String profitType; |
| | | @ApiModelProperty(value = "收益金额") |
| | | private BigDecimal profitBalance; |
| | | @ApiModelProperty(value = "结算状态") |
| | | private String settleType; |
| | | @ApiModelProperty(value = "结算编号") |
| | | private String settleNo; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "结算时间") |
| | | private Date settleTime; |
| | | @ApiModelProperty(value = "结算人") |
| | | private String settler; |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "FyfaManageVo", description = "分佣方案信息返回类") |
| | | public class FyfaManageVo { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "方案名称") |
| | | private String name; |
| | | |
| | | @ApiModelProperty(value = "自购返佣%") |
| | | private Double selfCommission; |
| | | |
| | | @ApiModelProperty(value = "推广提成%") |
| | | private Double sealesCommission; |
| | | |
| | | @ApiModelProperty(value = "邀请提成 %") |
| | | private Double invitationCommission; |
| | | |
| | | @ApiModelProperty(value = "等级条件(推广金额)") |
| | | private Double gradeCondition; |
| | | |
| | | @ApiModelProperty(value = "默认等级1是,2不是") |
| | | private Integer isDefault; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LoadFenxiaoOrderBasicVo", description = "返回类") |
| | | public class LoadFenxiaoOrderBasicVo { |
| | | |
| | | @ApiModelProperty(value = "待计算金额") |
| | | private BigDecimal balance; |
| | | @ApiModelProperty(value = "待结算人数") |
| | | private Integer waitNum; |
| | | @ApiModelProperty(value = "待结算订单") |
| | | private Integer waitOrderNum; |
| | | |
| | | @ApiModelProperty(value = "订单金额") |
| | | private BigDecimal orderBalance; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LoadFenxiaoOrderListVo", description = "返回类") |
| | | public class LoadFenxiaoOrderListVo { |
| | | |
| | | @ApiModelProperty(value = "订单ID") |
| | | private Long id; |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNo; |
| | | @ApiModelProperty(value = "订单状态") |
| | | private Integer orderState; |
| | | @ApiModelProperty(value = "实付金额(元)") |
| | | private BigDecimal actualBalance; |
| | | @ApiModelProperty(value = "下单门店") |
| | | private String address; |
| | | @ApiModelProperty(value = "客户") |
| | | private String custom; |
| | | @ApiModelProperty(value = "客户openId") |
| | | private String customUserId; |
| | | @ApiModelProperty(value = "推广员") |
| | | private String parentSale; |
| | | @ApiModelProperty(value = "收益类型") |
| | | private Integer profitType; |
| | | @ApiModelProperty(value = "收益金额") |
| | | private BigDecimal profitBalance; |
| | | @ApiModelProperty(value = "结算状态") |
| | | private Integer settleType; |
| | | @ApiModelProperty(value = "结算编号") |
| | | private String settleNo; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "结算时间") |
| | | private Date settleTime; |
| | | @ApiModelProperty(value = "结算人") |
| | | private String settler; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "LoadSetOrderListDtoVo", description = "返回类") |
| | | public class LoadSetOrderListDtoVo { |
| | | |
| | | @ApiModelProperty(value = "ID") |
| | | private Long id; |
| | | @ApiModelProperty(value = "结算编号") |
| | | private String orderNo; |
| | | @ApiModelProperty(value = "结算金额") |
| | | private BigDecimal actualBalance; |
| | | @ApiModelProperty(value = "结算订单数") |
| | | private String setNum; |
| | | @ApiModelProperty(value = "结算人数") |
| | | private String setManNum; |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | @ApiModelProperty(value = "结算时间") |
| | | private Date setTime; |
| | | @ApiModelProperty(value = "结算人") |
| | | private String setMan; |
| | | @ApiModelProperty(value = "结算方式") |
| | | private BigDecimal settlementWay; |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.vo; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "SalesmanBasicDetailVo", description = "分销员基本信息的返参") |
| | | public class SalesmanBasicDetailVo { |
| | | |
| | | @ApiModelProperty(value = "申请用户id") |
| | | private String userId; |
| | | @ApiModelProperty(value = "头像") |
| | | private String avatarUrl; |
| | | @ApiModelProperty(value = "分销员") |
| | | private String nickname; |
| | | @ApiModelProperty(value = "等级") |
| | | private String grade; |
| | | @ApiModelProperty(value = "手机号码") |
| | | private String phone; |
| | | @ApiModelProperty(value = "加入时间") |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone="GMT+8") |
| | | private Date createTime; |
| | | @ApiModelProperty(value = "邀请人") |
| | | private String parentUser; |
| | | @ApiModelProperty(value = "申请方式1、自主申请,2、自动添加,3上级邀请,4、手动添加(来源)") |
| | | private Integer applyWay; |
| | | @ApiModelProperty(value = "申请状态1、待审核,2通过,3未通过") |
| | | private Integer applyStatus; |
| | | |
| | | @ApiModelProperty(value = "绑定客户") |
| | | private Integer lowerLevelNum; |
| | | @ApiModelProperty(value = "邀请下级") |
| | | private Integer invitedNum; |
| | | @ApiModelProperty(value = "累计收益") |
| | | private BigDecimal totalRevenue; |
| | | @ApiModelProperty(value = "待结算") |
| | | private BigDecimal balance; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ShopCustomDetailVo", description = "分销员客户基本信息的返参") |
| | | public class ShopCustomDetailVo { |
| | | @ApiModelProperty(value = "申请用户id") |
| | | private String userId; |
| | | @ApiModelProperty(value = "头像") |
| | | private String avatarUrl; |
| | | @ApiModelProperty(value = "分销员") |
| | | private String nickname; |
| | | @ApiModelProperty(value = "绑定时间") |
| | | @JsonFormat(pattern="yyyy-MM-dd HH:mm",timezone="GMT+8") |
| | | private Date createTime; |
| | | @ApiModelProperty(value = "绑定方式1、自主申请,2、自动添加,3上级邀请,4、手动添加(来源)") |
| | | private Integer applyWay; |
| | | @ApiModelProperty(value = "待成交次数") |
| | | private Integer doneNum; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ShopOrderDetailVo", description = "订单收益信息返回类") |
| | | public class ShopOrderDetailVo { |
| | | |
| | | @ApiModelProperty(value = "订单id") |
| | | private Long orderId ; |
| | | |
| | | @ApiModelProperty(value = "订单编号") |
| | | private String orderNo; |
| | | |
| | | @ApiModelProperty(value = "实付金额") |
| | | private Double orderMoney; |
| | | |
| | | @ApiModelProperty(value = "订单状态") |
| | | private Integer orderState; |
| | | |
| | | @ApiModelProperty(value = "下单门店") |
| | | private String storeName; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "头像") |
| | | private String avatarUrl; |
| | | |
| | | @ApiModelProperty(value = "昵称") |
| | | private String nickName; |
| | | |
| | | @ApiModelProperty(value = " 收益类型1,推广收益,2邀请收益") |
| | | private Integer revenueType; |
| | | |
| | | @ApiModelProperty(value = "收益金额") |
| | | private Double amount; |
| | | |
| | | @ApiModelProperty(value = " 结算状态1,待结算,2,已结算,3已退款") |
| | | private Integer orderStatus; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.vo; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ShopSalesmanAppliingVo", description = "获取分销员待审核记录的返参") |
| | | public class ShopSalesmanAppliingVo { |
| | | |
| | | @ApiModelProperty(value = "申请用户id") |
| | | private String userId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "分销员") |
| | | private String nickname; |
| | | |
| | | @ApiModelProperty(value = "创建时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | @ApiModelProperty(value = "头像") |
| | | private String avatarUrl; |
| | | |
| | | @ApiModelProperty(value = "手机号码") |
| | | private String phone; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.vo; |
| | | |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class ShopSalesmanApplyVo { |
| | | |
| | | /** |
| | | * 审核状态-1、待审核 |
| | | */ |
| | | public static final int APPLY_STATUS_DSH = 1; |
| | | /** |
| | | * 审核状态-2通过 |
| | | */ |
| | | public static final int APPLY_STATUS_TG= 2; |
| | | /** |
| | | * 审核状态-3未通过 |
| | | */ |
| | | public static final int APPLY_STATUS_WTG = 3; |
| | | /** |
| | | * 审核状态-4系统删除 |
| | | */ |
| | | public static final int APPLY_STATUS_XTQX = 4; |
| | | |
| | | |
| | | /** |
| | | * 申请方式1、自主申请 |
| | | */ |
| | | public static final int APPLY_WAY_SELF=1; |
| | | /** |
| | | * 申请方式2、自动添加 |
| | | */ |
| | | public static final int APPLY_WAY_AUTO_ADD=2; |
| | | /** |
| | | * 申请方式3上级邀请 |
| | | */ |
| | | public static final int APPLY_WAY_INVITATION=3; |
| | | /** |
| | | * 申请方式 4、手动添加 |
| | | */ |
| | | public static final int APPLY_WAY_HAND_ADD=4; |
| | | |
| | | @ApiModelProperty(value = "申请记录ID") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "申请方式1、自主申请,2、自动添加,3上级邀请,4、手动添加(来源)") |
| | | private Integer applyWay; |
| | | |
| | | @ApiModelProperty(value = "申请用户id") |
| | | private String userId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "邀请用户ID") |
| | | private String parentUserId; |
| | | |
| | | |
| | | @ApiModelProperty(value = "申请状态1、待审核,2通过,3未通过") |
| | | private Integer applyStatus; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | private String remark; |
| | | |
| | | /** |
| | | * 公司ID |
| | | */ |
| | | @ApiModelProperty(hidden = true) |
| | | private Long companyId; |
| | | |
| | | @ApiModelProperty(value = "分销员") |
| | | private String nickname; |
| | | @ApiModelProperty(value = "头像") |
| | | private String avatarUrl; |
| | | @ApiModelProperty(value = "注册邀请人") |
| | | private String parentUser; |
| | | @ApiModelProperty(value = "当前上级") |
| | | private String parentUserNow; |
| | | @ApiModelProperty(value = "推广客户") |
| | | private Integer lowerLevelNum; |
| | | @ApiModelProperty(value = "邀请下级") |
| | | private Integer invitedNum; |
| | | |
| | | @ApiModelProperty(value = "累计收益") |
| | | private BigDecimal totalRevenue; |
| | | @ApiModelProperty(value = "待结算") |
| | | private BigDecimal balance; |
| | | @ApiModelProperty(value = "等级") |
| | | private String grade; |
| | | |
| | | @ApiModelProperty(value = "加入时间") |
| | | private Date createTime; |
| | | @ApiModelProperty(value = "状态") |
| | | private Integer state; |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.vo; |
| | | |
| | | public class ShopSalesmanDetailVo { |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.fenxiao.vo; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ShopSalesmanGradeVo", description = "返参") |
| | | public class ShopSalesmanGradeVo { |
| | | |
| | | @ApiModelProperty(value = "id") |
| | | private Long id; |
| | | |
| | | @ApiModelProperty(value = "等级名称") |
| | | private String name; |
| | | |
| | | } |
| | |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.constance.SystemConstance; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.plugin.util.BaseServices; |
| | | |
| | | import java.util.List; |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 获取当前操作的会员对象 |
| | | * @author 姜友瑶 |
| | | * @date 2016/7/5 |
| | | */ |
| | | public SysVipInfo getCurrentVioInfo() { |
| | | return (SysVipInfo) (WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @RequestMapping(value = "/showList") |
| | | public @ResponseBody AjaxResult showList(SysVipLevel vipLevel,PaginationVO pageVo) { |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | vipLevel.setShopId(users.getShopId()); |
| | | vipLevel.setCompanyId(users.getCompanyId()); |
| | | return showList(cardLevelService,vipLevel,pageVo); |
| | | } |
| | | /** |
| | |
| | | */ |
| | | @RequestMapping(value = "/all") |
| | | public @ResponseBody AjaxResult all(SysVipLevel sysVipLevel) { |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysVipLevel.setShopId(users.getShopId()); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, cardLevelService.findByModel(sysVipLevel), null); |
| | | } |
| | | } |
| | |
| | | @RequestMapping(value = "/findVipQuestionVipId") |
| | | public String findVipQuestionVipId(Long id) { |
| | | //获取会员所有的答案,分类型 |
| | | List<Question> questions=questionSerivce.findByVipId(id); |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | List<Question> questions=questionSerivce.findByVipId(id,user.getCompanyId()); |
| | | WebUtil.getRequest().setAttribute("questions", questions); |
| | | return "admin/hive/mobile/CRM-account-detail"; |
| | | |
| New file |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.hive.dto.ScoreChangeDto; |
| | | import com.matrix.system.score.dao.ScoreUseRecordDao; |
| | | import com.matrix.system.score.dao.ScoreVipDetailDao; |
| | | import com.matrix.system.score.entity.ScoreVipDetail; |
| | | import com.matrix.system.score.service.ScoreVipDetailService; |
| | | import com.matrix.system.shopXcx.api.dto.ScoreFlowDto; |
| | | import com.matrix.system.shopXcx.api.vo.ScoreUseRecordVo; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * @author jyy |
| | | * @date 2021-03-22 15:10 |
| | | */ |
| | | @Api(tags = "用户积分接口类") |
| | | @RestController |
| | | @RequestMapping(value = "/admin/score") |
| | | public class ErpShopScoreAction { |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | ScoreUseRecordDao scoreUseRecordDao; |
| | | |
| | | @Autowired |
| | | ScoreVipDetailDao scoreVipDetailDao; |
| | | |
| | | @Autowired |
| | | ScoreVipDetailService scoreVipDetailService; |
| | | |
| | | @Autowired |
| | | SysVipInfoDao sysVipInfoDao; |
| | | |
| | | @ApiOperation(value = "获取积分流水", notes = "") |
| | | @PostMapping(value = "/getFlowList") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = ScoreUseRecordVo.class) |
| | | }) |
| | | AjaxResult getFlowList(@RequestBody ScoreFlowDto scoreFlowDto) { |
| | | SysVipInfo vipInfo = sysVipInfoDao.selectById(scoreFlowDto.getVipId()); |
| | | scoreFlowDto.setVipId(vipInfo.getId()); |
| | | Page<ScoreUseRecordVo> page=new Page<>(scoreFlowDto.getPageNum(),scoreFlowDto.getPageSize()); |
| | | IPage<ScoreUseRecordVo> shopScoreRecord = scoreUseRecordDao.selectFlowList(page,scoreFlowDto); |
| | | AjaxResult result=AjaxResult.buildSuccessInstance(shopScoreRecord.getRecords(),shopScoreRecord.getTotal()); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "调整用户积分", notes = "") |
| | | @PostMapping(value = "/changeUserScore") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = AjaxResult.class) |
| | | }) |
| | | AjaxResult changeUserScore(@RequestBody @Validated ScoreChangeDto scoreChangeDto) { |
| | | SysVipInfo vipInfo = sysVipInfoDao.selectById(scoreChangeDto.getVipId()); |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | if(scoreChangeDto.getAmount()>0){ |
| | | scoreVipDetailService.addScore(vipInfo.getId(),sysUsers.getSuId(),sysUsers.getShopId(),scoreChangeDto.getAmount(),0L, ScoreVipDetail.SCORE_VIP_TYPE_USERCHANGE,scoreChangeDto.getRemarks()); |
| | | }else if (scoreChangeDto.getAmount()<0){ |
| | | scoreVipDetailService.deductionScore(vipInfo.getId(),sysUsers.getSuId(),sysUsers.getShopId(),Math.abs(scoreChangeDto.getAmount()),0L,ScoreVipDetail.SCORE_VIP_TYPE_USERCHANGE,scoreChangeDto.getRemarks()); |
| | | } |
| | | AjaxResult result=AjaxResult.buildSuccessInstance("调整成功"); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "获取用户积分", notes = "") |
| | | @PostMapping(value = "/getUserScore/{vipId}") |
| | | @ApiResponses({ |
| | | @ApiResponse(code = 200, message = "ok", response = AjaxResult.class) |
| | | }) |
| | | AjaxResult getUserScore(@PathVariable Long vipId) { |
| | | AjaxResult result=AjaxResult.buildSuccessInstance(scoreVipDetailDao.selectUserTotalScore(vipId)); |
| | | return result; |
| | | } |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import com.matrix.beauty.followup.entry.SysFollowup; |
| | | import com.matrix.beauty.followup.service.SysFollowupService; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.hive.dto.FollowuListDto; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @description 跟进记录 |
| | | */ |
| | | @RestController |
| | | @RequestMapping(value = "admin/followu") |
| | | public class FollowuController extends BaseController{ |
| | | |
| | | |
| | | @Resource |
| | | private SysFollowupService followupService; |
| | | |
| | | /** |
| | | * 显示所有的会员卡等级信息 |
| | | */ |
| | | @RequestMapping(value = "/showList") |
| | | public AjaxResult showList(@RequestBody @Validated FollowuListDto followuListDto) { |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | followuListDto.setCompanyId(users.getCompanyId()); |
| | | followuListDto.setSelfStaff(users.getSuId()); |
| | | List<SysFollowup> list= followupService.findVipFollowuByPage(followuListDto); |
| | | return AjaxResult.buildSuccessInstance(list); |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.component.asyncmessage.AsyncMessageManager; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.constance.SystemConstance; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.MoneyCardUseDao; |
| | | import com.matrix.system.hive.dao.MoneyCardUseFlowDao; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.pojo.CzXkVo; |
| | | import com.matrix.system.hive.service.*; |
| | | import com.matrix.system.shopXcx.mqTask.MQTaskRouting; |
| | | import com.matrix.system.shopXcx.mqTask.AsyncMessageRouting; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | |
| | | @Value("${evn}") |
| | | private String evn; |
| | | |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | |
| | | private AsyncMessageManager asyncMessageManager; |
| | | /** |
| | | * 跳转 充值页面 |
| | | * |
| | |
| | | //发送微信公众号提醒 |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(order.getCompanyId(),UniformMsgParam.GZH_CZCG); |
| | | uniformMsgParam.put("orderId",order.getId()); |
| | | rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam); |
| | | |
| | | result.putInMap("orderId",order.getId()); |
| | | return result; |
| | |
| | | @RequestMapping(value = "/showCardFlowList") |
| | | public @ResponseBody |
| | | AjaxResult showCardFlowList(MoneyCardUseFlow moneyCardUseFlow, PaginationVO pageVo) { |
| | | MoneyCardUse vipCard = cardUseService.findByVipId(moneyCardUseFlow.getVipId()); |
| | | if (vipCard != null) { |
| | | moneyCardUseFlowDao.updateVipCardId(moneyCardUseFlow.getVipId(), vipCard.getId()); |
| | | } |
| | | List<MoneyCardUseFlow> dataList = moneyCardUseFlowDao.selectInPage(moneyCardUseFlow, pageVo); |
| | | return AjaxResult.buildSuccessInstance(dataList, moneyCardUseFlowDao.selectTotalRecord(moneyCardUseFlow)); |
| | | } |
| | |
| | | |
| | | /** |
| | | * 补交 |
| | | * |
| | | * @throws GlobleException |
| | | * @author jyy |
| | | */ |
| | | @RequestMapping(value = "/bj") |
| | | public @ResponseBody |
| | | AjaxResult bj(@RequestBody SysOrder order) throws GlobleException { |
| | | AjaxResult bj(@RequestBody SysOrder order){ |
| | | |
| | | orderService.updateAfterMoney(order); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "补交成功"); |
| | |
| | | @RequestMapping(value = "/active") |
| | | public @ResponseBody |
| | | AjaxResult active(MoneyCardUse moneyCardUse) { |
| | | MoneyCardUse proj = moneyCardUseDao.selectById(moneyCardUse.getId()); |
| | | String status = proj.getStatus(); |
| | | Date failTime = proj.getFailTime(); |
| | | MoneyCardUse cardUse = moneyCardUseDao.selectById(moneyCardUse.getId()); |
| | | String status = cardUse.getStatus(); |
| | | Date failTime = cardUse.getFailTime(); |
| | | Date today = new Date(); |
| | | Date newDate = null; |
| | | newDate = moneyCardUse.getFailTime(); |
| | |
| | | break; |
| | | //如果是冻结状态则要算出冻结的天数,延长有效期 |
| | | case Dictionary.TAOCAN_STATUS_DJ: |
| | | MoneyCardUseFreeze freeze = new MoneyCardUseFreeze(); |
| | | freeze = moneyCardUseFreezeService.findByMoneyCardUseId(proj.getId()); |
| | | proj.setFailTime(DateUtil.nextNDate(failTime, freeze.getGapDays())); |
| | | |
| | | break; |
| | | default: |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "请选择无效或者冻结的充值卡"); |
| | | } |
| | | proj.setFailTime(moneyCardUse.getFailTime()); |
| | | cardUseService.active(proj); |
| | | cardUse.setFailTime(moneyCardUse.getFailTime()); |
| | | cardUseService.active(cardUse); |
| | | |
| | | |
| | | MoneyCardUseFlow moneyCardUseFlow = new MoneyCardUseFlow(); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | moneyCardUseFlow.setCarUseId(cardUse.getId()); |
| | | moneyCardUseFlow.setVipId(cardUse.getVipId()); |
| | | moneyCardUseFlow.setType(MoneyCardUseFlow.USE_TYPE_CARD_MODIFY); |
| | | moneyCardUseFlow.setCreateTime(new Date()); |
| | | moneyCardUseFlow.setOperationId(user.getSuId()); |
| | | moneyCardUseFlow.setContent("设置为有效"); |
| | | moneyCardUseFlowDao.insert(moneyCardUseFlow); |
| | | |
| | | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "已设置为有效"); |
| | | } |
| | | |
| | |
| | | @RequestMapping(value = "/invalid") |
| | | public @ResponseBody |
| | | AjaxResult invalidTc(MoneyCardUse moneyCardUse) { |
| | | MoneyCardUse proj = cardUseService.findById(moneyCardUse.getId()); |
| | | MoneyCardUse cardUse = cardUseService.findById(moneyCardUse.getId()); |
| | | //以及转让或者退款的不能在设置为无效 |
| | | String status = proj.getStatus(); |
| | | String status = cardUse.getStatus(); |
| | | switch (status) { |
| | | case Dictionary.TAOCAN_STATUS_TK: |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "充值卡已退款"); |
| | |
| | | case Dictionary.TAOCAN_STATUS_DJ: |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "充值卡已冻结"); |
| | | } |
| | | cardUseService.invalid(proj); |
| | | cardUseService.invalid(cardUse); |
| | | MoneyCardUseFlow moneyCardUseFlow = new MoneyCardUseFlow(); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | moneyCardUseFlow.setCarUseId(cardUse.getId()); |
| | | moneyCardUseFlow.setVipId(cardUse.getVipId()); |
| | | moneyCardUseFlow.setType(MoneyCardUseFlow.USE_TYPE_CARD_MODIFY); |
| | | moneyCardUseFlow.setCreateTime(new Date()); |
| | | moneyCardUseFlow.setOperationId(user.getSuId()); |
| | | moneyCardUseFlow.setContent("设置为无效"); |
| | | moneyCardUseFlowDao.insert(moneyCardUseFlow); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "已设置为无效"); |
| | | } |
| | | |
| | |
| | | public @ResponseBody |
| | | AjaxResult freeze(MoneyCardUse moneyCardUse) { |
| | | int i = cardUseService.freeze(moneyCardUse); |
| | | cardUseService.invalid(moneyCardUse); |
| | | |
| | | MoneyCardUse cardUse = cardUseService.findById(moneyCardUse.getId()); |
| | | MoneyCardUseFlow moneyCardUseFlow = new MoneyCardUseFlow(); |
| | | SysUsers user = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | moneyCardUseFlow.setCarUseId(cardUse.getId()); |
| | | moneyCardUseFlow.setVipId(cardUse.getVipId()); |
| | | moneyCardUseFlow.setType(MoneyCardUseFlow.USE_TYPE_CARD_MODIFY); |
| | | moneyCardUseFlow.setCreateTime(new Date()); |
| | | moneyCardUseFlow.setOperationId(user.getSuId()); |
| | | moneyCardUseFlow.setContent("冻结会员卡"); |
| | | moneyCardUseFlowDao.insert(moneyCardUseFlow); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "冻结成功"); |
| | | } |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.matrix.component.asyncmessage.AsyncMessageManager; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | | import com.matrix.core.tools.excl.ExcelVersion; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.dao.SysCompanyDao; |
| | | import com.matrix.system.common.service.OperationLogService; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.constance.SystemConstance; |
| | | import com.matrix.system.enums.OperationButtonEnum; |
| | | import com.matrix.system.enums.OperationFunctionEnum; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.pojo.ShoppingCarItem; |
| | | import com.matrix.system.hive.pojo.ShoppingCarItemsVo; |
| | | import com.matrix.system.hive.service.*; |
| | | import com.matrix.system.shopXcx.mqTask.AsyncMessageRouting; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgParam; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.ModelMap; |
| | |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | import java.net.URLEncoder; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public class OrderController extends BaseController { |
| | | @Resource |
| | | private SysOrderService orderService; |
| | | @Autowired |
| | | ShoppingGoodsDao shoppingGoodsDao; |
| | | |
| | | @Autowired |
| | | private CodeService codeService; |
| | | |
| | | @Autowired |
| | | private SysOrderItemDao orderItemDao; |
| | |
| | | @Autowired |
| | | private SysOrderFlowDao sysOrderFlowDao; |
| | | |
| | | |
| | | @Autowired |
| | | RabiitMqTemplate rabiitMqTemplate; |
| | | @Value("${evn}") |
| | | private String evn; |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | @Autowired |
| | | private SysProjServicesDao sysProjServicesDao; |
| | | |
| | | @Autowired |
| | | private AsyncMessageManager asyncMessageManager; |
| | | |
| | | |
| | | @Autowired |
| | | private OperationLogService operationLogService; |
| | | |
| | | |
| | | /** |
| | | * 计算订单金额 |
| | |
| | | total = total.add(new BigDecimal(item.getPrice() * item.getCount())); |
| | | } |
| | | SysOrder sysOrderResult = new SysOrder(); |
| | | sysOrderResult.setZkTotal(zkTotal.doubleValue()); |
| | | sysOrderResult.setZkTotal(zkTotal.setScale(2, BigDecimal.ROUND_DOWN).doubleValue()); |
| | | sysOrderResult.setTotal(total.doubleValue()); |
| | | |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(sysOrderResult)); |
| | |
| | | AjaxResult payOrder(@RequestBody SysOrder sysOrder) { |
| | | SysUsers user = getMe(); |
| | | sysOrder.setShopId(user.getShopId()); |
| | | sysOrder.setOrderType(SysOrder.ORDER_TYPE_SEAL); |
| | | sysOrder.setIsHasRefund(SysOrder.IS_HAS_REFUND_N); |
| | | //校验订单是否满足结算调价,新订单则保存订单,已有订单则删除后更新 |
| | | sysOrder = orderService.checkAndSaveOrder(sysOrder); |
| | | orderService.updateReceiptMoney(sysOrder); |
| | | |
| | | //发送微信公众号提醒 |
| | | // UniformMsgParam uniformMsgParam=new UniformMsgParam(user.getCompanyId(),UniformMsgParam.GZH_GMCG); |
| | | // uniformMsgParam.put("orderId",sysOrder.getId()); |
| | | // rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | UniformMsgParam uniformMsgParam = new UniformMsgParam(user.getCompanyId(), UniformMsgParam.GZH_GMCG); |
| | | uniformMsgParam.put("orderId", sysOrder.getId()); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam); |
| | | |
| | | |
| | | //处理用户购买的产品 |
| | |
| | | */ |
| | | @RequestMapping(value = "/refundOrder") |
| | | @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult refundOrder(@RequestBody SysOrder sysOrder) { |
| | | //储值卡订单不能通过退款渠道退款 |
| | | if(CollectionUtils.isNotEmpty(sysOrder.getItems())){ |
| | | if (CollectionUtils.isNotEmpty(sysOrder.getItems())) { |
| | | List<SysOrderItem> orderItem = orderItemService.findByOrderId(sysOrder.getItems().get(0).getOrderId()); |
| | | if(orderItem.size()==1){ |
| | | if(orderItem.get(0).getShoppingGoods().getCode().equals("vipCzk")){ |
| | | if (orderItem.size() == 1) { |
| | | if (orderItem.get(0).getShoppingGoods().getCode().equals("vipCzk")) { |
| | | return AjaxResult.buildFailInstance("充值订单请直接冲负数金额退款!"); |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | SysUsers user = getMe(); |
| | | sysOrder.setShopId(user.getShopId()); |
| | | sysOrder.setStatu(Dictionary.ORDER_STATU_TK); |
| | | sysOrder.setOrderTime(new Date()); |
| | | |
| | | |
| | | //校验订单是否满足结算调价,新订单则保存订单,已有订单则删除后更新 |
| | | sysOrder = orderService.checkAndSaveOrder(sysOrder); |
| | | orderService.refundOrderMoney(sysOrder); |
| | | //处理用户购买的产品 |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(sysOrder), "订单退款成功"); |
| | |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(sysOrder), "订单保存成功"); |
| | | } |
| | | |
| | | /** |
| | | * 新建订单 |
| | | * |
| | | * @author jiangyouyao |
| | | */ |
| | | @RequestMapping(value = "/addOrder") |
| | | public @ResponseBody |
| | | AjaxResult addOrder(ShoppingCarItemsVo car) { |
| | | |
| | | List<ShoppingCarItem> sessionCarItems = (List<ShoppingCarItem>) WebUtil.getSession().getAttribute( |
| | | SystemConstance.SHOPPING_CAR); |
| | | |
| | | List<ShoppingCarItem> carItems = new ArrayList<>(); |
| | | |
| | | // 设置购车中的具体类型信息,过滤没有被选中的商品 |
| | | for (ShoppingCarItem carItem : car.getCarItems()) { |
| | | |
| | | for (ShoppingCarItem sessionCar : sessionCarItems) { |
| | | |
| | | if (carItem.getId().equals(sessionCar.getId())) { |
| | | //已最后提交的数量为准 |
| | | sessionCar.setCount(carItem.getCount()); |
| | | carItems.add(sessionCar); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | //设置过滤后的购物车条目 |
| | | car.setCarItems(carItems); |
| | | |
| | | SysVipInfo info = (SysVipInfo) WebUtil.getSession().getAttribute(SystemConstance.CURRENT_CUSTOMER); |
| | | car.setVipId(info.getId()); |
| | | |
| | | // 添加新订单 |
| | | int i = orderService.createOrder(WebUtil.getSession(), car); |
| | | |
| | | if (i > 0) { |
| | | WebUtil.getSession().removeAttribute(SystemConstance.SHOPPING_CAR); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "下单成功"); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "下单添加失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 列表显示 |
| | |
| | | if (StringUtils.isBlank(pageVo.getOrder())) { |
| | | pageVo.setOrder("desc"); |
| | | } |
| | | sysOrder.setShopId(getMe().getShopId()); |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | sysOrder.setShopId(getMe().getShopId()); |
| | | } |
| | | sysOrder.setCompanyId(getMe().getCompanyId()); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, orderService.findInPage(sysOrder, pageVo), |
| | | orderService.findTotal(sysOrder)); |
| | | } |
| | |
| | | return showList(sysOrder, pageVo); |
| | | } |
| | | |
| | | @Resource |
| | | SysCompanyDao companyDao; |
| | | |
| | | /** |
| | | * 打印订单 |
| | | */ |
| | | @RequestMapping(value = "/printOrder") |
| | | public @ResponseBody |
| | | ModelAndView printOrder(SysOrder order) throws GlobleException { |
| | | ModelAndView mv = new ModelAndView("admin/hive/beautySalon/print-order"); |
| | | SysUsers user = getMe(); |
| | | String comRegisterCode = companyDao.selectById(user.getCompanyId()).getComRegisterCode(); |
| | | if (StringUtils.isNotBlank(comRegisterCode)) { |
| | | mv.addObject("page", comRegisterCode); |
| | | } else { |
| | | mv.addObject("page", "taiyan"); |
| | | } |
| | | return mv; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 收款 |
| | | */ |
| | | @RequestMapping(value = "sk") |
| | | @RequestMapping(value = "/sk") |
| | | public @ResponseBody |
| | | AjaxResult sk(SysOrder order) throws GlobleException { |
| | | orderService.updateReceiptMoney(order); |
| | |
| | | */ |
| | | @RequestMapping(value = "/updateOrderTime") |
| | | public @ResponseBody |
| | | @Transactional(rollbackFor = Exception.class) |
| | | AjaxResult updateOrderTime(SysOrder sysOrder) { |
| | | |
| | | sysOrderDao.updateOrderTime(sysOrder.getPayTime(), sysOrder.getId()); |
| | |
| | | achieveNew.setDatatime(sysOrder.getPayTime()); |
| | | achieveNewService.modifyAchieveTime(achieveNew); |
| | | //更新收款流水时间 |
| | | sysOrderFlowDao.updateTimeByOrderId(sysOrder.getId(),sysOrder.getPayTime()); |
| | | sysOrderFlowDao.updateTimeByOrderId(sysOrder.getId(), sysOrder.getPayTime()); |
| | | |
| | | //保存单据日志 |
| | | sysOrder= sysOrderDao.selectById(sysOrder.getId()); |
| | | operationLogService.saveOperation(sysOrder.getCompanyId(), sysOrder.getShopId(),getMe().getSuId(), |
| | | OperationFunctionEnum.ORDER, |
| | | OperationButtonEnum.ORDER_UPDATE_TIME, |
| | | sysOrder.getId(), |
| | | sysOrder.getOrderNo(), |
| | | sysOrder.getVipId(), |
| | | "更新参数: "+JSON.toJSONString(sysOrder)); |
| | | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功"); |
| | | } |
| | |
| | | MoneyCardUse cardUseInfo = cardUseService.findByVipId(order.getVipId()); |
| | | |
| | | if (cardUseInfo == null) { |
| | | cardUseInfo=sysVipInfoService.addVipDefaultCard(order.getVipId()); |
| | | cardUseInfo = sysVipInfoService.addVipDefaultCard(order.getVipId()); |
| | | } |
| | | |
| | | //打印需求加入门店信息 |
| | |
| | | |
| | | //查询会有所有有效的会员卡 |
| | | result.putInMap("totalMoney", moneyCardUseDao.selectVipCardTotalMoney(order.getVipId())); |
| | | |
| | | |
| | | |
| | | return result; |
| | |
| | | @ResponseBody |
| | | public AjaxResult findOrderDetailByIdOrNo(SysOrder orderVo) { |
| | | // 根据id查到对应的订单信息 |
| | | SysOrder order=null; |
| | | if(orderVo.getId()!=null){ |
| | | order = orderService.findById(orderVo.getId()); |
| | | }else if(StringUtils.isNotBlank(orderVo.getOrderNo())){ |
| | | SysOrder order = null; |
| | | if (orderVo.getId() != null) { |
| | | order = orderService.findById(orderVo.getId()); |
| | | } else if (StringUtils.isNotBlank(orderVo.getOrderNo())) { |
| | | List<SysOrder> byModel = orderService.findByModel(orderVo); |
| | | if(byModel.size()==1){ |
| | | order=orderService.findById(byModel.get(0).getId()); |
| | | if (byModel.size() == 1) { |
| | | order = orderService.findById(byModel.get(0).getId()); |
| | | } |
| | | } |
| | | List<SysOrderItem> sysOrderItems = orderItemDao.selectByOrderId(order.getId()); |
| | |
| | | @RequestMapping(value = "/orderItem") |
| | | public String orderItem(SysOrder orderVo) { |
| | | |
| | | if(orderVo.getId()!=null){ |
| | | if (orderVo.getId() != null) { |
| | | WebUtil.getRequest().setAttribute("orderParam", orderVo.getId()); |
| | | }else if(StringUtils.isNotBlank(orderVo.getOrderNo())){ |
| | | WebUtil.getRequest().setAttribute("orderId", orderVo.getId()); |
| | | } else if (StringUtils.isNotBlank(orderVo.getOrderNo())) { |
| | | WebUtil.getRequest().setAttribute("orderParam", orderVo.getOrderNo()); |
| | | WebUtil.getRequest().setAttribute("orderNo", orderVo.getOrderNo()); |
| | | } |
| | | return "admin/hive/beautySalon/orderXq-form"; |
| | | } |
| | |
| | | } |
| | | //=======================================页面转发END================================== |
| | | |
| | | /** |
| | | * 2021-08-20 新增:erp系统取消订单接口,不做订单状态校验 |
| | | * 取消订单 |
| | | */ |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @RequestMapping(value = "/erpCancelOrder") |
| | | public @ResponseBody |
| | | AjaxResult erpCancelOrder(Long id) { |
| | | |
| | | AjaxResult result = new AjaxResult(); |
| | | SysOrder order = orderService.findById(id); |
| | | if (order == null) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "订单不存在!"); |
| | | } |
| | | |
| | | List<SysOrderItem> items = orderItemDao.selectByOrderId(id); |
| | | for (SysOrderItem item : items) { |
| | | List<SysProjServices> sysProjServices = sysProjServicesDao.selectProjServicesByOrderItemId(item.getId()); |
| | | if (CollUtil.isNotEmpty(sysProjServices)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "订单存在进行中的服务单无法取消/删除"); |
| | | } |
| | | } |
| | | |
| | | orderService.cancelOrder(id); |
| | | |
| | | result.setInfo("取消成功!"); |
| | | |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | |
| | | return result; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 取消订单 |
| | |
| | | public @ResponseBody |
| | | AjaxResult cancelOrder(Long id, Integer del) { |
| | | |
| | | AjaxResult result = new AjaxResult(); |
| | | SysOrder order = orderService.findById(id); |
| | | if (order == null) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "订单不存在!"); |
| | | BusParameterSettings shopManageAbleCancelDfkOrder = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER, order.getCompanyId()); |
| | | if (StringUtils.isNotBlank(shopManageAbleCancelDfkOrder.getParamValue()) |
| | | && shopManageAbleCancelDfkOrder.getParamValue().equals(Dictionary.FLAG_YES)) { |
| | | if (!Dictionary.ORDER_STATU_DFK.equals(order.getStatu())) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "您只能取消待付款订单"); |
| | | } |
| | | } |
| | | orderService.cancelOrder(id); |
| | | if (del > 0) { |
| | | orderService.removeById(id); |
| | | result.setInfo("删除成功!"); |
| | | } else { |
| | | result.setInfo("取消成功!"); |
| | | } |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | |
| | | return result; |
| | | return erpCancelOrder(id); |
| | | } |
| | | |
| | | @RequestMapping(value = "/exportExcel") |
| | | public void report(ModelMap model, HttpServletRequest request, HttpServletResponse response, |
| | | SysOrder sysOrder) throws Exception { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | sysOrder.setShopId(sysUsers.getShopId()); |
| | | sysOrder.setShopId(getMe().getShopId()); |
| | | doExportOrder(response, sysOrder); |
| | | return; |
| | | |
| | |
| | | */ |
| | | @RequestMapping(value = "/erpExportExcel") |
| | | public void erpExportExcel(ModelMap model, HttpServletRequest request, HttpServletResponse response, |
| | | SysOrder sysOrder) throws Exception { |
| | | SysOrder sysOrder) throws Exception { |
| | | doExportOrder(response, sysOrder); |
| | | |
| | | return; |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 执行订单导出,总部和门店共用,但是搜索条件不一样 |
| | | * |
| | | * @param response |
| | | * @param sysOrder |
| | | * @throws IOException |
| | | */ |
| | | private void doExportOrder(HttpServletResponse response, SysOrder sysOrder) throws IOException { |
| | | |
| | | //保存单据日志 |
| | | operationLogService.saveOperation(getMe().getCompanyId(), getMe().getShopId(),getMe().getSuId(), |
| | | OperationFunctionEnum.ORDER, |
| | | OperationButtonEnum.EXPORT, |
| | | String.format("导出参数:%s" , JSON.toJSONString(sysOrder))); |
| | | |
| | | List<ExcelSheetPO> res = new ArrayList<>(); |
| | | ExcelSheetPO orderSheet = new ExcelSheetPO(); |
| | | String title = "订单记录"; |
| | | orderSheet.setSheetName(title); |
| | | orderSheet.setTitle(title); |
| | | String[] header = {"订单号", "客户姓名", "客户手机", "下单时间", "订单总价", "折后价", "现金付款", "卡付款", "顾问姓名", "所属门店", "订单状态"}; |
| | | String[] header = {"订单号", "客户姓名", "客户手机", "下单时间", "订单总价", "折后价", "现金付款", "卡付款", "顾问姓名", "收银员", "所属门店", "订单状态"}; |
| | | orderSheet.setHeaders(header); |
| | | //门店只能查询本店自己的订单 |
| | | List<SysOrder> dataList = orderService.findInPage(sysOrder, null); |
| | |
| | | temp.add(item.getCashPay()); |
| | | temp.add(item.getCardPay()); |
| | | temp.add(item.getStaffName()); |
| | | temp.add(item.getCashierName()); |
| | | temp.add(item.getShopName()); |
| | | temp.add(item.getStatu()); |
| | | list.add(temp); |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.matrix.core.anotations.RemoveRequestToken; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | | import com.matrix.core.tools.excl.ExcelVersion; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.dao.SysCompanyDao; |
| | | import com.matrix.system.common.service.OperationLogService; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.enums.OperationButtonEnum; |
| | | import com.matrix.system.enums.OperationFunctionEnum; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.dto.ServiceOrderTimeDto; |
| | | import com.matrix.system.hive.service.*; |
| | | import com.matrix.system.hive.vo.ServiceOrderInfoVo; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.servlet.ModelAndView; |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.net.URLEncoder; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | SysShopInfoDao shopInfoDao; |
| | | |
| | | @Autowired |
| | | private OperationLogService operationLogService; |
| | | |
| | | |
| | | /** |
| | | * 根据id查询服务单信息 |
| | | */ |
| | |
| | | } |
| | | //补充服务单扩展信息=============== |
| | | List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(id); |
| | | if (CollUtil.isNotEmpty(beauticianStateList)) { |
| | | for (SysBeauticianState sysBeauticianState : beauticianStateList) { |
| | | SysProjUse item = sysBeauticianState.getProjUse(); |
| | | |
| | | // 若项目/套餐无效,则打印时,不显示余次 |
| | | if (!"无效".equals(item.getStatus())) { |
| | | item.setRemainCount(item.getSurplusCount()); |
| | | } else { |
| | | item.setRemainCount(null); |
| | | } |
| | | |
| | | if (sysBeauticianState.getProjUse().getTaocanId() != null) { |
| | | SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getProjUse().getTaocanId()); |
| | | if (!"无效".equals(sysProjUse.getStatus())) { |
| | | item.setRemainCount(sysProjUse.getSurplusCount()); |
| | | } else { |
| | | item.setRemainCount(null); |
| | | } |
| | | |
| | | sysBeauticianState.getProjInfo().setName(sysProjUse.getProjName()+"--"+sysBeauticianState.getProjInfo().getName()); |
| | | if ("Y".equals(sysProjUse.getIsCourse()) && "Y".equals(sysProjUse.getIsInfinite())) { |
| | | int count = projUseService.findTaocanCountForCourseAndInfinite(sysBeauticianState.getProjUse().getTaocanId(), projServices.getVipId()); |
| | | item.setRemainCount(count); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | projServices.setServiceItems(beauticianStateList); |
| | | SysBedState sysBedState = sysBedStateDao.selectBySerIdAndBedId(projServices.getId(), projServices.getBedId()); |
| | | projServices.setBedState(sysBedState); |
| | |
| | | |
| | | result.setStatus(AjaxResult.STATUS_SUCCESS); |
| | | return result; |
| | | } |
| | | |
| | | /** |
| | | * 根据id查询服务单简单信息 |
| | | */ |
| | | @RequestMapping(value = "/findServiceOrderInfoVo/{id}") |
| | | public @ResponseBody |
| | | AjaxResult findServiceOrderInfoVo(@PathVariable Long id) { |
| | | // 获取服务单信息 |
| | | SysProjServices projServices = sysProjServicesService.findById(id); |
| | | |
| | | ServiceOrderInfoVo serviceOrderInfoVo= BeanUtil.copyProperties(projServices,ServiceOrderInfoVo.class); |
| | | |
| | | return AjaxResult.buildSuccessInstance(serviceOrderInfoVo); |
| | | } |
| | | |
| | | |
| | |
| | | if (StringUtils.isBlank(pageVo.getOrder())) { |
| | | pageVo.setOrder("desc"); |
| | | } |
| | | projService.setShopId(getMe().getShopId()); |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | projService.setShopId(getMe().getShopId()); |
| | | } |
| | | QueryUtil.setQueryLimitCom(projService); |
| | | List<SysProjServices> dataList = projServicesSerivce.findInPage(projService, pageVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, projServicesSerivce.findTotal(projService)); |
| | | return result; |
| | |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("查询成功"); |
| | | |
| | | SysProjUse queryUse = new SysProjUse(); |
| | | if(Objects.nonNull(vipId)){ |
| | | queryUse.setVipId(vipId); |
| | | }else{ |
| | | SysVipInfo vipInfo = getCurrentVioInfo(); |
| | | queryUse.setVipId(vipInfo.getId()); |
| | | } |
| | | |
| | | queryUse.setVipId(vipId); |
| | | queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM); |
| | | queryUse.setTaocanId(-1L); |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | List<SysProjUse> projList = projUseService.findInPage(queryUse, null); |
| | | //切换到套餐查询条件 |
| | | queryUse.setTaocanId(null); |
| | |
| | | return "admin/hive/beautySalon/yypb-form"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 进入预约排班详情 |
| | | * |
| | |
| | | |
| | | //补充服务单扩展信息=============== |
| | | List<SysBeauticianState> beauticianStateList = beauticianStateDao.selectBySerIds(projServices.getId()); |
| | | if (CollUtil.isNotEmpty(beauticianStateList)) { |
| | | for (SysBeauticianState sysBeauticianState : beauticianStateList) { |
| | | if (sysBeauticianState.getProjUse().getTaocanId() != null) { |
| | | SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getProjUse().getTaocanId()); |
| | | if(sysProjUse != null) { |
| | | sysBeauticianState.getProjInfo().setName(sysProjUse.getProjName() + "--" + sysBeauticianState.getProjInfo().getName()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | projServices.setServiceItems(beauticianStateList); |
| | | |
| | | SysBedState sysBedState = sysBedStateDao.selectBySerIdAndBedId(projServices.getId(), projServices.getBedId()); |
| | |
| | | } |
| | | } |
| | | |
| | | @ApiOperation(value = "确认服务", notes = "确认服务") |
| | | @PostMapping(value = "/confirmServiceOrder") |
| | | public @ResponseBody AjaxResult confirmServiceOrder(Long id) { |
| | | int i=sysProjServicesService.confirmServiceOrder(id); |
| | | if(i>0){ |
| | | return AjaxResult.buildSuccessInstance("确认成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("确认失败"); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * @author jiangyouyao |
| | |
| | | */ |
| | | @RequestMapping(value = "/updateOrderTime") |
| | | public @ResponseBody |
| | | AjaxResult updateOrderTime(SysProjServices serviceQuery) { |
| | | SysProjServices services = sysProjServicesDao.selectById(serviceQuery.getId()); |
| | | sysProjServicesDao.updateOrderTime(serviceQuery.getConsumeTime(), serviceQuery.getId()); |
| | | @Transactional(rollbackFor = Exception.class) |
| | | AjaxResult updateOrderTime(@RequestBody ServiceOrderTimeDto serviceOrderTimeDto) { |
| | | sysProjServicesDao.updateOrderTime(serviceOrderTimeDto); |
| | | // 更新业绩时间 |
| | | AchieveNew achieveNew = new AchieveNew(); |
| | | achieveNew.setServiceOrderId(serviceQuery.getId()); |
| | | achieveNew.setDatatime(serviceQuery.getConsumeTime()); |
| | | achieveNew.setServiceOrderId(serviceOrderTimeDto.getId()); |
| | | achieveNew.setDatatime(serviceOrderTimeDto.getConsumeTime()); |
| | | achieveNewService.modifyAchieveTime(achieveNew); |
| | | SysProjServices projServices = sysProjServicesDao.selectById(serviceOrderTimeDto.getId()); |
| | | //保存单据日志 |
| | | operationLogService.saveOperation(projServices.getCompanyId(), projServices.getShopId(),getMe().getSuId(), |
| | | OperationFunctionEnum.SERVICE_ORDER, |
| | | OperationButtonEnum.ORDER_UPDATE_TIME, |
| | | projServices.getId(), |
| | | projServices.getServiceNo(), |
| | | projServices.getVipId(), |
| | | "更新参数: "+JSON.toJSONString(serviceOrderTimeDto)); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功"); |
| | | } |
| | | |
| | |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "成功"); |
| | | } |
| | | |
| | | @Autowired |
| | | private SysCompanyDao sysCompanyDao; |
| | | |
| | | /** |
| | | * 根据id对服务单进行派单 |
| | | * 服务单打印 |
| | | */ |
| | | @RequestMapping(value = "/paidan") |
| | | @RequestMapping(value = "/printOrder") |
| | | public @ResponseBody |
| | | AjaxResult paidan(Long id) { |
| | | SysProjServices services = sysProjServicesService.findById(id); |
| | | int i = sysProjServicesService.modifyPDProjServices(services); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "派单成功"); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "派单失败"); |
| | | ModelAndView printOrder() throws GlobleException { |
| | | ModelAndView mv = new ModelAndView("admin/hive/beautySalon/print-service"); |
| | | SysUsers user=(SysUsers)WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | String comRegisterCode = sysCompanyDao.selectById(user.getCompanyId()).getComRegisterCode(); |
| | | if(StringUtils.isNotBlank(comRegisterCode)){ |
| | | mv.addObject("page",comRegisterCode); |
| | | }else { |
| | | mv.addObject("page","taiyan"); |
| | | } |
| | | return mv; |
| | | } |
| | | |
| | | |
| | | |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | /** |
| | | * 根据id取消预约 |
| | |
| | | @RequestMapping(value = "/cancelOrder") |
| | | public @ResponseBody |
| | | AjaxResult cancelOrder(SysProjServices services) { |
| | | |
| | | SysProjServices checkProjServices = sysProjServicesDao.selectById(services.getId()); |
| | | BusParameterSettings shopManageAbleCancelDfkOrder = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.SHOP_MANAGE_ABLE_CANCEL_DFK_ORDER, checkProjServices.getCompanyId()); |
| | | if (StringUtils.isNotBlank(shopManageAbleCancelDfkOrder.getParamValue()) |
| | | && shopManageAbleCancelDfkOrder.getParamValue().equals(Dictionary.FLAG_YES)) { |
| | | if (!checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DYY) |
| | | && !checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DQR)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "您只能取消待预约订单"); |
| | | } |
| | | } |
| | | return erpCancelOrder(services); |
| | | } |
| | | /** |
| | | * 根据id取消预约 |
| | | */ |
| | | @RequestMapping(value = "/erpCancelOrder") |
| | | public @ResponseBody |
| | | AjaxResult erpCancelOrder(SysProjServices services) { |
| | | int i = sysProjServicesService.modifyCancelProjServices(services); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "取消预约成功"); |
| | |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "取消预约失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设置服务单划扣成功 |
| | |
| | | @RequestMapping(value = "/addService") |
| | | public @ResponseBody |
| | | AjaxResult servicceAdd(@RequestBody SysProjServices sysProjServices) { |
| | | SysVipInfo vipInfo = getCurrentVioInfo(); |
| | | sysProjServices.setVipId(vipInfo.getId()); |
| | | |
| | | |
| | | if (CollectionUtils.isEmpty(sysProjServices.getServiceItems())) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "没有选中可消耗的项目"); |
| | |
| | | if (balanceverifyResult.isError()) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, balanceverifyResult.getMsg()); |
| | | } |
| | | sysProjServices.setState(Dictionary.SERVICE_STATU_YYCG); |
| | | if (StrUtil.isEmpty(sysProjServices.getState())) { |
| | | sysProjServices.setState(Dictionary.SERVICE_STATU_DYY); |
| | | } |
| | | SysProjServices newSysProjServices = sysProjServicesService.addSysProjServices(sysProjServices); |
| | | if (newSysProjServices != null) { |
| | | return AjaxResult.buildSuccessInstance(Arrays.asList(newSysProjServices)); |
| | |
| | | @RequestMapping(value = "/addServiceForForm") |
| | | public @ResponseBody |
| | | AjaxResult servicceAddForForm(SysProjServices sysProjServices) { |
| | | SysVipInfo vipInfo = getCurrentVioInfo(); |
| | | sysProjServices.setVipId(vipInfo.getId()); |
| | | |
| | | |
| | | |
| | | if (CollectionUtils.isEmpty(sysProjServices.getServiceItems())) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "没有选中可消耗的项目"); |
| | |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "排班失败"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 删除服务单项目/套餐 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @RequestMapping(value = "/delServiceOrderItems") |
| | | @ResponseBody |
| | | public AjaxResult delServiceOrderItems(Long id) { |
| | | sysProjServicesService.deleteProjServiceItemById(id); |
| | | return AjaxResult.buildSuccessInstance("删除成功"); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | |
| | | private void doExportServiceOrder(HttpServletResponse response, SysProjServices projServices) throws IOException { |
| | | |
| | | //保存单据日志 |
| | | operationLogService.saveOperation(getMe().getCompanyId(), getMe().getShopId(),getMe().getSuId(), |
| | | OperationFunctionEnum.SERVICE_ORDER, |
| | | OperationButtonEnum.EXPORT, |
| | | String.format("导出参数:%s" , JSON.toJSONString(projServices))); |
| | | |
| | | |
| | | List<ExcelSheetPO> res = new ArrayList<>(); |
| | | ExcelSheetPO orderSheet = new ExcelSheetPO(); |
| | | String title = "服务订单明细"; |
| | | orderSheet.setSheetName(title); |
| | | orderSheet.setTitle(title); |
| | | String[] header = {"服务单号","会员名称", "会员手机号", "消耗金额","服务状态", "下单时间","预约时间","是否超时(超时分钟)", "床位", "美疗师", "配料师", "健康顾问", "所属门店"}; |
| | | String[] header = {"服务单号","会员名称", "会员手机号", "消耗金额","服务状态", "下单时间","预约时间","状态","是否超时(超时分钟)", "床位", "美疗师", "配料师", "健康顾问", "划扣人", "所属门店"}; |
| | | orderSheet.setHeaders(header); |
| | | |
| | | List<SysProjServices> dataList = projServicesSerivce.findByModel(projServices); |
| | |
| | | temp.add(item.getBeautiName()); |
| | | temp.add(item.getPlsName()); |
| | | temp.add(item.getCreateStaffName()); |
| | | temp.add(item.getCashierName()); |
| | | temp.add(item.getShopName()); |
| | | list.add(temp); |
| | | } |
| | |
| | | package com.matrix.system.hive.action; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | |
| | | import com.matrix.system.hive.dao.ShoppingGoodsDao; |
| | | import com.matrix.system.hive.dao.SysProjUseDao; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.hive.plugin.message.StringUtil; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.service.MoneyCardUseService; |
| | | import com.matrix.system.hive.service.SysProjUseService; |
| | |
| | | } |
| | | |
| | | |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | | |
| | | |
| | | |
| | |
| | | public AjaxResult importVipInfo(HttpServletResponse response, HttpServletRequest request, @RequestParam(value = "file", required = false) MultipartFile file) throws IOException { |
| | | |
| | | String fileName = file.getOriginalFilename(); |
| | | String dirPath = "E:"; |
| | | //PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH); |
| | | // String dirPath = "E:"; |
| | | String dirPath = fileStoragePath; |
| | | |
| | | File saveFile = new File(dirPath + "/" + fileName); |
| | | file.transferTo(saveFile); |
| | | File saveFile =new File (new File(dirPath).getAbsolutePath() + File.separator + fileName); |
| | | if (!saveFile.exists()) |
| | | { |
| | | if (!saveFile.getParentFile().exists()) |
| | | { |
| | | saveFile.getParentFile().mkdirs(); |
| | | } |
| | | } |
| | | file.transferTo(saveFile.getAbsoluteFile()); |
| | | |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | List<ExcelSheetPO> excelSheetPOList = ExcelUtil.readExcel(saveFile, null, null); |
| | | |
| | | /* |
| | | |
| | | //项目资料导入 |
| | | List<List<Object>> dataList = excelSheetPOList.get(0).getDataList(); |
| | | List<SysProjUse> projUseList = new ArrayList<>(); |
| | |
| | | List<Object> objects = taocanDataList.get(j); |
| | | LogUtil.info("导入套餐第" + j + "行" + objects); |
| | | Object vipName = objects.get(0); |
| | | String vipNameStr = vipName.toString(); |
| | | String vipNameStr = vipName==null?"":vipName.toString(); |
| | | if (taocan == null |
| | | || (taocan != null && StringUtils.isNotBlank(vipNameStr))) { |
| | | //切换下一个套餐 |
| | |
| | | //套餐资料导入=======end=== |
| | | |
| | | |
| | | */ |
| | | //充值卡资料导入 |
| | | List<List<Object>> cardList = excelSheetPOList.get(2).getDataList(); |
| | | List<MoneyCardUse> cardUseArrayList = new ArrayList<>(); |
| | |
| | | Object tel = objects.get(1); |
| | | if (tel != null) { |
| | | String telStr = tel.toString(); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(StrUtil.trim(telStr),sysUsers.getCompanyId()); |
| | | if (vipInfo == null) { |
| | | vipInfo = new SysVipInfo(); |
| | | vipInfo.setShopId(sysUsers.getShopId()); |
| | | vipInfo.setPhone(telStr); |
| | | vipInfo.setPhoto(defaultWoman); |
| | | vipInfo.setName(objects.get(0).toString()); |
| | | vipInfo.setIsDelete(Dictionary.DELETED_N); |
| | | vipInfoDao.insert(vipInfo); |
| | | } |
| | | |
| | |
| | | Object tel = objects.get(1); |
| | | if (tel != null) { |
| | | String telStr = tel.toString(); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(telStr); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(StrUtil.trim(telStr),sysUsers.getCompanyId()); |
| | | if (vipInfo == null) { |
| | | vipInfo = new SysVipInfo(); |
| | | vipInfo.setShopId(sysUsers.getShopId()); |
| | | vipInfo.setPhone(telStr); |
| | | vipInfo.setPhoto(defaultWoman); |
| | | vipInfo.setName(objects.get(0).toString()); |
| | | vipInfo.setIsDelete(Dictionary.DELETED_N); |
| | | vipInfoDao.insert(vipInfo); |
| | | } |
| | | String goodNo = String.valueOf(objects.get(3)); |
| | | String goodName = String.valueOf(objects.get(2)).trim(); |
| | | |
| | | |
| | | ShoppingGoods goods = shoppingGoodsDao.findByCode(goodNo); |
| | | |
| | | String goodName = String.valueOf(objects.get(2)).trim(); |
| | | if("储值卡".equals(goodName)){ |
| | | goods= shoppingGoodsDao.selectVipCzGoods(); |
| | | } |
| | | |
| | | |
| | | if (goods != null || "储值卡".equals(goodName)) { |
| | | |
| | | moneyCardUse.setVipId(vipInfo.getId()); |
| | |
| | | |
| | | @RequestMapping(value = "/showAllList") |
| | | public @ResponseBody |
| | | AjaxResult showAllList(ServiceRecord serviceRecord, PaginationVO pageVo) { |
| | | AjaxResult showAllList(ServiceRecord serviceRecord, PaginationVO pageVo) { |
| | | |
| | | if (!getMe().getShopRole().equals(Dictionary.FLAG_YES_Y)) { |
| | | serviceRecord.setShopId(getMe().getShopId()); |
| | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.service.SysShopInfoService; |
| | |
| | | public @ResponseBody AjaxResult findAllWithPermi(SysShopInfo shopInfo) { |
| | | QueryUtil.setQueryLimitCom(shopInfo); |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!AppConstance.ZONGDIAN.equals(sysUsers.getShopName())){ |
| | | if (!DataAuthUtil.hasAllShopAuth()) { |
| | | shopInfo.setId(sysUsers.getShopId()); |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, currentService.findByModel(shopInfo), null); |
| | |
| | | // shoppingGoodsCategory.setShopId(user.getShopId()); |
| | | // } |
| | | // shoppingGoodsCategory.setCompanyId(user.getCompanyId()); |
| | | SysShopInfo zbShop = shopInfoDao.selectZbShop(getMe().getCompanyId()); |
| | | shoppingGoodsCategory.setShopId(zbShop.getId()); |
| | | QueryUtil.setQueryLimitCom(shoppingGoodsCategory); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, goodsCategoryService.findByModel(shoppingGoodsCategory), 0); |
| | | } |
| | |
| | | import com.matrix.system.hive.dao.SysShopInfoDao; |
| | | import com.matrix.system.hive.service.ShoppingGoodsService; |
| | | import com.matrix.system.hive.service.SysShopInfoService; |
| | | import org.apache.poi.ss.formula.functions.T; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | |
| | | } |
| | | } |
| | | shoppingGoods.setIsDel(ShoppingGoods.NORMAL); |
| | | shoppingGoods.setStaus(Dictionary.BUSINESS_STATE_UP); |
| | | List<ShoppingGoods> dataList = shoppingGoodsService.findInPage(shoppingGoods, pageVo); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, dataList, shoppingGoodsService.findTotal(shoppingGoods)); |
| | | return result; |
| | |
| | | String title = "商品资料"; |
| | | orderSheet.setSheetName(title); |
| | | orderSheet.setTitle(title); |
| | | String[] header = {"商品名称", "商品编号", "售价/(本金)", "参考价/(赠送金额)", "真实销量", "状态", "是否赠送", "类型", "分类", "是否固定套餐", "产品归属"}; |
| | | String[] header = {"商品名称", "商品编号", "售价/(本金)", "参考价/(赠送金额)", "真实销量", "状态", "是否赠送", "类型", "分类", "是否固定套餐", "产品归属","时长"}; |
| | | orderSheet.setHeaders(header); |
| | | List<ShoppingGoods> dataList = shoppingGoodsService.findAll(shoppingGoods); |
| | | List<List<Object>> list = new ArrayList<>(); |
| | |
| | | temp.add(item.getCateName()); |
| | | temp.add(item.getIsCourse()); |
| | | temp.add(item.getHeadquarters() == 1 ? "总部产品" : "本店产品"); |
| | | temp.add(item.getTimeLength()); |
| | | list.add(temp); |
| | | } |
| | | } |
| | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.*; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.core.tools.excl.ExcelSheetPO; |
| | | import com.matrix.core.tools.excl.ExcelUtil; |
| | | import com.matrix.core.tools.excl.ExcelVersion; |
| | | import com.matrix.system.common.bean.CustomerDataDictionary; |
| | | import com.matrix.system.common.bean.SystemDictionary; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.bean.SystemDictionary; |
| | | import com.matrix.system.common.dao.CustomerDataDictionaryDao; |
| | | import com.matrix.system.common.service.SystemDictionaryService; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.common.service.SystemDictionaryService; |
| | | import com.matrix.system.common.tools.DataAuthUtil; |
| | | import com.matrix.system.common.tools.ResponseHeadUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.constance.SystemConstance; |
| | | import com.matrix.system.hive.action.util.QueryUtil; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.MoneyCardUseDao; |
| | | import com.matrix.system.hive.dao.ShoppingGoodsDao; |
| | | import com.matrix.system.hive.dao.SysVipLabelDao; |
| | | import com.matrix.system.hive.dao.VipAnswerDao; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.pojo.RegisterInfo; |
| | | import com.matrix.system.hive.service.*; |
| | | import com.matrix.system.score.dao.ScoreVipDetailDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.ModelMap; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.annotation.Resource; |
| | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.io.OutputStream; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.net.URLDecoder; |
| | | import java.net.URLEncoder; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | | import java.util.Calendar; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | @Controller |
| | | @RequestMapping(value = "admin/vipInfo") |
| | | public class VipInfoController extends BaseController { |
| | | |
| | | |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | | |
| | | @Resource |
| | | private SysVipInfoService vipInfoService; |
| | | |
| | |
| | | private CustomerDataDictionaryDao customerDataDictionaryDao; |
| | | @Resource |
| | | private SysOrderService sysOrderService; |
| | | @Autowired |
| | | ShoppingGoodsDao shoppingGoodsDao; |
| | | @Autowired |
| | | private ScoreVipDetailDao scoreVipDetailDao; |
| | | @Resource |
| | | private SysProjUseService projUseService; |
| | | @Resource |
| | | HttpServletResponse response; |
| | | |
| | | @RequestMapping(value = "/exportExcel/{vipId}") |
| | | public void getVipAllProjInfo(@PathVariable Long vipId) throws IOException { |
| | | |
| | | List<ExcelSheetPO> res = new ArrayList<>(); |
| | | ExcelSheetPO orderSheet = new ExcelSheetPO(); |
| | | |
| | | SysVipInfo vipInfo = vipInfoService.findById(vipId); |
| | | |
| | | String title = vipInfo.getVipName()+"("+vipInfo.getVipNo()+")会员资料"; |
| | | orderSheet.setSheetName(title); |
| | | orderSheet.setTitle(title); |
| | | String[] header = {"产品类型", "产品名称","来源", "状态", "余额", "余次", "到期时间", "本金", "赠金"}; |
| | | orderSheet.setHeaders(header); |
| | | |
| | | |
| | | SysProjUse queryUse = new SysProjUse(); |
| | | queryUse.setVipId(vipId); |
| | | queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM); |
| | | queryUse.setTaocanId(-1L); |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | List<SysProjUse> projList = projUseService.findInPage(queryUse, null); |
| | | |
| | | List<List<Object>> list = new ArrayList<>(); |
| | | if (projList.size() > 0) { |
| | | for (SysProjUse item : projList) { |
| | | List<Object> temp = new ArrayList<>(); |
| | | temp.add("项目"); |
| | | temp.add(item.getProjName()); |
| | | temp.add(item.getSource()); |
| | | temp.add("有效"); |
| | | temp.add(item.getBalance()); |
| | | temp.add(item.getSurplusCount()); |
| | | temp.add(DateUtil.dateToString(item.getFailTimeStr(),DateUtil.DATE_FORMAT_DD)); |
| | | temp.add(""); |
| | | temp.add(""); |
| | | list.add(temp); |
| | | } |
| | | } |
| | | //套餐 |
| | | //切换到套餐查询条件 |
| | | SysProjUse queryTaocan = new SysProjUse(); |
| | | queryTaocan.setType(Dictionary.SHOPPING_GOODS_TYPE_TC); |
| | | queryTaocan.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | queryTaocan.setVipId(vipId); |
| | | List<SysProjUse> taoCanList = projUseService.findInPage(queryTaocan, null); |
| | | taoCanList.forEach(item->{ |
| | | item.setTaocanProjUse(projUseService.selectTaocanProjUse(item.getId(), queryUse.getStatus())); |
| | | item.setProjInfo(shoppingGoodsDao.selectById(item.getProjId())); |
| | | }); |
| | | if (taoCanList.size() > 0) { |
| | | for (SysProjUse item : taoCanList) { |
| | | List<Object> temp = new ArrayList<>(); |
| | | |
| | | if(Dictionary.FLAG_YES_Y.equals(item.getIsCourse())){ |
| | | temp.add("任选套餐"); |
| | | }else{ |
| | | temp.add("固定套餐"); |
| | | } |
| | | temp.add(item.getProjName()); |
| | | temp.add(item.getSource()); |
| | | temp.add("有效"); |
| | | temp.add(item.getBalance()); |
| | | temp.add(item.getSurplusCount()); |
| | | temp.add(DateUtil.dateToString(item.getFailTimeStr(),DateUtil.DATE_FORMAT_DD)); |
| | | temp.add(""); |
| | | temp.add(""); |
| | | list.add(temp); |
| | | |
| | | //套餐下项目 |
| | | List<SysProjUse> taocanProjUse = item.getTaocanProjUse(); |
| | | if (taocanProjUse.size() > 0) { |
| | | for (SysProjUse proj_item : taocanProjUse) { |
| | | List<Object> temp2 = new ArrayList<>(); |
| | | temp2.add(" |————"); |
| | | temp2.add(proj_item.getProjName()); |
| | | temp2.add(proj_item.getSource()); |
| | | temp2.add("有效"); |
| | | temp2.add(proj_item.getBalance()); |
| | | temp2.add(proj_item.getSurplusCount()); |
| | | temp2.add(DateUtil.dateToString(proj_item.getFailTimeStr(),DateUtil.DATE_FORMAT_DD)); |
| | | temp2.add(""); |
| | | temp2.add(""); |
| | | list.add(temp2); |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | //储值卡 |
| | | MoneyCardUse moneyCardUse = new MoneyCardUse(); |
| | | moneyCardUse.setVipId(vipId); |
| | | moneyCardUse.setStatus(Dictionary.MONEYCARD_STATUS_YX); |
| | | List<MoneyCardUse> cards = cardUseService.findByModel(moneyCardUse); |
| | | |
| | | if (cards.size() > 0) { |
| | | for (MoneyCardUse item : cards) { |
| | | List<Object> temp = new ArrayList<>(); |
| | | temp.add("储值卡"); |
| | | temp.add(item.getCardName()); |
| | | temp.add(item.getSource()); |
| | | temp.add("有效"); |
| | | temp.add(""); |
| | | temp.add(item.getLastCount()); |
| | | temp.add(DateUtil.dateToString(item.getFailTime(),DateUtil.DATE_FORMAT_DD)); |
| | | temp.add(item.getRealMoney()); |
| | | temp.add(item.getGiftMoney()); |
| | | list.add(temp); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | orderSheet.setDataList(list); |
| | | res.add(orderSheet); |
| | | response = ResponseHeadUtil.setExcelHead(response); |
| | | response.setHeader("Content-Disposition", |
| | | "attachment;filename=" + URLEncoder.encode(title + DateUtil.getTimeMark() + ".xlsx".trim(), "UTF-8")); |
| | | OutputStream os = response.getOutputStream(); |
| | | ExcelUtil.createWorkbookAtOutStream(ExcelVersion.V2007, res, os, true); |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/showVipLevel") |
| | |
| | | public @ResponseBody |
| | | AjaxResult showList(PaginationVO pageVo, SysVipInfo vipInfo) { |
| | | |
| | | // if (!getMe().getShopRole().equals(Dictionary.FLAG_YES_Y)) { |
| | | vipInfo.setShopId(getMe().getShopId()); |
| | | // } |
| | | |
| | | QueryUtil.setQueryLimit(vipInfo); |
| | | |
| | | return showList(vipInfoService, vipInfo, pageVo); |
| | | } |
| | | |
| | |
| | | @RequestMapping(value = "/showVipInfo") |
| | | public @ResponseBody |
| | | AjaxResult findByModel(String keyWord) { |
| | | LinkedList<SysVipInfo> userList = null; |
| | | // 获取最近查询客户 |
| | | if (WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER) == null) { |
| | | userList = new LinkedList<SysVipInfo>(); |
| | | WebUtil.getSession().setAttribute(SystemConstance.HISTORY_CUSTOMER, userList); |
| | | } else { |
| | | userList = (LinkedList<SysVipInfo>) WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER); |
| | | } |
| | | |
| | | List<SysVipInfo> vips = vipInfoService.findByVipNoOrTel(keyWord); |
| | | if (vips.size() > 0) { |
| | | // 在session存放当前查询的客户 |
| | | vips.get(0).setPointAll(scoreVipDetailDao.selectUserTotalScore(vips.get(0).getId())); |
| | | vips.get(0).setSysOrder(sysOrderService.findSysOrderTjByVipId(vips.get(0).getId())); |
| | | vips.get(0).setLevelCard(cardUseService.findByVipId(vips.get(0).getId())); |
| | | WebUtil.getSession().setAttribute(SystemConstance.CURRENT_CUSTOMER, vips.get(0)); |
| | | // 满20后删除一个 |
| | | if (userList.size() == 20) { |
| | | userList.poll(); |
| | | } |
| | | // 去重标志 |
| | | boolean isNoRepeat = true; |
| | | for (SysVipInfo sysVipInfo : userList) { |
| | | if (vips.get(0).getPhone().equals(sysVipInfo.getPhone())) { |
| | | isNoRepeat = false; |
| | | } |
| | | } |
| | | if (isNoRepeat) { |
| | | userList.add(vips.get(0)); |
| | | } |
| | | vips.get(0).setLabels(sysVipLabelDao.selectByVipId(vips.get(0).getId())); |
| | | vips.get(0).setAge(DateUtil.getAgeForBirthDay(vips.get(0).getBirthday1())); |
| | | vips.get(0).setBalance(moneyCardUseDao.selectVipCardTotalMoney(vips.get(0).getId())); |
| | | AjaxResult result= new AjaxResult(AjaxResult.STATUS_SUCCESS, vips, 0); |
| | | vips.get(0).setArrears(sysOrderService.findVipArrearsByVipId(vips.get(0).getId())); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, vips, 0); |
| | | return result; |
| | | }else{ |
| | | } else { |
| | | return AjaxResult.buildFailInstance("未查到询客户信息"); |
| | | } |
| | | |
| | |
| | | public @ResponseBody |
| | | AjaxResult addOrModify(SysVipInfo vipInfo) { |
| | | if (vipInfo.getId() != null) { |
| | | |
| | | try { |
| | | if (vipInfo.getPassWord() != null) { |
| | | vipInfo.setPassWord(EncrypUtil.getMD5(vipInfo.getPassWord())); |
| | | } |
| | | } catch (UnsupportedEncodingException | NoSuchAlgorithmException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return modify(vipInfoService, vipInfo, "会员信息"); |
| | | } else { |
| | | |
| | | try { |
| | | if (StringUtils.isNotBlank(vipInfo.getPassWord())) { |
| | | vipInfo.setPassWord(EncrypUtil.getMD5(vipInfo.getPassWord())); |
| | | } |
| | | vipInfo.setVipState(Dictionary.VIP_STATE_HY); |
| | | } catch (UnsupportedEncodingException | NoSuchAlgorithmException e) { |
| | | e.printStackTrace(); |
| | | } |
| | | vipInfo.setVipState(Dictionary.VIP_STATE_HY); |
| | | SysUsers users = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | vipInfo.setShopId(users.getShopId()); |
| | | if(vipInfo.getShopId()==null){ |
| | | vipInfo.setShopId(users.getShopId()); |
| | | } |
| | | return add(vipInfoService, vipInfo, "会员信息"); |
| | | } |
| | | } |
| | |
| | | @RequestMapping(value = "/del") |
| | | public @ResponseBody |
| | | AjaxResult del(String keys) { |
| | | |
| | | return remove(vipInfoService, keys); |
| | | List<Long> ids = StringUtils.strToCollToLong(keys, ","); |
| | | int i = vipInfoService.removeLogic(ids); |
| | | if (i > 0) { |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "成功删除" + i + "条数据"); |
| | | } else { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "删除失败"); |
| | | } |
| | | // return remove(vipInfoService, keys); |
| | | } |
| | | |
| | | /** |
| | |
| | | public @ResponseBody |
| | | AjaxResult getVipQuestions(Long id, HttpServletRequest request) { |
| | | // 获取会员所有的答案,分类型 |
| | | List<Question> questions = questionSerivce.findByVipId(id); |
| | | SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | List<Question> questions = questionSerivce.findByVipId(id, user.getCompanyId()); |
| | | request.setAttribute("questions", questions); |
| | | AjaxResult result = new AjaxResult(); |
| | | result.putInMap("questions", questions); |
| | |
| | | SystemDictionary dataDictionary = new SystemDictionary(); |
| | | // 获取到店途径 |
| | | dataDictionary.setType("到店途径"); |
| | | WebUtil.getRequest().setAttribute("ddtj", customerDataDictionaryDao.selectByParentCode("DDTJ",getMe().getCompanyId())); |
| | | WebUtil.getRequest().setAttribute("ddtj", customerDataDictionaryDao.selectByParentCode("DDTJ", getMe().getCompanyId())); |
| | | // 获取生肖 |
| | | dataDictionary.setType("生肖"); |
| | | WebUtil.getRequest().setAttribute("sx", dataDictionaryService.findByModel(dataDictionary)); |
| | |
| | | vipInfo.setVipState(Dictionary.VIP_STATE_HY); |
| | | vipInfo.setStaffId(getMe().getSuId()); |
| | | vipInfo.setShopId(getMe().getShopId()); |
| | | vipInfo.setCompanyId(getMe().getCompanyId()); |
| | | vipInfo.setVipType(Dictionary.VIP_TYPE_NOCARD); |
| | | vipInfoService.add(vipInfo); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "会员信息注册成功"); |
| | |
| | | @RequestMapping(value = "/findUserByPhoneOrNo") |
| | | public @ResponseBody |
| | | AjaxResult findUserByPhoneOrNo(String keyWord) { |
| | | LinkedList<SysVipInfo> userList = null; |
| | | // 获取最近查询客户 |
| | | if (WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER) == null) { |
| | | userList = new LinkedList<SysVipInfo>(); |
| | | WebUtil.getSession().setAttribute(SystemConstance.HISTORY_CUSTOMER, userList); |
| | | } else { |
| | | userList = (LinkedList<SysVipInfo>) WebUtil.getSession().getAttribute(SystemConstance.HISTORY_CUSTOMER); |
| | | } |
| | | List<SysVipInfo> vips = vipInfoService.findByVipNoOrTel(keyWord); |
| | | if (vips.size() > 0) { |
| | | // 在session存放当前查询的客户 |
| | | WebUtil.getSession().setAttribute(SystemConstance.CURRENT_CUSTOMER, vips.get(0)); |
| | | // 满20后删除一个 |
| | | if (userList.size() == 20) { |
| | | userList.poll(); |
| | | } |
| | | // 去重标志 |
| | | boolean isNoRepeat = true; |
| | | for (SysVipInfo sysVipInfo : userList) { |
| | | if (vips.get(0).getPhone().equals(sysVipInfo.getPhone())) { |
| | | isNoRepeat = false; |
| | | } |
| | | } |
| | | if (isNoRepeat) { |
| | | userList.add(vips.get(0)); |
| | | } |
| | | } |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, vips, 0); |
| | | |
| | | } |
| | |
| | | } |
| | | |
| | | @RequestMapping(value = "/exportExcel") |
| | | public void report(ModelMap model, HttpServletRequest request, HttpServletResponse response, |
| | | public void report( HttpServletResponse response, |
| | | SysVipInfo vipInfo) throws IOException { |
| | | |
| | | if (vipInfo.getVipType() != null && !(vipInfo.getVipType().equals(""))) { |
| | | vipInfo.setVipType(URLDecoder.decode(vipInfo.getVipType(), "UTF-8")); |
| | | } |
| | | if (vipInfo.getVipName() != null && !"".equals(vipInfo.getVipName())) { |
| | | vipInfo.setVipName(URLDecoder.decode(vipInfo.getVipName(), "UTF-8")); |
| | | } |
| | | if (vipInfo.getArrivalWay() != null && !"".equals(vipInfo.getArrivalWay())) { |
| | | vipInfo.setArrivalWay(URLDecoder.decode(vipInfo.getArrivalWay(), "UTF-8")); |
| | | } |
| | | if (vipInfo.getVipState() != null && !"".equals(vipInfo.getVipState())) { |
| | | vipInfo.setVipState(URLDecoder.decode(vipInfo.getVipState(), "UTF-8")); |
| | | SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | if(!DataAuthUtil.hasAllShopAuth()){ |
| | | vipInfo.setShopId(sysUsers.getShopId()); |
| | | } |
| | | |
| | | List<ExcelSheetPO> res = new ArrayList<>(); |
| | | ExcelSheetPO orderSheet = new ExcelSheetPO(); |
| | | String title = "每日单据明细"; |
| | | String title = "会员资料"; |
| | | orderSheet.setSheetName(title); |
| | | orderSheet.setTitle(title); |
| | | String[] header = {"会员编号", "姓名", "性别", "手机号码", "会员类型", "会员活跃度", "到店途径", "健康顾问", "所属门店"}; |
| | |
| | | return showList(vipInfoService, info, null); |
| | | } |
| | | |
| | | |
| | | |
| | | @RequestMapping(value = "/importVipInfo") |
| | | @ResponseBody |
| | | public AjaxResult importVipInfo(HttpServletResponse response, HttpServletRequest request, @RequestParam(value = "file", required = false) MultipartFile file) throws IOException { |
| | | |
| | | String fileName = file.getOriginalFilename(); |
| | | String dirPath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH); |
| | | String dirPath = fileStoragePath; |
| | | // String dirPath = "C:/Users/wzy19/Desktop/zq"; |
| | | File fileDir = new File(dirPath); |
| | | LogUtil.info("#----->{}#", fileDir.exists()); |
| | |
| | | public String toImportForm() { |
| | | return "admin/hive/vip/vipImport-form"; |
| | | } |
| | | |
| | | @RequestMapping(value = "/validFlagChange") |
| | | @ResponseBody |
| | | public AjaxResult validFlagChange(Long id) { |
| | | SysVipInfo sysVipInfo = vipInfoService.findById(id); |
| | | |
| | | if (sysVipInfo == null) { |
| | | return AjaxResult.buildFailInstance("用户不存在"); |
| | | } |
| | | |
| | | if (SysVipInfo.VALID_FLAG_Y == sysVipInfo.getValidFlag()) { |
| | | sysVipInfo.setValidFlag(SysVipInfo.VALID_FLAG_N); |
| | | } else { |
| | | sysVipInfo.setValidFlag(SysVipInfo.VALID_FLAG_Y); |
| | | } |
| | | |
| | | vipInfoService.modify(sysVipInfo); |
| | | return AjaxResult.buildSuccessInstance("设置成功"); |
| | | } |
| | | } |
| | |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | |
| | | import java.lang.reflect.Method; |
| | | |
| | |
| | | |
| | | /** |
| | | * 为查询对象加上当前登录人的门店和公司查询限制 |
| | | * |
| | | * @param queryObj |
| | | */ |
| | | public static void setQueryLimit(Object queryObj) { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | Class<Object> objClazz = (Class<Object>) queryObj.getClass(); |
| | | try { |
| | | Method setShopId = (Method) objClazz.getMethod("setShopId",Long.class); |
| | | setShopId.invoke(queryObj, sysUsers.getShopId()); |
| | | Method setCompanyId = (Method) objClazz.getMethod("setCompanyId",Long.class); |
| | | if (!AppConstance.USER_TYPE_ADMIN.equals(sysUsers.getSuUserType())) { |
| | | Method setShopId = (Method) objClazz.getMethod("setShopId", Long.class); |
| | | setShopId.invoke(queryObj, sysUsers.getShopId()); |
| | | } |
| | | Method setCompanyId = (Method) objClazz.getMethod("setCompanyId", Long.class); |
| | | setCompanyId.invoke(queryObj, sysUsers.getCompanyId()); |
| | | } catch (Exception e) { |
| | | LogUtil.error(e.getMessage(), e); |
| | | throw new GlobleException("系统参数错误007"); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 限制数据公司id |
| | | * |
| | | * @param queryObj |
| | | */ |
| | | public static void setQueryLimitCom(Object queryObj) { |
| | | SysUsers sysUsers = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY); |
| | | Class<Object> objClazz = (Class<Object>) queryObj.getClass(); |
| | | try { |
| | | Method setCompanyId = (Method) objClazz.getMethod("setCompanyId",Long.class); |
| | | Method setCompanyId = (Method) objClazz.getMethod("setCompanyId", Long.class); |
| | | setCompanyId.invoke(queryObj, sysUsers.getCompanyId()); |
| | | } catch (Exception e) { |
| | | LogUtil.error(e.getMessage(), e); |
| | | throw new GlobleException("系统参数错误008"); |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.common.bean.EntityDTOExt; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | /** |
| | | * |
| | | * @date 2019-03-24 23:55 |
| | | */ |
| | | public class AchieveNew implements Serializable{ |
| | | public class AchieveNew extends EntityDTOExt { |
| | | @Extend |
| | | private static final long serialVersionUID = 1L; |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | |
| | | @TableId(type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 美疗师id |
| | | * 美疗师id 把这个字段视为正式的业绩归属人 |
| | | */ |
| | | private Long beaultId; |
| | | |
| | |
| | | * 客户id |
| | | */ |
| | | private Long vipId; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 购买业绩 |
| | | */ |
| | | private Double goodsCash; |
| | | |
| | | private Double cardCash; |
| | | |
| | | /** |
| | | * 赠送消耗 |
| | |
| | | */ |
| | | private Double hisConsume; |
| | | |
| | | |
| | | /** |
| | | * 划扣金额 从卡中划扣钱买东西 |
| | | */ |
| | | private Double consume; |
| | | |
| | | |
| | | /** |
| | | * 卡项,套餐,充值,开会籍卡 |
| | | */ |
| | | private Double cardCash; |
| | | |
| | | |
| | | /** |
| | | * 现金单次,购买项目的业绩 |
| | | */ |
| | | private Double projCash; |
| | | |
| | | |
| | | /** |
| | | * 现金产品,购买家居产品的钱 |
| | | */ |
| | | private Double goodsCash; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | * 总金额 |
| | | */ |
| | | private Double zkTotal; |
| | | |
| | | /** |
| | | * 公司id |
| | | */ |
| | | private Long companyId; |
| | | |
| | | |
| | | private String t1; |
| | | |
| | | |
| | |
| | | |
| | | |
| | | /** |
| | | * 业绩种类 1-现金业绩 2-划扣业绩 |
| | | * 业绩类型 |
| | | */ |
| | | private String t3; |
| | | |
| | | |
| | | private String achieveType; |
| | | |
| | | |
| | | private String t4; |
| | | |
| | | |
| | |
| | | private String day; |
| | | |
| | | private String vipQueryKey; |
| | | |
| | | private Long achieveRuleId; |
| | | |
| | | |
| | | /** |
| | |
| | | * 开始时间 |
| | | */ |
| | | @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_MM) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date beginTime; |
| | | |
| | | |
| | |
| | | * 结束时间 |
| | | */ |
| | | @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_MM) |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date endTime; |
| | | |
| | | |
| | | /** |
| | | * 分配的业绩金额 |
| | | */ |
| | | @Extend |
| | | private Double achieveMoney; |
| | | |
| | | private String goodsNo; |
| | | |
| | | private String goodsName; |
| | | |
| | | private String type; |
| | | |
| | | private String payMethod; |
| | | |
| | | private String cateName; |
| | | |
| | | /** |
| | | * 业绩规则名称 |
| | | */ |
| | | private String achieveRuleName; |
| | | |
| | | public String getAchieveRuleName() { |
| | | return achieveRuleName; |
| | | } |
| | | |
| | | public void setAchieveRuleName(String achieveRuleName) { |
| | | this.achieveRuleName = achieveRuleName; |
| | | } |
| | | |
| | | public Double getCardCash() { |
| | | return cardCash; |
| | | } |
| | | |
| | | public void setCardCash(Double cardCash) { |
| | | this.cardCash = cardCash; |
| | | } |
| | | |
| | | public String getCateName() { |
| | | return cateName; |
| | | } |
| | | |
| | | public void setCateName(String cateName) { |
| | | this.cateName = cateName; |
| | | } |
| | | |
| | | public String getPayMethod() { |
| | | return payMethod; |
| | | } |
| | | |
| | | public void setPayMethod(String payMethod) { |
| | | this.payMethod = payMethod; |
| | | } |
| | | |
| | | public String getType() { |
| | | return type; |
| | |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public Double getAchieveMoney() { |
| | | return achieveMoney; |
| | | } |
| | | |
| | | public void setAchieveMoney(Double achieveMoney) { |
| | | this.achieveMoney = achieveMoney; |
| | | } |
| | | |
| | | public Date getBeginTime() { |
| | | return beginTime; |
| | |
| | | public void setHisConsume(Double hisConsume) { |
| | | this.hisConsume = hisConsume; |
| | | } |
| | | public Double getConsume() { |
| | | return consume; |
| | | } |
| | | public void setConsume(Double consume) { |
| | | this.consume = consume; |
| | | } |
| | | public Double getCardCash() { |
| | | return cardCash; |
| | | } |
| | | public void setCardCash(Double cardCash) { |
| | | this.cardCash = cardCash; |
| | | } |
| | | public Double getProjCash() { |
| | | return projCash; |
| | | } |
| | | public void setProjCash(Double projCash) { |
| | | this.projCash = projCash; |
| | | } |
| | | |
| | | |
| | | public Double getGoodsCash() { |
| | | return goodsCash; |
| | | } |
| | |
| | | public void setT2(String t2) { |
| | | this.t2 = t2; |
| | | } |
| | | public String getT3() { |
| | | return t3; |
| | | |
| | | public String getAchieveType() { |
| | | return achieveType; |
| | | } |
| | | public void setT3(String t3) { |
| | | this.t3 = t3; |
| | | |
| | | public void setAchieveType(String achieveType) { |
| | | this.achieveType = achieveType; |
| | | } |
| | | |
| | | public String getT4() { |
| | | return t4; |
| | | } |
| | |
| | | this.day = day; |
| | | } |
| | | |
| | | public Long getAchieveRuleId() { |
| | | return achieveRuleId; |
| | | } |
| | | |
| | | public void setAchieveRuleId(Long achieveRuleId) { |
| | | this.achieveRuleId = achieveRuleId; |
| | | } |
| | | |
| | | public String getOrderNo() { |
| | | return orderNo; |
| New file |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.matrix.system.hiveErp.pojo.AchieveRuleItem; |
| | | import com.matrix.system.score.entity.BaseEntity; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 业绩规则 |
| | | * @author JIANGYOUYAO |
| | | * @date 2021/6/3 0003 |
| | | */ |
| | | @Data |
| | | @TableName("achieve_rule") |
| | | public class AchieveRule extends BaseEntity { |
| | | |
| | | @NotEmpty(message = "规则名称不能为空") |
| | | private String name; |
| | | |
| | | |
| | | private String rules; |
| | | |
| | | private Long companyId; |
| | | |
| | | @TableField(exist=false) |
| | | @NotEmpty(message = "规则不能为空") |
| | | private List<AchieveRuleItem> ruleItemList; |
| | | |
| | | } |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.plugin.util.MoneyUtil; |
| | | import com.matrix.system.hive.pojo.MoneyCardUserVo; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * |
| | | * @date 2016-09-17 10:17 |
| | | */ |
| | | public class MoneyCardUse extends MoneyCardUserVo implements Serializable{ |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | public class MoneyCardUse { |
| | | |
| | | |
| | | @TableId(value = "id",type = IdType.AUTO) |
| | | private Long id; |
| | | |
| | | |
| | | |
| | | |
| | | private String createBy; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | private String updateBy; |
| | | |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date updateTime; |
| | | |
| | | /** |
| | | * 剩余次数 |
| | | */ |
| | | @TableField(exist = false) |
| | | String lastCountName; |
| | | /** |
| | | * 数据来源 |
| | | */ |
| | | @TableField(exist = false) |
| | | String sourceName; |
| | | |
| | | /*vo对象************/ |
| | | |
| | | /** |
| | | * 剩余次数 |
| | | */ |
| | | |
| | | private Integer lastCount; |
| | | |
| | | /** |
| | | * 来源,购买,转让,赠送 |
| | | */ |
| | | private String source; |
| | | /** |
| | | * 是会籍卡? Y 是,N否 |
| | | */ |
| | | private String isVipCar; |
| | | |
| | | /** |
| | | * 订单明细id |
| | | */ |
| | |
| | | private Integer useTotal; |
| | | |
| | | |
| | | /** |
| | | * 剩余次数 |
| | | */ |
| | | |
| | | private Integer lastCount; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 本金 |
| | |
| | | private String status; |
| | | |
| | | |
| | | /** |
| | | * 来源,购买,转让,赠送 |
| | | */ |
| | | private String source; |
| | | |
| | | |
| | | |
| | | /** |
| | |
| | | @JsonFormat(pattern = DateUtil.DATE_FORMAT_DD, timezone = "GMT+8") |
| | | @DateTimeFormat(pattern= DateUtil.DATE_FORMAT_DD) |
| | | private Date failTime; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 充值卡的id |
| | |
| | | /** |
| | | * 订单ID |
| | | */ |
| | | @TableField(exist = false) |
| | | private Long orderId; |
| | | |
| | | |
| | |
| | | */ |
| | | private String isOver; |
| | | |
| | | /** |
| | | * 是默认储值卡? Y 是,N否 |
| | | */ |
| | | private String isVipCar; |
| | | |
| | | /** |
| | | * 备注 |
| | | */ |
| | |
| | | /** |
| | | * 前台输入的退款金额 |
| | | */ |
| | | @TableField(exist = false) |
| | | private String returnMonery; |
| | | |
| | | /** |
| | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | /** |
| | | * 当大于10000时使用次数为不限,或者为会籍卡时 |
| | | * @return |
| | | */ |
| | | public String getLastCountName() { |
| | | if(getLastCount()==null){ |
| | | return ""; |
| | | } |
| | | if(Dictionary.FLAG_YES.equals(getIsVipCar())||getLastCount()>Dictionary.MAX_USE_COUNT_SIGN){ |
| | | lastCountName=Dictionary.MAX_USE_STRING; |
| | | }else{ |
| | | lastCountName=getLastCount().toString(); |
| | | } |
| | | return lastCountName; |
| | | } |
| | | |
| | | public String getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public void setCreateBy(String createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public void setUpdateBy(String updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public void setLastCountName(String lastCountName) { |
| | | this.lastCountName = lastCountName; |
| | | } |
| | | |
| | | public String getSourceName() { |
| | | if(getSource()==null){ |
| | | return ""; |
| | | } |
| | | if(getSource().contains(Dictionary.TAOCAN_SOURCE_ZS)){ |
| | | sourceName=Dictionary.FLAG_YES; |
| | | }else{ |
| | | sourceName=Dictionary.FLAG_NO;; |
| | | } |
| | | return sourceName; |
| | | } |
| | | |
| | | public void setSourceName(String sourceName) { |
| | | this.sourceName = sourceName; |
| | | } |
| | | |
| | | |
| | | public String getIsVipCar() { |
| | | return isVipCar; |
| | | } |
| | | |
| | | public void setIsVipCar(String isVipCar) { |
| | | this.isVipCar = isVipCar; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 扩展对象 |
| | | */ |
| | |
| | | /** |
| | | * 会员信息 |
| | | */ |
| | | @TableField(exist = false) |
| | | private SysVipInfo vipInfo; |
| | | |
| | | /** |
| | | * 调整说明 |
| | | */ |
| | | @Extend |
| | | @TableField(exist = false) |
| | | private String changeRemark; |
| | | |
| | | |
| | |
| | | this.changeRemark = changeRemark; |
| | | } |
| | | |
| | | public String getIsVipCar() { |
| | | return isVipCar; |
| | | } |
| | | |
| | | public void setIsVipCar(String isVipCar) { |
| | | this.isVipCar = isVipCar; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | |
| | | public void setId(Long id) { |
| | | this.id=id; |
| | | } |
| | | |
| | | |
| | | |
| | | public Long getOrderItemId() { |
| | | return orderItemId; |
| | | } |
| | | |
| | | |
| | | public void setOrderItemId(Long orderItemId) { |
| | | this.orderItemId=orderItemId; |
| | | } |
| | | |
| | | |
| | | |
| | | public Integer getUseTotal() { |
| | | return useTotal; |
| | | } |
| | | |
| | | |
| | | public void setUseTotal(Integer useTotal) { |
| | | this.useTotal=useTotal; |
| | | } |
| | | |
| | | |
| | | |
| | | public Integer getLastCount() { |
| | | return lastCount; |
| | | } |
| | | |
| | | |
| | | public void setLastCount(Integer lastCount) { |
| | | this.lastCount=lastCount; |
| | | } |
| | | |
| | | |
| | | |
| | | public Double getRealMoney() { |
| | | return realMoney; |
| | | } |
| | | |
| | | |
| | | public void setRealMoney(Double realMoney) { |
| | | this.realMoney=realMoney; |
| | | } |
| | | |
| | | |
| | | |
| | | public Double getGiftMoney() { |
| | | return giftMoney; |
| | | } |
| | | |
| | | |
| | | public void setGiftMoney(Double giftMoney) { |
| | | this.giftMoney=giftMoney; |
| | | } |
| | | |
| | | |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | |
| | | public void setStatus(String status) { |
| | | this.status=status; |
| | | } |
| | | |
| | | |
| | | |
| | | public String getSource() { |
| | | return source; |
| | | } |
| | | |
| | | |
| | | public void setSource(String source) { |
| | | this.source=source; |
| | | } |
| | | |
| | | |
| | | |
| | | public Date getFailTime() { |
| | | return failTime; |
| | | } |
| | | |
| | | |
| | | public void setFailTime(Date failTime) { |
| | | this.failTime=failTime; |
| | | } |
| | | |
| | | |
| | | |
| | | public Long getGoodsId() { |
| | | return goodsId; |
| | | } |
| | | |
| | | |
| | | public void setGoodsId(Long goodsId) { |
| | | this.goodsId=goodsId; |
| | | } |
| | | |
| | | |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId=vipId; |
| | | } |
| | | |
| | | |
| | | |
| | | public String getIsOver() { |
| | | return isOver; |
| | | } |
| | | |
| | | |
| | | public void setIsOver(String isOver) { |
| | | this.isOver=isOver; |
| | | } |
| | |
| | | return MoneyUtil.add(realMoney,giftMoney); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | /** |
| | |
| | | * 订单编号 |
| | | */ |
| | | private String orderNo; |
| | | |
| | | |
| | | /** |
| | | * 微信支付编号 |
| | | */ |
| | | private String payNo; |
| | | |
| | | |
| | | /** |
| | | * 操作员id |
| | |
| | | /** |
| | | * 创建时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm", timezone = "GMT+8") |
| | | private Date createTime; |
| | | |
| | | /** |
| | |
| | | public void setTimes(Integer times) { |
| | | this.times = times; |
| | | } |
| | | |
| | | public String getPayNo() { |
| | | return payNo; |
| | | } |
| | | |
| | | public void setPayNo(String payNo) { |
| | | this.payNo = payNo; |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 单会员是否只买一次 |
| | | */ |
| | | private String isOnce; |
| | | private Integer isOnce; |
| | | |
| | | /** |
| | | * 销售平台 |
| | |
| | | * 任选套餐是否无限次 N-否 Y-是 |
| | | */ |
| | | private String isInfinite; |
| | | /** |
| | | *业绩规则id |
| | | */ |
| | | private Long achieveRuleId; |
| | | |
| | | /** |
| | | *业绩规则名称 |
| | | */ |
| | | @Extend |
| | | private String achieveRuleName; |
| | | |
| | | /** |
| | | * 支付方式 1-充值本金 2-赠送金额 3-积分 |
| | | */ |
| | | private String payMethods; |
| | | |
| | | /** |
| | | * 是否合作项目 |
| | | */ |
| | | private Integer isCooperate; |
| | | |
| | | public Integer getIsCooperate() { |
| | | return isCooperate; |
| | | } |
| | | |
| | | public void setIsCooperate(Integer isCooperate) { |
| | | this.isCooperate = isCooperate; |
| | | } |
| | | |
| | | public String getAchieveRuleName() { |
| | | return achieveRuleName; |
| | | } |
| | | |
| | | public void setAchieveRuleName(String achieveRuleName) { |
| | | this.achieveRuleName = achieveRuleName; |
| | | } |
| | | |
| | | public Long getAchieveRuleId() { |
| | | return achieveRuleId; |
| | | } |
| | | |
| | | public void setAchieveRuleId(Long achieveRuleId) { |
| | | this.achieveRuleId = achieveRuleId; |
| | | } |
| | | |
| | | public String getPayMethods() { |
| | | return payMethods; |
| | |
| | | this.saleOffTime = saleOffTime; |
| | | } |
| | | |
| | | public String getIsOnce() { |
| | | |
| | | public Integer getIsOnce() { |
| | | return isOnce; |
| | | } |
| | | |
| | | public void setIsOnce(String isOnce) { |
| | | public void setIsOnce(Integer isOnce) { |
| | | this.isOnce = isOnce; |
| | | } |
| | | |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | |
| | | */ |
| | | public class SysOrder implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * 订单类型-销售订单 |
| | | */ |
| | | public static final int ORDER_TYPE_SEAL= 1; |
| | | |
| | | /** |
| | | * 订单类型-退款订单 |
| | | */ |
| | | public static final int ORDER_TYPE_REFUND= 2; |
| | | |
| | | /** |
| | | * 序号 |
| | |
| | | private Date orderTime; |
| | | |
| | | /** |
| | | * 收款 |
| | | * calculationType: 1, |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date payTime; |
| | |
| | | * 员工编号(美容顾问) 下单人id |
| | | */ |
| | | private Long staffId; |
| | | |
| | | /** |
| | | * 收银员姓名 |
| | | */ |
| | | @Extend |
| | | private String cashierName; |
| | | |
| | | |
| | | /** |
| | | * 收银员 |
| | | */ |
| | | private Long cashierId; |
| | | |
| | | /** |
| | | * 商机id |
| | | */ |
| | |
| | | /** |
| | | * 订单总价 |
| | | */ |
| | | private double total; |
| | | private Double total; |
| | | /** |
| | | * 折后价 |
| | | */ |
| | | private double zkTotal; |
| | | private Double zkTotal; |
| | | |
| | | /** |
| | | * 现金支付金额 |
| | | */ |
| | | private double cashPay; |
| | | private Double cashPay; |
| | | /** |
| | | * 现金支付金额 |
| | | */ |
| | | private double cardPay; |
| | | private Double cardPay; |
| | | /** |
| | | * 欠款金额 |
| | | */ |
| | | private double arrears; |
| | | private Double arrears; |
| | | |
| | | /** |
| | | * 店铺id |
| | |
| | | * 会员姓名 |
| | | */ |
| | | private String vipNo; |
| | | |
| | | |
| | | /** |
| | | * 订单类型1,销售订单,2退款订单 |
| | | */ |
| | | private Integer orderType; |
| | | |
| | | /* 会员手机号 |
| | | */ |
| | | private String vipPhone; |
| | | |
| | | |
| | | private String staffName; |
| | | |
| | |
| | | */ |
| | | private Integer times; |
| | | |
| | | |
| | | private String type; |
| | | |
| | | /** |
| | | * 原有订单ID 退款时使用 |
| | | */ |
| | | private Long oldOrderId; |
| | | |
| | | /** |
| | | * 该订单有退款 |
| | | */ |
| | | public static final Integer IS_HAS_REFUND_Y = 1; |
| | | |
| | | /** |
| | | * 该订单无退款 |
| | | */ |
| | | public static final Integer IS_HAS_REFUND_N = 2; |
| | | |
| | | /** |
| | | * 是否发生退款 1-是 2-否 |
| | | */ |
| | | private Integer isHasRefund; |
| | | |
| | | public String getCashierName() { |
| | | return cashierName; |
| | | } |
| | | |
| | | public void setCashierName(String cashierName) { |
| | | this.cashierName = cashierName; |
| | | } |
| | | |
| | | public Long getCashierId() { |
| | | return cashierId; |
| | | } |
| | | |
| | | public void setCashierId(Long cashierId) { |
| | | this.cashierId = cashierId; |
| | | } |
| | | |
| | | public Integer getIsHasRefund() { |
| | | return isHasRefund; |
| | | } |
| | | |
| | | public void setIsHasRefund(Integer isHasRefund) { |
| | | this.isHasRefund = isHasRefund; |
| | | } |
| | | |
| | | public Long getOldOrderId() { |
| | | return oldOrderId; |
| | |
| | | |
| | | public void setShopShortName(String shopShortName) { |
| | | this.shopShortName = shopShortName; |
| | | } |
| | | |
| | | public Integer getOrderType() { |
| | | return orderType; |
| | | } |
| | | |
| | | public void setOrderType(Integer orderType) { |
| | | this.orderType = orderType; |
| | | } |
| | | |
| | | public String getType() { |
| | |
| | | this.searchShop = searchShop; |
| | | } |
| | | |
| | | public double getArrears() { |
| | | public Double getArrears() { |
| | | return arrears; |
| | | } |
| | | |
| | | public void setArrears(double arrears) { |
| | | public void setArrears(Double arrears) { |
| | | this.arrears = arrears; |
| | | } |
| | | |
| | | public double getCardPay() { |
| | | public Double getCardPay() { |
| | | return cardPay; |
| | | } |
| | | |
| | | public void setCardPay(double cardPay) { |
| | | public void setCardPay(Double cardPay) { |
| | | this.cardPay = cardPay; |
| | | } |
| | | |
| | |
| | | public void setEndTimeVo(Date endTimeVo) { |
| | | this.endTimeVo = endTimeVo; |
| | | } |
| | | public double getCashPay() { |
| | | public Double getCashPay() { |
| | | return cashPay; |
| | | } |
| | | |
| | | public void setCashPay(double cashPay) { |
| | | public void setCashPay(Double cashPay) { |
| | | this.cashPay = cashPay; |
| | | } |
| | | |
| | |
| | | this.activity = activity; |
| | | } |
| | | |
| | | public double getTotal() { |
| | | public Double getTotal() { |
| | | return total; |
| | | } |
| | | |
| | | public void setTotal(double total) { |
| | | public void setTotal(Double total) { |
| | | this.total = total; |
| | | } |
| | | |
| | |
| | | this.changeId = changeId; |
| | | } |
| | | |
| | | public double getZkTotal() { |
| | | public Double getZkTotal() { |
| | | return zkTotal; |
| | | } |
| | | |
| | | public void setZkTotal(double zkTotal) { |
| | | public void setZkTotal(Double zkTotal) { |
| | | this.zkTotal = zkTotal; |
| | | } |
| | | |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | |
| | | * @author wzy |
| | | * @date 2021-01-07 |
| | | **/ |
| | | @Data |
| | | public class SysOrderFlow implements Serializable { |
| | | private static final long serialVersionUID = 7519131902836023680L; |
| | | |
| | |
| | | private Long vipId; |
| | | |
| | | private Long cardId; |
| | | /** |
| | | * 扩展字段-支付卡名称 |
| | | */ |
| | | @Extend |
| | | private String cardName; |
| | | |
| | | private String isGift; |
| | | |
| | |
| | | |
| | | private Long companyId; |
| | | |
| | | public String getOrderNo() { |
| | | return orderNo; |
| | | } |
| | | |
| | | public void setOrderNo(String orderNo) { |
| | | this.orderNo = orderNo; |
| | | } |
| | | |
| | | public Long getCardId() { |
| | | return cardId; |
| | | } |
| | | |
| | | public void setCardId(Long cardId) { |
| | | this.cardId = cardId; |
| | | } |
| | | |
| | | public String getIsGift() { |
| | | return isGift; |
| | | } |
| | | |
| | | public void setIsGift(String isGift) { |
| | | this.isGift = isGift; |
| | | } |
| | | |
| | | public String getCreateBy() { |
| | | return createBy; |
| | | } |
| | | |
| | | public void setCreateBy(String createBy) { |
| | | this.createBy = createBy; |
| | | } |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public String getUpdateBy() { |
| | | return updateBy; |
| | | } |
| | | |
| | | public void setUpdateBy(String updateBy) { |
| | | this.updateBy = updateBy; |
| | | } |
| | | |
| | | public Date getUpdateTime() { |
| | | return updateTime; |
| | | } |
| | | |
| | | public void setUpdateTime(Date updateTime) { |
| | | this.updateTime = updateTime; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getFlowNo() { |
| | | return flowNo; |
| | | } |
| | | |
| | | public void setFlowNo(String flowNo) { |
| | | this.flowNo = flowNo; |
| | | } |
| | | |
| | | public Long getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(Long orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public String getFlowContent() { |
| | | return flowContent; |
| | | } |
| | | |
| | | public void setFlowContent(String flowContent) { |
| | | this.flowContent = flowContent; |
| | | } |
| | | |
| | | public String getFlowType() { |
| | | return flowType; |
| | | } |
| | | |
| | | public void setFlowType(String flowType) { |
| | | this.flowType = flowType; |
| | | } |
| | | |
| | | public BigDecimal getAmount() { |
| | | return amount; |
| | | } |
| | | |
| | | public void setAmount(BigDecimal amount) { |
| | | this.amount = amount; |
| | | } |
| | | |
| | | public String getPayMethod() { |
| | | return payMethod; |
| | | } |
| | | |
| | | public void setPayMethod(String payMethod) { |
| | | this.payMethod = payMethod; |
| | | } |
| | | |
| | | public Long getVipId() { |
| | | return vipId; |
| | | } |
| | | |
| | | public void setVipId(Long vipId) { |
| | | this.vipId = vipId; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | } |
| | |
| | | private Integer count; |
| | | |
| | | |
| | | /** |
| | | * 退款数量 |
| | | */ |
| | | private Integer refundCount; |
| | | |
| | | |
| | | /** |
| | | * 是否为赠送和 是否 |
| | |
| | | * 欠款金额 |
| | | */ |
| | | private Double arrears; |
| | | |
| | | |
| | | |
| | | |
| | | //页面参数使用 |
| | | |
| | | /** |
| | | * 付款方式 |
| | | */ |
| | |
| | | */ |
| | | private Long cardId; |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 是否为综合卡创建的订单明细 |
| | | * 1是 |
| | |
| | | return preCount; |
| | | } |
| | | |
| | | public Integer getRefundCount() { |
| | | return refundCount; |
| | | } |
| | | |
| | | public void setRefundCount(Integer refundCount) { |
| | | this.refundCount = refundCount; |
| | | } |
| | | |
| | | public void setPreCount(int preCount) { |
| | | this.preCount = preCount; |
| | | } |
| | |
| | | /** |
| | | * 业绩计算 |
| | | */ |
| | | private List<AchieveNew> achaeveList; |
| | | private List<AchieveNew> achieveList; |
| | | |
| | | public List<AchieveNew> getAchaeveList() { |
| | | return achaeveList; |
| | | |
| | | public List<AchieveNew> getAchieveList() { |
| | | return achieveList; |
| | | } |
| | | |
| | | public void setAchaeveList(List<AchieveNew> achaeveList) { |
| | | this.achaeveList = achaeveList; |
| | | public void setAchieveList(List<AchieveNew> achieveList) { |
| | | this.achieveList = achieveList; |
| | | } |
| | | |
| | | public String getPayMethodDetail() { |
| | |
| | | * 床位 |
| | | */ |
| | | private Long bedId; |
| | | /** |
| | | * 床位 |
| | | */ |
| | | |
| | | private Long companyId; |
| | | |
| | | /** |
| | | * 主美疗师 |
| | | */ |
| | | private Long beauticianId; |
| | | |
| | | /** |
| | | * 员工编号(美容顾问) 下单人id |
| | | */ |
| | | private Long staffId; |
| | | /** |
| | | * 收银员姓名 |
| | | */ |
| | | @Extend |
| | | private String cashierName; |
| | | |
| | | |
| | | /** |
| | | * 收银员 |
| | | */ |
| | | private Long cashierId; |
| | | |
| | | /** |
| | | * 仪器 |
| | |
| | | @Extend |
| | | private String pageFlae; |
| | | |
| | | public Long getStaffId() { |
| | | return staffId; |
| | | } |
| | | |
| | | public void setStaffId(Long staffId) { |
| | | this.staffId = staffId; |
| | | } |
| | | |
| | | public String getCashierName() { |
| | | return cashierName; |
| | | } |
| | | |
| | | public void setCashierName(String cashierName) { |
| | | this.cashierName = cashierName; |
| | | } |
| | | |
| | | public Long getCashierId() { |
| | | return cashierId; |
| | | } |
| | | |
| | | public void setCashierId(Long cashierId) { |
| | | this.cashierId = cashierId; |
| | | } |
| | | |
| | | public Integer getOvertimeNotice() { |
| | | return overtimeNotice; |
| | |
| | | @Extend |
| | | private String updateRemark; |
| | | |
| | | /** |
| | | * 套餐/项目剩余次数 |
| | | */ |
| | | private Integer remainCount; |
| | | |
| | | public Integer getRemainCount() { |
| | | return remainCount; |
| | | } |
| | | |
| | | public void setRemainCount(Integer remainCount) { |
| | | this.remainCount = remainCount; |
| | | } |
| | | |
| | | public Long getOrderId() { |
| | | return orderId; |
| | |
| | | import com.matrix.core.anotations.Extend; |
| | | import com.matrix.core.pojo.EntityDTO; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.common.bean.EntityDTOExt; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Builder; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | | /**项目余次操作记录 |
| | | * @date 2016-07-03 20:53 |
| | | */ |
| | | @Data |
| | | public class SysProjUseFlow extends EntityDTO { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | |
| | | @Extend |
| | | private String endTime; |
| | | |
| | | public String getBeginTime() { |
| | | return beginTime; |
| | | } |
| | | |
| | | public void setBeginTime(String beginTime) { |
| | | this.beginTime = beginTime; |
| | | } |
| | | |
| | | public String getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | public void setEndTime(String endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Long getProjUseId() { |
| | | return projUseId; |
| | | } |
| | | |
| | | public void setProjUseId(Long projUseId) { |
| | | this.projUseId = projUseId; |
| | | } |
| | | |
| | | public Integer getSurplusCount() { |
| | | return surplusCount; |
| | | } |
| | | |
| | | public void setSurplusCount(Integer surplusCount) { |
| | | this.surplusCount = surplusCount; |
| | | } |
| | | |
| | | public String getIsOver() { |
| | | return isOver; |
| | | } |
| | | |
| | | public void setIsOver(String isOver) { |
| | | this.isOver = isOver; |
| | | } |
| | | |
| | | public Date getFailTime() { |
| | | return failTime; |
| | | } |
| | | |
| | | public void setFailTime(Date failTime) { |
| | | this.failTime = failTime; |
| | | } |
| | | |
| | | public Double getPrice() { |
| | | return price; |
| | | } |
| | | |
| | | public void setPrice(Double price) { |
| | | this.price = price; |
| | | } |
| | | |
| | | public String getStatus() { |
| | | return status; |
| | | } |
| | | |
| | | public void setStatus(String status) { |
| | | this.status = status; |
| | | } |
| | | |
| | | public Double getBalance() { |
| | | return balance; |
| | | } |
| | | |
| | | public void setBalance(Double balance) { |
| | | this.balance = balance; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public String getProjName() { |
| | | return projName; |
| | | } |
| | | |
| | | public void setProjName(String projName) { |
| | | this.projName = projName; |
| | | } |
| | | |
| | | public String getOptionType() { |
| | | return optionType; |
| | | } |
| | | |
| | | public void setOptionType(String optionType) { |
| | | this.optionType = optionType; |
| | | } |
| | | } |
| | |
| | | package com.matrix.system.hive.bean; |
| | | |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.google.gson.annotations.Expose; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.system.hive.plugin.util.ExcelAnnotation; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | | * @Title: SysVipInfo.java |
| | | * @Package com.zkingsoft.model |
| | | * @description |
| | | * @author jyy |
| | | * @email 18075895212@qq.com |
| | | * @date 2016年7月14日 上午10:59:29 |
| | | */ |
| | | |
| | | @Data |
| | | public class SysVipInfo implements Serializable { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | /** |
| | | * 是销售员 |
| | | */ |
| | | public static final int IS_SALES = 1; |
| | | /** |
| | | * 不是销售员 |
| | | */ |
| | | public static final int NOT_SALES = 2; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 1、成交客户 |
| | | * **/ |
| | |
| | | * 2、非成交客户 |
| | | * **/ |
| | | public static final int UNDEAL_VIP = 2; |
| | | |
| | | /** |
| | | * 生效 |
| | | */ |
| | | public static final int VALID_FLAG_Y = 1; |
| | | |
| | | /** |
| | | * 失效 |
| | | */ |
| | | public static final int VALID_FLAG_N = 2; |
| | | |
| | | /** |
| | | * 会员助记码 |
| | |
| | | |
| | | private SysOrder sysOrder; |
| | | |
| | | public String getProvince() { |
| | | return province; |
| | | } |
| | | /** |
| | | * 可提现金额 |
| | | */ |
| | | private Double withdrawalCash; |
| | | /** |
| | | *推广员等级 |
| | | */ |
| | | private Long salesmanGrade; |
| | | |
| | | public void setProvince(String province) { |
| | | this.province = province; |
| | | } |
| | | |
| | | public String getCity() { |
| | | return city; |
| | | } |
| | | |
| | | public void setCity(String city) { |
| | | this.city = city; |
| | | } |
| | | |
| | | public String getArea() { |
| | | return area; |
| | | } |
| | | |
| | | public void setArea(String area) { |
| | | this.area = area; |
| | | } |
| | | |
| | | public Long getRecommendId() { |
| | | return recommendId; |
| | | } |
| | | |
| | | public void setRecommendId(Long recommendId) { |
| | | this.recommendId = recommendId; |
| | | } |
| | | |
| | | public SysOrder getSysOrder() { |
| | | return sysOrder; |
| | | } |
| | | |
| | | public void setSysOrder(SysOrder sysOrder) { |
| | | this.sysOrder = sysOrder; |
| | | } |
| | | |
| | | public Integer getIsDeal() { |
| | | return isDeal; |
| | | } |
| | | |
| | | public void setIsDeal(Integer isDeal) { |
| | | this.isDeal = isDeal; |
| | | } |
| | | |
| | | public Long getParentId() { |
| | | return parentId; |
| | | } |
| | | |
| | | public void setParentId(Long parentId) { |
| | | this.parentId = parentId; |
| | | } |
| | | |
| | | public Date getCreateDistributionTime() { |
| | | return createDistributionTime; |
| | | } |
| | | |
| | | public void setCreateDistributionTime(Date createDistributionTime) { |
| | | this.createDistributionTime = createDistributionTime; |
| | | } |
| | | |
| | | public Date getHandleTime() { |
| | | return handleTime; |
| | | } |
| | | |
| | | public void setHandleTime(Date handleTime) { |
| | | this.handleTime = handleTime; |
| | | } |
| | | /** |
| | | * 用户昵称 |
| | | */ |
| | | private String nickName; |
| | | |
| | | |
| | | /** 扩展信息 **/ |
| | | /** |
| | | * 头像 |
| | | */ |
| | | private String avatarUrl; |
| | | |
| | | /** |
| | | * 性别 1、男 2、女 0、未知 |
| | | */ |
| | | private Integer gender; |
| | | |
| | | /** |
| | | * 用户所在国家 |
| | | */ |
| | | private String country; |
| | | |
| | | |
| | | |
| | | /** |
| | | * 用户是否授权 1、是 2、否 |
| | | */ |
| | | private Integer userIsAuthorize; |
| | | |
| | | |
| | | /** |
| | | * 绑定上级用户时间 |
| | | */ |
| | | private Date bindingParentTime; |
| | | |
| | | |
| | | /** |
| | | * 是否是销售员(1=是,2=否) |
| | | */ |
| | | private Integer isSales; |
| | | |
| | | /** |
| | | * 用户类型 1、待审核 2、审核通过 0、审核未通过 |
| | | */ |
| | | private Integer fenxiaoState; |
| | | |
| | | private String sessionKey; |
| | | |
| | | |
| | | /** |
| | | * 会员等级id |
| | | */ |
| | |
| | | * 页面上的入会时间 |
| | | */ |
| | | private String inDateVo; |
| | | |
| | | |
| | | /** |
| | | * 页面上的生日 |
| | | */ |
| | |
| | | /** |
| | | * 美疗师集合 |
| | | */ |
| | | @Expose(serialize = false) |
| | | private List<MyBeatician> beauticains; |
| | | |
| | | |
| | | /** |
| | | * 会员问卷信息-答案,传递数据使用 |
| | | */ |
| | | @Expose(serialize = false) |
| | | List<VipAnswer> vipAnswers; |
| | | |
| | | /** |
| | | * 会员标签 |
| | | */ |
| | | @Expose(serialize = false) |
| | | List<SysVipLabel> labels; |
| | | |
| | | public List<SysVipLabel> getLabels() { |
| | | return labels; |
| | | } |
| | | |
| | | public void setLabels(List<SysVipLabel> labels) { |
| | | this.labels = labels; |
| | | } |
| | | |
| | | public String getAge() { |
| | | return age; |
| | | } |
| | | |
| | | public void setAge(String age) { |
| | | this.age = age; |
| | | } |
| | | |
| | | public Long getCompanyId() { |
| | | return companyId; |
| | | } |
| | | |
| | | public void setCompanyId(Long companyId) { |
| | | this.companyId = companyId; |
| | | } |
| | | |
| | | public String getOpenId() { |
| | | return openId; |
| | | } |
| | | |
| | | public void setOpenId(String openId) { |
| | | this.openId = openId; |
| | | } |
| | | |
| | | public String getPayTotal() { |
| | | return payTotal; |
| | | } |
| | | |
| | | public void setPayTotal(String payTotal) { |
| | | this.payTotal = payTotal; |
| | | } |
| | | |
| | | public Integer getCostTotal() { |
| | | return costTotal; |
| | | } |
| | | |
| | | public void setCostTotal(Integer costTotal) { |
| | | this.costTotal = costTotal; |
| | | } |
| | | |
| | | public String getCostNum() { |
| | | return costNum; |
| | | } |
| | | |
| | | public void setCostNum(String costNum) { |
| | | this.costNum = costNum; |
| | | } |
| | | |
| | | public String getTimeStart() { |
| | | return timeStart; |
| | | } |
| | | |
| | | public void setTimeStart(String timeStart) { |
| | | this.timeStart = timeStart; |
| | | } |
| | | |
| | | public String getTimeEnd() { |
| | | return timeEnd; |
| | | } |
| | | |
| | | public void setTimeEnd(String timeEnd) { |
| | | this.timeEnd = timeEnd; |
| | | } |
| | | |
| | | public Integer getVipNum() { |
| | | return vipNum; |
| | | } |
| | | |
| | | public void setVipNum(Integer vipNum) { |
| | | this.vipNum = vipNum; |
| | | } |
| | | |
| | | |
| | | public String getPhoto() { |
| | | return photo; |
| | | } |
| | | |
| | | public void setPhoto(String photo) { |
| | | this.photo = photo; |
| | | } |
| | | |
| | | public String getYear() { |
| | | return year; |
| | | } |
| | | |
| | | public void setYear(String year) { |
| | | this.year = year; |
| | | } |
| | | |
| | | public boolean isQdSign() { |
| | | return qdSign; |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 会员所有的充值卡 |
| | | */ |
| | | @Expose(serialize = false,deserialize = false) |
| | | private List<MoneyCardUse> cards; |
| | | |
| | | |
| | | |
| | | |
| | | public List<MoneyCardUse> getCards() { |
| | | return cards; |
| | | } |
| | | |
| | | public void setCards(List<MoneyCardUse> cards) { |
| | | this.cards = cards; |
| | | } |
| | | |
| | | |
| | | |
| | |
| | | * 没签到false |
| | | */ |
| | | private boolean qdSign; |
| | | |
| | | private String name; |
| | | public String getName() { |
| | | return name; |
| | | } |
| | | |
| | | public void setName(String name) { |
| | | this.name = name; |
| | | } |
| | | private BigDecimal arrears; |
| | | |
| | | public boolean getQdSign() { |
| | | return qdSign; |
| | | } |
| | | |
| | | public void setQdSign(boolean qdSign) { |
| | | this.qdSign = qdSign; |
| | | } |
| | | |
| | | public String getUuid() { |
| | | return uuid; |
| | | } |
| | | |
| | | public void setUuid(String uuid) { |
| | | this.uuid = uuid; |
| | | } |
| | | |
| | | public String getDisease() { |
| | | return disease; |
| | | } |
| | | |
| | | public void setDisease(String disease) { |
| | | this.disease = disease; |
| | | } |
| | | |
| | | public Date getStartTime() { |
| | | return startTime; |
| | | } |
| | | |
| | | public Integer getRankType() { |
| | | return rankType; |
| | | } |
| | | |
| | | public void setRankType(Integer rankType) { |
| | | this.rankType = rankType; |
| | | } |
| | | |
| | | public void setStartTime(Date startTime) { |
| | | this.startTime = startTime; |
| | | } |
| | | |
| | | public Date getEndTime() { |
| | | return endTime; |
| | | } |
| | | |
| | | |
| | | |
| | | public void setEndTime(Date endTime) { |
| | | this.endTime = endTime; |
| | | } |
| | | |
| | | public Integer getRanking() { |
| | | return ranking; |
| | | } |
| | | |
| | | public void setRanking(Integer ranking) { |
| | | this.ranking = ranking; |
| | | } |
| | | |
| | | public String getEmail() { |
| | | return email; |
| | | } |
| | | |
| | | public void setEmail(String email) { |
| | | this.email = email; |
| | | } |
| | | |
| | | public String getShopName() { |
| | | return shopName; |
| | | } |
| | | |
| | | public String getInDateVo() { |
| | | return inDateVo; |
| | | } |
| | | |
| | | public void setInDateVo(String inDateVo) { |
| | | this.inDateVo = inDateVo; |
| | | } |
| | | |
| | | public String getBirthday1Vo() { |
| | | return birthday1Vo; |
| | | } |
| | | |
| | | public void setBirthday1Vo(String birthday1Vo) { |
| | | this.birthday1Vo = birthday1Vo; |
| | | } |
| | | |
| | | public void setShopName(String shopName) { |
| | | this.shopName = shopName; |
| | | } |
| | | |
| | | public Long getShopId() { |
| | | return shopId; |
| | | } |
| | | |
| | | public void setShopId(Long shopId) { |
| | | this.shopId = shopId; |
| | | } |
| | | public Long getStaffId() { |
| | | return staffId; |
| | | } |
| | | |
| | | public void setStaffId(Long staffId) { |
| | | this.staffId = staffId; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | public String getStaffName() { |
| | | return staffName; |
| | | } |
| | | |
| | | public void setStaffName(String staffName) { |
| | | this.staffName = staffName; |
| | | } |
| | | |
| | | public Long getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Long id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public String getVipNo() { |
| | | return vipNo; |
| | | } |
| | | |
| | | public void setVipNo(String vipNo) { |
| | | this.vipNo = vipNo; |
| | | } |
| | | |
| | | public String getVipName() { |
| | | return vipName; |
| | | } |
| | | |
| | | public void setVipName(String vipName) { |
| | | this.vipName = vipName; |
| | | } |
| | | |
| | | |
| | | public String getZjm() { |
| | | return zjm; |
| | | } |
| | | |
| | | public void setZjm(String zjm) { |
| | | this.zjm = zjm; |
| | | } |
| | | |
| | | public String getPhone() { |
| | | return phone; |
| | | } |
| | | |
| | | public void setPhone(String phone) { |
| | | this.phone = phone; |
| | | } |
| | | |
| | | |
| | | public String getSex() { |
| | | return sex; |
| | | } |
| | | |
| | | public void setSex(String sex) { |
| | | this.sex = sex; |
| | | } |
| | | |
| | | public Date getBirthday1() { |
| | | return birthday1; |
| | | } |
| | | |
| | | public void setBirthday1(Date birthday1) { |
| | | this.birthday1 = birthday1; |
| | | } |
| | | |
| | | public String getAddr() { |
| | | return addr; |
| | | } |
| | | |
| | | public void setAddr(String addr) { |
| | | this.addr = addr; |
| | | } |
| | | |
| | | public String getConstell() { |
| | | return constell; |
| | | } |
| | | |
| | | public void setConstell(String constell) { |
| | | this.constell = constell; |
| | | } |
| | | |
| | | public String getAnimalSign() { |
| | | return animalSign; |
| | | } |
| | | |
| | | public void setAnimalSign(String animalSign) { |
| | | this.animalSign = animalSign; |
| | | } |
| | | |
| | | public String getArrivalWay() { |
| | | return arrivalWay; |
| | | } |
| | | |
| | | public void setArrivalWay(String arrivalWay) { |
| | | this.arrivalWay = arrivalWay; |
| | | } |
| | | |
| | | public String getVipType() { |
| | | return vipType; |
| | | } |
| | | |
| | | public void setVipType(String vipType) { |
| | | this.vipType = vipType; |
| | | } |
| | | |
| | | public String getVipState() { |
| | | return vipState; |
| | | } |
| | | |
| | | public void setVipState(String vipState) { |
| | | this.vipState = vipState; |
| | | } |
| | | |
| | | public String getIsDelete() { |
| | | return isDelete; |
| | | } |
| | | |
| | | public void setIsDelete(String isDelete) { |
| | | this.isDelete = isDelete; |
| | | } |
| | | |
| | | public Integer getPointAll() { |
| | | return pointAll; |
| | | } |
| | | |
| | | public void setPointAll(Integer pointAll) { |
| | | this.pointAll = pointAll; |
| | | } |
| | | |
| | | public Double getCommissionAll() { |
| | | return commissionAll; |
| | | } |
| | | |
| | | public void setCommissionAll(Double commissionAll) { |
| | | this.commissionAll = commissionAll; |
| | | } |
| | | |
| | | public Date getInDate() { |
| | | return inDate; |
| | | } |
| | | |
| | | public void setInDate(Date inDate) { |
| | | this.inDate = inDate; |
| | | } |
| | | |
| | | public String getRemark() { |
| | | return remark; |
| | | } |
| | | |
| | | public void setRemark(String remark) { |
| | | this.remark = remark; |
| | | } |
| | | |
| | | public String getPassWord() { |
| | | return passWord; |
| | | } |
| | | |
| | | public void setPassWord(String passWord) { |
| | | this.passWord = passWord; |
| | | } |
| | | |
| | | |
| | | public Date getCreateTime() { |
| | | return createTime; |
| | | } |
| | | |
| | | public void setCreateTime(Date createTime) { |
| | | this.createTime = createTime; |
| | | } |
| | | |
| | | public Long getLevelId() { |
| | | return levelId; |
| | | } |
| | | |
| | | public void setLevelId(Long levelId) { |
| | | this.levelId = levelId; |
| | | } |
| | | |
| | | public SysVipLevel getVipLevel() { |
| | | return vipLevel; |
| | | } |
| | | |
| | | public void setVipLevel(SysVipLevel vipLevel) { |
| | | this.vipLevel = vipLevel; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | public String getStatu() { |
| | | return statu; |
| | | } |
| | | |
| | | public void setStatu(String statu) { |
| | | this.statu = statu; |
| | | } |
| | | |
| | | public Double getBalance() { |
| | | return balance; |
| | | } |
| | | |
| | | public void setBalance(Double balance) { |
| | | this.balance = balance; |
| | | } |
| | | |
| | | |
| | | |
| | | public MoneyCardUse getLevelCard() { |
| | | return levelCard; |
| | | } |
| | | |
| | | public void setLevelCard(MoneyCardUse levelCard) { |
| | | this.levelCard = levelCard; |
| | | } |
| | | |
| | | public String getBeatuyId() { |
| | | return beatuyId; |
| | | } |
| | | |
| | | public void setBeatuyId(String beatuyId) { |
| | | this.beatuyId = beatuyId; |
| | | } |
| | | |
| | | public List<MyBeatician> getBeauticains() { |
| | | return beauticains; |
| | | } |
| | | |
| | | public void setBeauticains(List<MyBeatician> beauticains) { |
| | | this.beauticains = beauticains; |
| | | } |
| | | |
| | | public String getBlood() { |
| | | return blood; |
| | | } |
| | | |
| | | public void setBlood(String blood) { |
| | | this.blood = blood; |
| | | } |
| | | |
| | | public String getSfCard() { |
| | | return sfCard; |
| | | } |
| | | |
| | | public void setSfCard(String sfCard) { |
| | | this.sfCard = sfCard; |
| | | } |
| | | |
| | | public String getLink() { |
| | | return link; |
| | | } |
| | | |
| | | public void setLink(String link) { |
| | | this.link = link; |
| | | } |
| | | |
| | | public String getMarry() { |
| | | return marry; |
| | | } |
| | | |
| | | public void setMarry(String marry) { |
| | | this.marry = marry; |
| | | } |
| | | |
| | | public String getVocation() { |
| | | return vocation; |
| | | } |
| | | |
| | | public void setVocation(String vocation) { |
| | | this.vocation = vocation; |
| | | } |
| | | |
| | | public List<VipAnswer> getVipAnswers() { |
| | | return vipAnswers; |
| | | } |
| | | |
| | | public void setVipAnswers(List<VipAnswer> vipAnswers) { |
| | | this.vipAnswers = vipAnswers; |
| | | } |
| | | |
| | | |
| | | public Integer getBirthdayType() { |
| | | return birthdayType; |
| | | } |
| | | |
| | | public void setBirthdayType(Integer birthdayType) { |
| | | this.birthdayType = birthdayType; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "SysVipInfo [id=" + id + ", vipNo=" + vipNo + ", vipName=" |
| | | + vipName + ", phone=" + phone + ", vipType=" + vipType |
| | | + ", shopName=" + shopName + ", vipState=" + vipState |
| | | + ", passWord=" + passWord + ", beatuyId=" + beatuyId |
| | | + ", sex=" + sex + ", birthday1=" + birthday1 + ", addr=" |
| | | + addr + ", constell=" + constell + ", animalSign=" |
| | | + animalSign + ", arrivalWay=" + arrivalWay + ", photo=" |
| | | + photo + ", pointAll=" + pointAll + ", commissionAll=" |
| | | + commissionAll + ", inDate=" + inDate + ", createTime=" |
| | | + createTime + ", remark=" + remark + ", staffId=" + staffId |
| | | + ", shopId=" + shopId + ", isDelete=" + isDelete + ", email=" |
| | | + email + ", blood=" + blood + ", sfCard=" + sfCard + ", link=" |
| | | + link + ", marry=" + marry + ", vocation=" + vocation |
| | | + ", levelId=" + levelId + ", uuid=" + uuid + ", balance=" |
| | | + balance + ", levelCard=" + levelCard + ", vipLevel=" |
| | | + vipLevel + ", staffName=" + staffName + ", inDateVo=" |
| | | + inDateVo + ", birthday1Vo=" + birthday1Vo + ", ranking=" |
| | | + ranking + ", startTime=" + startTime + ", endTime=" + endTime |
| | | + ", rankType=" + rankType + ", year=" + year + ", vipNum=" |
| | | + vipNum + ", timeStart=" + timeStart + ", timeEnd=" + timeEnd |
| | | + ", payTotal=" + payTotal + ", costTotal=" + costTotal |
| | | + ", costNum=" + costNum + ", openId=" + openId + ", statu=" |
| | | + statu + ", beauticains=" + beauticains + ", vipAnswers=" |
| | | + vipAnswers + ", cards=" + cards + ", qdSign=" + qdSign + "]"; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 生效标识 1-生效 2-失效 |
| | | */ |
| | | private Integer validFlag; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.vo.OrderDetailAchieveItemVo; |
| | | import com.matrix.system.app.vo.RankingVo; |
| | | import com.matrix.system.app.vo.UserAchieveVo; |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | | import com.matrix.system.hive.dto.AchieveNewStatisticsDto; |
| | | import com.matrix.system.hive.vo.AchieveNewStatisticsVo; |
| | | import com.matrix.system.hive.vo.DailyBeautyListVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | |
| | | |
| | | public interface AchieveNewDao{ |
| | | public interface AchieveNewDao extends BaseMapper<AchieveNew> { |
| | | |
| | | public int insert(@Param("item") AchieveNew achieveNew); |
| | | |
| | |
| | | |
| | | public List<AchieveNew> findSumDailyInfoNew(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | |
| | | List<AchieveNew> selectVipConsumeStatisticsList(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | List<Map<String, Object>> selectVipConsumeStatisticsList(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | int selectVipConsumeStatisticsTotal(@Param("record") AchieveNew achieveNew); |
| | | |
| | |
| | | List<AchieveNew> selectOrderItemAchieveByOrderId(Long orderId); |
| | | |
| | | List<RankingVo> selectStaffSaleAchieveRanking(@Param("record") AchieveNew achieveNew); |
| | | |
| | | int deleteByOrderId(@Param("orderId") Long orderId); |
| | | |
| | | List<AchieveNew> selectSaleManAchieveList(@Param("saleId") Long saleId, @Param("vipId") Long vipId, @Param("date") Date date); |
| | | |
| | | List<AchieveNew> selectBeautyManAchieveList(@Param("beautyId") Long beautyId, @Param("vipId") Long vipId, @Param("date") Date date); |
| | | |
| | | int updateAchieveNumOfPeople(@Param("list") List<AchieveNew> list, @Param("num") Double num); |
| | | |
| | | IPage<AchieveNewStatisticsVo> achieveNewStatistics(Page<AchieveNewStatisticsVo> page, @Param("record")AchieveNewStatisticsDto queryDto); |
| | | |
| | | void setPayMethod(@Param("paymethod") String paymethod, @Param("list") ArrayList<Long> ids); |
| | | |
| | | List<RankingVo> selectNumOfPeopleAchieveRanking(@Param("record") AchieveNew achieveNew); |
| | | |
| | | List<DailyBeautyListVo> selectDailyBeautyList(@Param("record") AchieveNew achieveNew, @Param("pageVo") PaginationVO pageVo); |
| | | int selectDailyBeautyListTotal(@Param("record") AchieveNew achieveNew); |
| | | |
| | | String selectPlInfoByVipIdAndDate(@Param("datatime") Date datatime, @Param("vipId") Long vipId); |
| | | } |
| New file |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.hive.bean.AchieveRule; |
| | | |
| | | /** |
| | | * 业绩规则dao |
| | | */ |
| | | public interface AchieveRuleDao extends BaseMapper<AchieveRule> { |
| | | |
| | | } |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.bean.MoneyCardUse; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | */ |
| | | |
| | | |
| | | public interface MoneyCardUseDao{ |
| | | public interface MoneyCardUseDao extends BaseMapper<MoneyCardUse> { |
| | | |
| | | public int insert(MoneyCardUse moneyCardUse); |
| | | |
| | |
| | | public Double selectVipCardTotalMoney(@Param("vipId") Long vipId); |
| | | |
| | | |
| | | List<MoneyCardUse> selectHasValidMoneyCardUse(); |
| | | |
| | | int updateInvalidMoneyCardUse(); |
| | | |
| | | void updateId(@Param("id")Long id, @Param("newId")Long i); |
| | | |
| | | int saveInTimeReceiptWare(@Param("storeReceiptWares") List<JSONObject> storeReceiptWares); |
| | | } |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.bean.MoneyCardUseFlow; |
| | | import com.matrix.system.shopXcx.api.dto.MoneyCardUseFlowDto; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | public List<MoneyCardUseFlow> selectInPage(@Param("record") MoneyCardUseFlow moneyCardUseFlow, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | public List<MoneyCardUseFlow> selectForWxInPage(@Param("record")MoneyCardUseFlowDto moneyCardUseFlowDto); |
| | | |
| | | public List<MoneyCardUseFlow> selectByModel(@Param("record") MoneyCardUseFlow moneyCardUseFlow); |
| | | |
| | | public int selectTotalRecord(@Param("record") MoneyCardUseFlow moneyCardUseFlow); |
| | | |
| | | public MoneyCardUseFlow selectById(Long id); |
| | | |
| | | int updateVipCardId(@Param("vipId") Long vipId, @Param("cardId") Long cardId); |
| | | |
| | | double selectCardUseAmount(Long cardId); |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.matrix.system.hive.bean.MoneyCardUse; |
| | | |
| | | /** |
| | | * @description 订单表 |
| | | */ |
| | | public interface MoneyCardUseV2Dao extends BaseMapper<MoneyCardUse> { |
| | | |
| | | |
| | | } |
| | |
| | | * @param type 问卷分类 |
| | | * @return |
| | | */ |
| | | public List<Question> selectVipAnswerAllByModel(@Param("id") Long id, @Param("type") String type); |
| | | public List<Question> selectVipAnswerAllByModel(@Param("id") Long id,@Param("companyId") Long companyId, @Param("type") String type); |
| | | |
| | | } |
| | |
| | | List<ShoppingGoodsListVo> selectShoppingGoodsApiInPage(@Param("record") ShoppingGoodsListDto shoppingGoodsListDto, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | int selectShopppingGoodsAipTotal(@Param("record") ShoppingGoodsListDto shoppingGoodsListDto); |
| | | |
| | | public List<ShoppingGoods> selectByIds(@Param("ids")List<Long> ids); |
| | | |
| | | int updateInvalidProduct(); |
| | | } |
| | |
| | | import com.matrix.system.shopXcx.api.vo.ErpOrderDetailVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | |
| | | List<ErpOrderDetailVo> selectErpOrderList(ErpOrderListDto erpOrderListDto); |
| | | |
| | | ErpOrderDetailVo findUserOrderById(Long orderId); |
| | | |
| | | BigDecimal selectArrearsByVipId(Long vipId); |
| | | } |
| | |
| | | Integer updateTimeByOrderId(@Param("orderId") Long orderId, @Param("payTime") Date payTime); |
| | | |
| | | Integer deleteByOrderId(@Param("orderId") Long orderId); |
| | | |
| | | } |
| | |
| | | */ |
| | | public List<SysOrderItem> selectByOrderId(@Param("orderId") Long orderId); |
| | | |
| | | public Integer selectByGoodsId(@Param("goodsId") Long goodsId); |
| | | public Integer selectByGoodsId(@Param("goodsId") Long goodsId,@Param("vipId") Long vipId); |
| | | |
| | | public List<SysOrderItem> selectItemByTime(@Param("shopId")Long shopId, @Param("time")Date time); |
| | | |
| | |
| | | List<OrderDetailItemVo> selectApiOrderDetailItemsByOrderId(@Param("orderId") Long orderId); |
| | | |
| | | List<ErpOrderDetailItemVo> selectErpOrderItemByOrderId(String orderId); |
| | | |
| | | List<SysOrderItem> selectDgd(); |
| | | } |
| | |
| | | import com.matrix.system.app.dto.ServiceOrderListDto; |
| | | import com.matrix.system.app.vo.ServiceOrderListVo; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.dto.ServiceOrderTimeDto; |
| | | import com.matrix.system.shopXcx.api.dto.ErpServiceOrderListDto; |
| | | import com.matrix.system.shopXcx.api.vo.ErpServiceOrderListVo; |
| | | import org.apache.ibatis.annotations.Param; |
| | |
| | | |
| | | public SysProjServices selectById(Long id); |
| | | |
| | | public void updateOrderTime(@Param("consumeTime") Date createTime, @Param("id") Long id); |
| | | public void updateOrderTime(@Param("serviceOrderTimeDto") ServiceOrderTimeDto serviceOrderTimeDto); |
| | | |
| | | List<ServiceOrderListVo> selectApiServiceOrderListInPage(@Param("record") ServiceOrderListDto serviceOrderListDto, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | |
| | | * @return |
| | | */ |
| | | int updateNoticeTimes(@Param("list")List<Long> noticedIds); |
| | | |
| | | List<SysProjServices> selectProjServicesByOrderItemId(@Param("itemId") Long itemId); |
| | | } |
| | |
| | | |
| | | public int updateTcStatus(@Param("id") Long id, @Param("status") String status); |
| | | |
| | | List<SysProjUse> selectHasValidProjUse(); |
| | | int updateInvalidProjUse(); |
| | | |
| | | List<SysProjUseFlow> selectProjUseFlow(@Param("record") SysProjUseFlow projUseFlow, @Param("pageVo")PaginationVO pageVo); |
| | | |
| | | Integer selectProjUseFlowTotal(@Param("record") SysProjUseFlow projUseFlow); |
| | | |
| | | List<SysProjUse> selectTaoCanListWithProj(@Param("record") SysProjUse sysProjUse); |
| | | |
| | | int selectTaocanCountForCourseAndInfinite(@Param("taocanId") Long taocanId, @Param("vipId") Long vipId); |
| | | } |
| | |
| | | public int selectTotalRecord(@Param("record") SysShopInfo sysShopInfo); |
| | | |
| | | public SysShopInfo selectById(Long id); |
| | | |
| | | |
| | | |
| | | public SysShopInfo selectByShopName(@Param("shopName") String shopName); |
| | | |
| | | public List<SysShopInfo> selectShopInfo(Long companyId); |
| | |
| | | package com.matrix.system.hive.dao; |
| | | |
| | | import org.apache.ibatis.annotations.Param; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import com.matrix.beauty.followup.entry.SysFollowup; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.bean.SysVipAlbum; |
| | | import com.matrix.system.hive.dto.FollowuListDto; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @description 客户相册 |
| | |
| | | public SysVipAlbum selectById(Long id); |
| | | |
| | | public SysVipAlbum selectForUpdate(Long id); |
| | | |
| | | |
| | | } |
| | |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | |
| | | /** |
| | |
| | | |
| | | public int update(SysVipInfo sysVipInfo); |
| | | |
| | | public int deleteByIds(@Param("list") List<Long> list); |
| | | |
| | | public int deleteById(Long id); |
| | | public int deleteLogicByIds(@Param("list") List<Long> list); |
| | | |
| | | public List<SysVipInfo> selectInPage(@Param("record") SysVipInfo sysVipInfo, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | |
| | | public int selectSecondTotalRecord(@Param("record") SysVipInfo sysVipInfo); |
| | | |
| | | |
| | | public SysVipInfo selectByPhone(String phone); |
| | | public SysVipInfo selectByPhone(@Param("phone") String phone,@Param("companyId") Long companyId); |
| | | |
| | | |
| | | |
| | |
| | | List<VipInfoListVo> selectVipAddressBookByList(@Param("record") VipInfoListDto vipInfoListDto); |
| | | |
| | | com.matrix.system.app.vo.VipInfoVo selectVipInfoById(@Param("id") Long id); |
| | | |
| | | public SysVipInfo findByOpenId(String openId); |
| | | |
| | | int unbundlingSaleMan(Long userId); |
| | | |
| | | int bindingRecommend(@Param("recommendId") Long recommendId,@Param("userId") Long userId); |
| | | |
| | | List<Map<String, Object>> selectVipArrearsStatistics(@Param("record") SysVipInfo sysVipInfo, @Param("pageVo") PaginationVO pageVo); |
| | | |
| | | Integer selectVipArrearsStatisticsTotal(@Param("record") SysVipInfo sysVipInfo); |
| | | } |
| New file |
| | |
| | | package com.matrix.system.hive.dto; |
| | | |
| | | import com.google.common.base.CaseFormat; |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class AchieveNewStatisticsDto extends BasePageQueryDto { |
| | | |
| | | //规则名称 |
| | | String achieveRuleId; |
| | | |
| | | |
| | | //业绩归属人id |
| | | String staffName; |
| | | |
| | | |
| | | //门店名称 |
| | | Long shopId; |
| | | |
| | | //公司id |
| | | Long companyId; |
| | | |
| | | //订单类型 |
| | | String orderType; |
| | | |
| | | String beginTimeStr; |
| | | |
| | | String endTimeStr; |
| | | |
| | | @Override |
| | | public void setSort(String sort) { |
| | | if(StringUtils.isNotBlank(sort)){ |
| | | if ("ruleName".equals(sort)) { |
| | | super.setSort("u.name"); |
| | | } else { |
| | | super.setSort(CaseFormat.LOWER_CAMEL.to |
| | | (CaseFormat.LOWER_UNDERSCORE, sort)); |
| | | } |
| | | }else{ |
| | | super.setSort(sort); |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | package com.matrix.system.hive.dto; |
| | | |
| | | import com.matrix.core.pojo.PaginationDto; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | /** 查询客户跟进记录 |
| | | * @author jyy |
| | | * @date 2021-01-27 |
| | | **/ |
| | | @Data |
| | | public class FollowuListDto extends PaginationDto { |
| | | |
| | | /** |
| | | * 客户id |
| | | */ |
| | | @NotNull |
| | | private Long vipId; |
| | | |
| | | /** |
| | | * 员工id |
| | | */ |
| | | private Long staffId; |
| | | /** |
| | | * 当前查询人 |
| | | */ |
| | | private Long selfStaff; |
| | | |
| | | /** |
| | | * 公司id |
| | | */ |
| | | private Long companyId; |
| | | |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.hive.dto; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | import javax.validation.constraints.NotEmpty; |
| | | import javax.validation.constraints.NotNull; |
| | | |
| | | @Data |
| | | @ApiModel(value = "ScoreChangeDto", description = "积分修改参数接收类") |
| | | public class ScoreChangeDto { |
| | | |
| | | @NotNull |
| | | @ApiModelProperty(value = "会员id", example = "1") |
| | | private Long vipId; |
| | | |
| | | @NotNull(message = "调整数量不能为空") |
| | | @ApiModelProperty(value = "调整数量", example = "1") |
| | | private Integer amount; |
| | | |
| | | @NotEmpty(message = "调整说明不能为空") |
| | | @ApiModelProperty(value = "调整说明", example = "线下兑换") |
| | | private String remarks; |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.hive.dto; |
| | | |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import lombok.Data; |
| | | import org.springframework.format.annotation.DateTimeFormat; |
| | | |
| | | import java.util.Date; |
| | | |
| | | @Data |
| | | public class ServiceOrderTimeDto { |
| | | |
| | | /** |
| | | * 服务单id |
| | | */ |
| | | private Long id; |
| | | /** |
| | | * 预约时间 |
| | | */ |
| | | @DateTimeFormat(pattern = DateUtil.DATE_FORMAT_MM) |
| | | private Date yyTime; |
| | | |
| | | /** |
| | | * 订单创建时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date createTime; |
| | | /** |
| | | * 订单划扣时间 |
| | | */ |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm") |
| | | private Date consumeTime; |
| | | |
| | | } |
| | |
| | | v2=v2==null ? 0:v2; |
| | | BigDecimal b1 = new BigDecimal(Double.toString(v1)); |
| | | BigDecimal b2 = new BigDecimal(Double.toString(v2)); |
| | | return b1.multiply(b2).doubleValue(); |
| | | return b1.multiply(b2).setScale(2,BigDecimal.ROUND_DOWN).doubleValue(); |
| | | } |
| | | |
| | | |
| | |
| | | |
| | | BigDecimal b1 = new BigDecimal(Double.toString(v1)); |
| | | BigDecimal b2 = new BigDecimal(Double.toString(v2)); |
| | | return b1.divide(b2, scale, BigDecimal.ROUND_HALF_DOWN).doubleValue(); |
| | | return b1.divide(b2, scale, BigDecimal.ROUND_DOWN).doubleValue(); |
| | | } |
| | | |
| | | /** |
| | |
| | | package com.matrix.system.hive.service; |
| | | |
| | | import java.util.List; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.app.vo.UserAchieveVo; |
| | | import com.matrix.system.hive.bean.AchieveNew; |
| | | import com.matrix.system.hive.bean.SysOrder; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.hive.plugin.util.BaseServices; |
| | | import com.matrix.system.hive.vo.DailyBeautyListVo; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * |
| | |
| | | |
| | | public void modifyAchieveTime(AchieveNew achieveNew); |
| | | |
| | | List<AchieveNew> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo); |
| | | List<Map<String, Object>> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo); |
| | | |
| | | int findVipConsumeStatisticsTotal(AchieveNew achieveNew); |
| | | |
| | |
| | | |
| | | public List<AchieveNew> findOrderItemAchieve(Long orderid); |
| | | |
| | | List<DailyBeautyListVo> findDailyBeautyList(AchieveNew achieveNew, PaginationVO pageVo); |
| | | int findDailyBeautyListTotal(AchieveNew achieveNew); |
| | | |
| | | } |
| New file |
| | |
| | | package com.matrix.system.hive.service; |
| | | |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.matrix.system.hive.bean.AchieveRule; |
| | | import com.matrix.system.hive.dao.AchieveRuleDao; |
| | | import com.matrix.system.hiveErp.pojo.AchieveRuleItem; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * 业绩规则服务 |
| | | * @author JIANGYOUYAO |
| | | * @date 2021/6/3 0003 |
| | | */ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class AchieveRuleService { |
| | | |
| | | AchieveRuleDao achieveRuleDao; |
| | | |
| | | |
| | | /** |
| | | * 根据id查询 AchieveRule |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public AchieveRule selectById(Long id){ |
| | | AchieveRule achieveRule = achieveRuleDao.selectById(id); |
| | | achieveRule.setRuleItemList(JSONUtil.toList(JSONUtil.parseArray(achieveRule.getRules()), AchieveRuleItem.class)); |
| | | return achieveRule; |
| | | } |
| | | |
| | | } |
| | |
| | | */ |
| | | public String getOrderCode(); |
| | | |
| | | String get32LenNumberCode(); |
| | | |
| | | public String getFlowCode(); |
| | | /** |
| | | * 生成一个加上typeName前缀的编号 |
| | | * typeName+时间戳+四位随机数 |
| | | * @param typeName |
| | | * @return |
| | | */ |
| | | public String getCodeByTyle(String typeName); |
| | | |
| | | /** |
| | | * 根据一定的规则返回一个随机编号。 |
| | |
| | | * luokai |
| | | * @return |
| | | */ |
| | | public List<Question> findByVipId(Long id); |
| | | public List<Question> findByVipId(Long id,Long companyId); |
| | | |
| | | |
| | | |
| | |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | | import javax.servlet.http.HttpSession; |
| | | import java.math.BigDecimal; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | */ |
| | | public int remove(List<Long> list); |
| | | |
| | | public int cancelOrder(Long id); |
| | | public void cancelOrder(Long id); |
| | | /** |
| | | * 根据id删除SysOrder |
| | | * |
| | |
| | | |
| | | List<RankingVo> findApiShopAchieveRanking(SysOrder sysOrder); |
| | | |
| | | BigDecimal findVipArrearsByVipId(Long vipId); |
| | | |
| | | } |
| | |
| | | */ |
| | | public int modifyCancelProjServices(SysProjServices projServices); |
| | | |
| | | /** |
| | | * 删除服务单中明细, 即项目/套餐 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | public int deleteProjServiceItemById(Long id); |
| | | |
| | | |
| | | /** |
| | | * 划扣 |
| | |
| | | List<ServiceOrderListVo> findApiServiceOrderListInPage(ServiceOrderListDto serviceOrderListDto, PaginationVO pageVo); |
| | | |
| | | int findApiServiceOrderListTotal(ServiceOrderListDto serviceOrderListDto); |
| | | |
| | | public boolean skipServiceOrderStep(String step); |
| | | |
| | | /** |
| | | * 确认服务单 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int confirmServiceOrder(Long id); |
| | | } |
| | |
| | | |
| | | |
| | | public List<SysProjUse> selectTaocanProjUse(Long id, String status); |
| | | |
| | | public List<SysProjUse> findTaocaoProjUseWithProj(SysProjUse sysProjUse); |
| | | |
| | | int findTaocanCountForCourseAndInfinite(Long taocanId, Long vipId); |
| | | } |
| | |
| | | import java.io.File; |
| | | import java.io.IOException; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * |
| | |
| | | * |
| | | */ |
| | | public int remove(List<Long> list); |
| | | |
| | | |
| | | /** |
| | | * 批量删除SysVipInfo |
| | | * |
| | | */ |
| | | public int removeLogic(List<Long> list); |
| | | |
| | | /** |
| | | * 根据id删除SysVipInfo |
| | |
| | | int apiModifyVip(ModifyVipDto modifyVipDto); |
| | | |
| | | VipInfoDetailVo findVipInfoDetail(Long id); |
| | | |
| | | |
| | | /** |
| | | * 设置为推广员 |
| | | * @param invitationId |
| | | */ |
| | | public int setToBeAnSalesman(Long userId,Long invitationId,long gradeId); |
| | | |
| | | SysVipInfo findByOpenId(String openId); |
| | | |
| | | List<Map<String, Object>> findVipArrearsStatistics(SysVipInfo sysVipInfo, PaginationVO pageVo); |
| | | |
| | | Integer findVipArrearsStatisticsTotal(SysVipInfo sysVipInfo); |
| | | } |
| New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: TaiYanAliyunSmsService.java |
| | | * packageName: com.matrix.system.hive.service |
| | | * date: 2021-10-28 11:18 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix.system.hive.service; |
| | | |
| | | import com.google.common.collect.Maps; |
| | | import com.matrix.core.tools.DateUtil; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.SmsUtils; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.service.BusParameterSettingService; |
| | | import com.matrix.system.hive.bean.SysBeauticianState; |
| | | import com.matrix.system.hive.bean.SysProjServices; |
| | | import com.matrix.system.hive.bean.SysShopInfo; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.scheduling.annotation.Async; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: TaiYanAliyunSmsService |
| | | * @packageName: com.matrix.system.hive.service |
| | | * @description: 肽妍短信提醒服务 |
| | | * @data: 2021-10-28 11:18 |
| | | **/ |
| | | @Service |
| | | @AllArgsConstructor |
| | | public class TaiYanAliyunSmsService { |
| | | |
| | | SysVipInfoDao vipInfoDao; |
| | | |
| | | SmsUtils smsUtils; |
| | | |
| | | SysShopInfoService shopInfoService; |
| | | |
| | | SysBeauticianStateService sysBeauticianStateService; |
| | | |
| | | BusParameterSettingService busParameterSettingService; |
| | | /** |
| | | * 预约成功短信提醒 |
| | | * |
| | | * @param services |
| | | */ |
| | | @Async |
| | | public void sendYycgNotice(SysProjServices services) { |
| | | //短信接口为肽妍公司定制,暂时写死 |
| | | if (chackSetting(services)) return; |
| | | |
| | | SysVipInfo sysVipInfo = vipInfoDao.selectById(services.getVipId()); |
| | | SysShopInfo shopInfo = shopInfoService.findById(services.getShopId()); |
| | | String date = DateUtil.dateFormatStr(new Date(), "yyyy年MM月dd日"); |
| | | LogUtil.debug("发送阿里云预约成功短信,手机号={}", sysVipInfo.getPhone()); |
| | | if (StringUtils.isNotBlank(sysVipInfo.getPhone())) { |
| | | HashMap<String, String> param = Maps.newHashMap(); |
| | | param.put("date", date); |
| | | param.put("tel", shopInfo.getShopTel()); |
| | | param.put("shopName", shopInfo.getShopName()); |
| | | smsUtils.sendSms(sysVipInfo.getPhone(), "SMS_226995798", param); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 项目划扣短信提醒 |
| | | * |
| | | * @param services |
| | | */ |
| | | @Async |
| | | public void sendHkNotice(SysProjServices services) { |
| | | if (chackSetting(services)) return; |
| | | |
| | | SysVipInfo sysVipInfo = vipInfoDao.selectById(services.getVipId()); |
| | | SysShopInfo shopInfo = shopInfoService.findById(services.getShopId()); |
| | | String date = DateUtil.dateFormatStr(new Date(), "yyyy年MM月dd日"); |
| | | |
| | | List<SysBeauticianState> items = sysBeauticianStateService.findBySerId(services.getId()); |
| | | for (SysBeauticianState item : items) { |
| | | if (item.getProjInfo() != null) { |
| | | String projName = item.getProjInfo().getName(); |
| | | LogUtil.debug("发送阿里云项目划扣短信,手机号={}", sysVipInfo.getPhone()); |
| | | if (StringUtils.isNotBlank(sysVipInfo.getPhone())) { |
| | | HashMap<String, String> param = Maps.newHashMap(); |
| | | param.put("date", date); |
| | | param.put("projName", projName); |
| | | param.put("count", item.getCount() + ""); |
| | | param.put("balanceCount", item.getProjUse().getSurplusCount() + ""); |
| | | param.put("tel", shopInfo.getShopTel()); |
| | | param.put("shopName", shopInfo.getShopName()); |
| | | smsUtils.sendSms(sysVipInfo.getPhone(), "SMS_226995796", param); |
| | | } |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | } |
| | | |
| | | private boolean chackSetting(SysProjServices services) { |
| | | //短信接口为肽妍公司定制,暂时写死 |
| | | if (services.getCompanyId() != 17L) { |
| | | return true; |
| | | } |
| | | if (!busParameterSettingService.isSettingOpen(AppConstance.OPEN_SMS_NOTICE, services.getCompanyId())) { |
| | | return true; |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | package com.matrix.system.hive.service.imp; |
| | | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.core.tools.WebUtil; |
| | | import com.matrix.system.app.vo.UserAchieveVo; |
| | | import com.matrix.system.common.bean.BusParameterSettings; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.dao.SysUsersDao; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.AchieveNewDao; |
| | | import com.matrix.system.hive.dao.ShoppingGoodsDao; |
| | | import com.matrix.system.hive.dao.SysBeauticianStateDao; |
| | | import com.matrix.system.hive.dao.SysProjUseDao; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.hive.service.AchieveNewService; |
| | | import com.matrix.system.hive.service.SysProjServicesService; |
| | | import com.matrix.system.hive.vo.DailyBeautyListVo; |
| | | import com.matrix.system.hiveErp.pojo.AchieveRuleItem; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | |
| | | @Autowired |
| | | private SysProjUseDao sysProjUseDao; |
| | | |
| | | @Autowired |
| | | private SysProjServicesService projServicesService; |
| | | |
| | | @Override |
| | | public int add(AchieveNew achieveNew) { |
| | |
| | | |
| | | Long achieveId = projServices.getCreateStaffId(); |
| | | |
| | | // 下单人是否计算消耗业绩 |
| | | boolean flag = projServicesService.skipServiceOrderStep(Dictionary.SALE_MAN_IS_CONSUME_ACHIEVE); |
| | | |
| | | |
| | | Set<Long> beautyIds = new HashSet<>(); |
| | | for (SysBeauticianState beauticianState : beauticianStateList) { |
| | | // 是否第一次计算改美疗师 |
| | | boolean isFirst = true; |
| | |
| | | achieveNew.setVipId(projServices.getVipId()); |
| | | // 是否为赠送业绩 |
| | | if (Dictionary.TAOCAN_SOURCE_ZS.equals(projUse.getSource())) { |
| | | |
| | | achieveNew.setFreeConsume(projUse.getPrice()*beauticianState.getCount()); |
| | | //计算提成 |
| | | achieveNew.setProjPercentage( |
| | | calculationProjPercentage(AchieveRuleItem.ACHIEVE_TYPE_ZS,achieveNew.getFreeConsume(),beauticianState.getProjId())); |
| | | |
| | | } else { |
| | | achieveNew.setHisConsume(projUse.getPrice()*beauticianState.getCount()); |
| | | achieveNew.setHisConsume(new BigDecimal(projUse.getPrice()*beauticianState.getCount()).setScale(2, BigDecimal.ROUND_HALF_DOWN).doubleValue()); |
| | | //计算提成 |
| | | achieveNew.setProjPercentage( |
| | | calculationProjPercentage(AchieveRuleItem.ACHIEVE_TYPE_BJ,achieveNew.getHisConsume(),beauticianState.getProjId())); |
| | | } |
| | | achieveNew.setT2(projUse.getSource()); |
| | | achieveNew.setDatatime(new Date()); |
| | |
| | | achieveNew.setShopId(projServices.getShopId()); |
| | | achieveNew.setCompanyId(projServices.getCompanyId()); |
| | | achieveNew.setShoppingGoodsId(projUse.getProjId()); |
| | | achieveNew.setNumberOfPeople(1D / size); |
| | | |
| | | |
| | | if (flag) { |
| | | // if (!achieveId.equals(beauticianState.getStaffId())) { |
| | | AchieveNew saleManAchieve = new AchieveNew(); |
| | | BeanUtils.copyProperties(achieveNew, saleManAchieve); |
| | | saleManAchieve.setBeaultId(achieveId); |
| | | |
| | | saleAchieveNumOfPeople(saleManAchieve); |
| | | //销售人员不计算项目提成 |
| | | saleManAchieve.setProjPercentage(0D); |
| | | achieveNewList.add(saleManAchieve); |
| | | // } |
| | | } |
| | | |
| | | // List<AchieveNew> beautyList = achieveNewDao.selectBeautyManAchieveList(beauticianState.getStaffId(), projServices.getVipId(), new Date()); |
| | | // if (CollUtil.isEmpty(beautyList)) { |
| | | // achieveNew.setNumberOfPeople(1D / size); |
| | | // } else { |
| | | // achieveNew.setNumberOfPeople(1D / (size + beautyList.size())); |
| | | // achieveNewDao.updateAchieveNumOfPeople(beautyList, achieveNew.getNumberOfPeople()); |
| | | // } |
| | | |
| | | achieveNew.setProjNum(1); |
| | | if (StringUtils.isNotBlank(beauticianState.getExtract())) { |
| | | achieveNew.setProjPercentage(Double.parseDouble(beauticianState.getExtract())); |
| | | } |
| | | if (isFirst && beauticianState.getEndTime() != null && beauticianState.getBeginTime() != null) { |
| | | long timeSpace = beauticianState.getEndTime().getTime() - beauticianState.getBeginTime().getTime(); |
| | | if (timeSpace > 0) { |
| | | achieveNew.setProjTime((int) (timeSpace / 1000 / 60)); |
| | | } else { |
| | | achieveNew.setProjTime(1); |
| | | } |
| | | // long timeSpace = beauticianState.getEndTime().getTime() - beauticianState.getBeginTime().getTime(); |
| | | // if (timeSpace > 0) { |
| | | // achieveNew.setProjTime((int) (timeSpace / 1000 / 60)); |
| | | // } else { |
| | | // achieveNew.setProjTime(1); |
| | | // } |
| | | achieveNew.setProjTime(beauticianState.getExcTime()); |
| | | isFirst = false; |
| | | } |
| | | |
| | | beautyIds.add(achieveNew.getBeaultId()); |
| | | achieveNewList.add(achieveNew); |
| | | } |
| | | |
| | | if (CollectionUtils.isNotEmpty(achieveNewList)) { |
| | | achieveNewDao.batchInsert(achieveNewList); |
| | | achieveNumOfPeople(beautyIds, projServices.getVipId()); |
| | | } |
| | | |
| | | } |
| | | |
| | | @Autowired |
| | | AchieveRuleDao achieveRuleDao; |
| | | |
| | | private Double calculationProjPercentage(int type, Double consume, Long goodsId) { |
| | | ShoppingGoods shoppingGoods = shoppingGoodsDao.selectById(goodsId); |
| | | if(shoppingGoods.getAchieveRuleId()!=null){ |
| | | |
| | | AchieveRule achieveRule = achieveRuleDao.selectById(shoppingGoods.getAchieveRuleId()); |
| | | if(achieveRule!=null){ |
| | | List<AchieveRuleItem> achieveRuleItems = JSONUtil.toList(JSONUtil.parseArray(achieveRule.getRules()), AchieveRuleItem.class); |
| | | double percentage=0D; |
| | | for(AchieveRuleItem item:achieveRuleItems){ |
| | | if(item.getAchieveType()==type |
| | | && (item.getLower() == consume |
| | | || (item.getLower()< consume && consume < item.getUpper() ))){ |
| | | |
| | | if(AchieveRuleItem.ACHIEVE_TYPE_FIXED==item.getCalculationType()){ |
| | | percentage=item.getAchieve(); |
| | | }else{ |
| | | percentage= consume * (item.getAchieve()/100); |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | return percentage; |
| | | } |
| | | } |
| | | return 0D; |
| | | } |
| | | |
| | | /** |
| | | * 顾问人头业绩 |
| | | * @param achieveNew |
| | | */ |
| | | private void saleAchieveNumOfPeople(AchieveNew achieveNew) { |
| | | List<AchieveNew> saleList = achieveNewDao.selectSaleManAchieveList(achieveNew.getSaleId(), achieveNew.getVipId(), new Date()); |
| | | if (CollUtil.isEmpty(saleList)) { |
| | | achieveNew.setNumberOfPeople(1D); |
| | | } else { |
| | | achieveNew.setNumberOfPeople(1D / (1D + saleList.size())); |
| | | achieveNewDao.updateAchieveNumOfPeople(saleList, achieveNew.getNumberOfPeople()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * |
| | | * 合并订单与服务单人头逻辑,即每一个客户对美疗师/顾问来说,每一天同一个客户只算一个人头。 |
| | | * 如若A给客户X下订单,并给客户X服务,对A来说只算一个人头 |
| | | */ |
| | | private void achieveNumOfPeople(Set<Long> beautyIds, Long vipId) { |
| | | for (Long userId : beautyIds) { |
| | | double num; |
| | | List<AchieveNew> achieveNewList = achieveNewDao.selectBeautyManAchieveList(userId, vipId, new Date()); |
| | | |
| | | if (CollUtil.isEmpty(achieveNewList)) { |
| | | num = 1D; |
| | | } else { |
| | | num = 1D / achieveNewList.size(); |
| | | } |
| | | |
| | | if (CollUtil.isNotEmpty(achieveNewList)) { |
| | | achieveNewDao.updateAchieveNumOfPeople(achieveNewList, num); |
| | | } |
| | | } |
| | | |
| | | } |
| | |
| | | @Override |
| | | public void addAchaeveByOrder(SysOrder pageOrder) { |
| | | List<AchieveNew> achieveNewList = new ArrayList<>(); |
| | | Set<Long> beautyIds = new HashSet<>(); |
| | | if (CollectionUtils.isNotEmpty(pageOrder.getItems())) { |
| | | for (SysOrderItem orderItem : pageOrder.getItems()) { |
| | | |
| | | if (orderItem != null && CollectionUtils.isNotEmpty(orderItem.getAchaeveList())) { |
| | | if (orderItem != null && CollectionUtils.isNotEmpty(orderItem.getAchieveList())) { |
| | | |
| | | for (AchieveNew achieveNew : orderItem.getAchaeveList()) { |
| | | if (achieveNew !=null && achieveNew.getT1()!=null) { |
| | | for (AchieveNew achieveNew : orderItem.getAchieveList()) { |
| | | if (achieveNew !=null && achieveNew.getGoodsCash()!=null) { |
| | | buildAchieve(pageOrder, orderItem, achieveNew); |
| | | // 新增美疗师业绩 |
| | | achieveNewList.add(achieveNew); |
| | | |
| | | beautyIds.add(achieveNew.getBeaultId()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | if (CollectionUtils.isNotEmpty(achieveNewList)) { |
| | | achieveNewDao.batchInsert(achieveNewList); |
| | | if (!beautyIds.isEmpty()) { |
| | | achieveNumOfPeople(beautyIds, pageOrder.getVipId()); |
| | | } |
| | | } |
| | | } |
| | | |
| | | @Autowired |
| | | ShoppingGoodsDao shoppingGoodsDao; |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | private void buildAchieve(SysOrder pageOrder, SysOrderItem orderItem, AchieveNew achieveNew) { |
| | | BusParameterSettings shopManageJjcpasConsume =null; |
| | | if (Dictionary.ORDER_STATU_TK.equals(pageOrder.getStatu())) { |
| | | achieveNew.setId(null); |
| | | achieveNew.setProjPercentage(0 - achieveNew.getProjPercentage()); |
| | | achieveNew.setT1((0 - Double.parseDouble(achieveNew.getT1())) + ""); |
| | | achieveNew.setGoodsCash(0 - achieveNew.getGoodsCash()); |
| | | } |
| | | |
| | | achieveNew.setVipId(pageOrder.getVipId()); |
| | | achieveNew.setSaleId(pageOrder.getStaffId()); |
| | | if(achieveNew.getSaleId()==null){ |
| | | achieveNew.setSaleId(pageOrder.getStaffId()); |
| | | } |
| | | |
| | | |
| | | if (pageOrder.getPayTime() != null) { |
| | | achieveNew.setDatatime(pageOrder.getPayTime()); |
| | | } else { |
| | | achieveNew.setDatatime(new Date()); |
| | | } |
| | | if(Dictionary.SHOPPING_GOODS_TYPE_JJCP.equals(orderItem.getShoppingGoods().getGoodType())){ |
| | | if(shopManageJjcpasConsume==null){ |
| | | shopManageJjcpasConsume = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.SHOP_MANAGE_JJCPAS_CONSUME, pageOrder.getCompanyId()); |
| | | } |
| | | if(AppConstance.IS_Y.equals(shopManageJjcpasConsume.getParamValue())){ |
| | | achieveNew.setHisConsume(achieveNew.getGoodsCash()); |
| | | } |
| | | |
| | | } |
| | | |
| | | // 设置顾问人头业绩 |
| | | // saleAchieveNumOfPeople(achieveNew); |
| | | |
| | | achieveNew.setOrderType(Dictionary.ORDER_TYPE_SEAL); |
| | | achieveNew.setOrderId(pageOrder.getId()); |
| | | achieveNew.setOrderItemId(orderItem.getId()); |
| | |
| | | achieveNew.setShoppingGoodsId(orderItem.getGoodsId()); |
| | | // 是否赠送 |
| | | achieveNew.setT2(orderItem.getIsFree()); |
| | | // 根据商品类型设置业绩类型 |
| | | |
| | | if (Dictionary.ACHIEVE_TYPE_CASH.equals(achieveNew.getT3())){ |
| | | achieveNew.setCardCash(Double.parseDouble(achieveNew.getT1())); |
| | | } else { |
| | | // 设置划扣金额 |
| | | achieveNew.setConsume(Double.parseDouble(achieveNew.getT1())); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | |
| | | } |
| | | |
| | | @Override |
| | | public List<AchieveNew> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo) { |
| | | public List<Map<String, Object>> findVipConsumeStatisticsList(AchieveNew achieveNew, PaginationVO pageVo) { |
| | | return achieveNewDao.selectVipConsumeStatisticsList(achieveNew, pageVo); |
| | | } |
| | | |
| | |
| | | // 本日 |
| | | case 1 : |
| | | break; |
| | | // 昨日 |
| | | // 昨日 |
| | | case 2: |
| | | startTime = DateUtil.previousNDate(startTime, 1); |
| | | endTime = startTime; |
| | | break; |
| | | // 本月 |
| | | // 本月 |
| | | case 3: |
| | | calendar.set(Calendar.DAY_OF_MONTH, 1); |
| | | startTime = calendar.getTime(); |
| | | break; |
| | | // 上月 |
| | | // 上月 |
| | | case 4: |
| | | calendar.add(Calendar.MONTH, -1); |
| | | calendar.set(Calendar.DAY_OF_MONTH, 1); |
| | |
| | | public List<AchieveNew> findOrderItemAchieve(Long orderId) { |
| | | return achieveNewDao.selectOrderItemAchieveByOrderId(orderId); |
| | | } |
| | | |
| | | @Override |
| | | public List<DailyBeautyListVo> findDailyBeautyList(AchieveNew achieveNew, PaginationVO pageVo) { |
| | | List<DailyBeautyListVo> list = achieveNewDao.selectDailyBeautyList(achieveNew, pageVo); |
| | | if (CollUtil.isNotEmpty(list)) { |
| | | for (DailyBeautyListVo item : list) { |
| | | String pl = achieveNewDao.selectPlInfoByVipIdAndDate(item.getDatatime(), item.getVipId()); |
| | | item.setProjInfo(pl); |
| | | } |
| | | } |
| | | return list; |
| | | } |
| | | |
| | | @Override |
| | | public int findDailyBeautyListTotal(AchieveNew achieveNew) { |
| | | return achieveNewDao.selectDailyBeautyListTotal(achieveNew); |
| | | } |
| | | } |
| zq-erp/src/main/java/com/matrix/system/hive/service/imp/CodeServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/MoneyCardUseServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/QuestionServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/ShoppingGoodsServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysGoodsServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysOrderServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjUseServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysWorktimeServiceImpl.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/AchieveAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderFlowAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/OrderStatisticsAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/ProjUseStatisticsAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/ServiceStatisticsAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/StatisticsBusinessDataJob.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/SysBusinessDataAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/VipStatisticsAction.java
zq-erp/src/main/java/com/matrix/system/hive/statistics/moneyCardUseStatisticsAction.java
zq-erp/src/main/java/com/matrix/system/hive/vo/AchieveNewStatisticsVo.java
zq-erp/src/main/java/com/matrix/system/hive/vo/BjOrderVo.java
zq-erp/src/main/java/com/matrix/system/hive/vo/DailyBeautyListVo.java
zq-erp/src/main/java/com/matrix/system/hive/vo/OrderFlowVo.java
zq-erp/src/main/java/com/matrix/system/hive/vo/ServiceOrderInfoVo.java
zq-erp/src/main/java/com/matrix/system/hiveErp/action/AchieveRuleAction.java
zq-erp/src/main/java/com/matrix/system/hiveErp/action/DataAnalysisCustomer.java
zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpOrderController.java
zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpShopInfoController.java
zq-erp/src/main/java/com/matrix/system/hiveErp/action/ErpVipInfoController.java
zq-erp/src/main/java/com/matrix/system/hiveErp/action/OperationLogController.java
zq-erp/src/main/java/com/matrix/system/hiveErp/dao/TjVipSumDao.java
zq-erp/src/main/java/com/matrix/system/hiveErp/pojo/AchieveRuleItem.java
zq-erp/src/main/java/com/matrix/system/job/InvalidTimeJob.java
zq-erp/src/main/java/com/matrix/system/job/ServiceOvertimeNoticeJob.java
zq-erp/src/main/java/com/matrix/system/oa/actions/OaFixedAssetsAction.java
zq-erp/src/main/java/com/matrix/system/score/action/ScoreRuleSettingAction.java
zq-erp/src/main/java/com/matrix/system/score/constant/ScoreSettingConstant.java
zq-erp/src/main/java/com/matrix/system/score/dao/ScoreUseRecordDao.java
zq-erp/src/main/java/com/matrix/system/score/dao/ScoreVipDetailDao.java
zq-erp/src/main/java/com/matrix/system/score/dto/ScoreRuleSettingDto.java
zq-erp/src/main/java/com/matrix/system/score/dto/SocreRuleDto.java
zq-erp/src/main/java/com/matrix/system/score/entity/BaseEntity.java
zq-erp/src/main/java/com/matrix/system/score/entity/ScoreUseRecord.java
zq-erp/src/main/java/com/matrix/system/score/entity/ScoreVipDetail.java
zq-erp/src/main/java/com/matrix/system/score/mapper/ScoreRuleSettingMapper.java
zq-erp/src/main/java/com/matrix/system/score/scheduledJob/ScoreScheduledJob.java
zq-erp/src/main/java/com/matrix/system/score/service/ScoreRuleSettingService.java
zq-erp/src/main/java/com/matrix/system/score/service/ScoreVipDetailService.java
zq-erp/src/main/java/com/matrix/system/score/vo/ScoreRuleSettingsVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopActivitiesAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopBizUserScoreAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopDeliveryInfoAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopOrderAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopPageAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopProductAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopRefundRecordAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopShoppingCartAction.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatApiTools.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatGzhApiTools.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/WxUserAction.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WXShopOrderAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxBindingPhoneNumber.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCollectionAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxCommonAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxErpOrderAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxGetAcodeAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxInvoiceAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxMoneyCardUseAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductAttributeAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxProductCommentAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxReceiveAddressAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxRefundRecordAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesOrderAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesProductAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesWithdrawalAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSalesmanAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxScoreProductAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShareProductAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesGroupBuyController.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesLuckydrawAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSalonAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSecKillAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopActivitiesSignAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopCouponAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopLogisticsQueryAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopProduct.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShopScoreAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxShoppingCartAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxSkinCheckAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserSearchRecord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ApplyToBeAnSalesmanDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ClickSignDTO.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/MoneyCardUseFlowDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/RevenueFlowDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleOrderDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SaleProductDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreFlowDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/ScoreProductDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SeeAwardTextDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/SignAwardDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/WithdrawalCashDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/dto/XcxUserSaveUserInfoDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/AddShopOrderPOJO.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/CalculatePostagePOJO.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderCouponGroup.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderItemDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/OrderProductSkuPOJO.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/api/pojo/ShopOrderDto.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/OrderCouponGroupService.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/ShoppingCartService.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WXShopOrderService.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopCouponService.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/WxShopRefundRecordService.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WXShopOrderServiceImpl.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesGroupServiceImpl.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopCouponServiceImpl.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopLogisticsQueryServiceImpl.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopRefundRecordServiceImpl.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopCouponUtil.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/tools/WxShopOrderUtil.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ActivitySignAwardSetVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ActivitySignRecordVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/LuckyDrawBasicInfoJsonVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/LuckyDrawInfoVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/LuckyDrawSuccessVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ScoreUseRecordVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SeeAwardTextVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartBillVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartGroupVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/ShopCartVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignAwardListVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignBasicInfoJsonVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignBasicInfoVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/SignSuccessVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/api/vo/WxMoneyCardUseVO.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivities.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoin.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesGroupJoinUser.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSalonRecord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopActivitiesSeckillRecord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopAdvertis.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopCouponRecord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryDetail.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopDeliveryInfo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrder.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopOrderDetails.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopPage.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProduct.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProductComment.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopRefundRecord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopScoreRecord.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSearchRecord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShareQrcord.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopShoppingCart.java
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSku.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopActivitiesDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopCouponRecordDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopDeliveryDetailDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopOrderDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopOrderV2Dao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopPageDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopQrcordVisitorDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopScoreRecordDao.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShareQrcordDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dao/ShopShoppingCartDao.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dto/CreateGroupBuyDTO.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dto/CreateSecKillDTO.java
zq-erp/src/main/java/com/matrix/system/shopXcx/dto/DiscountExplain.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/AsyncMessageRouting.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/MQTaskRouting.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/OrderDingDingNoticeTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/OrderOutSotoreTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/OrderTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/SalesOrderRefundTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/SalesOrderTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/ScoreOrderTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/TemplateMsgTask.java
zq-erp/src/main/java/com/matrix/system/shopXcx/mqTask/VipCreateTask.java (deleted)
zq-erp/src/main/java/com/matrix/system/shopXcx/pojo/ShopOrderQueryPOJO.java
zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityGroupJoinTimeOutQuartz.java
zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityPayTimeOutQuartz.java
zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopActivityTimeOutQuartz.java
zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopAutomaticReceiveQuartz.java
zq-erp/src/main/java/com/matrix/system/shopXcx/quartz/ShopCouponQuartz.java
zq-erp/src/main/java/com/matrix/system/shopXcx/vo/LogisticsImportVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesOrderVo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanApplyCondition.java
zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanCenterInfo.java
zq-erp/src/main/java/com/matrix/system/shopXcx/vo/SalesmanVo.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/UniformMsgSentTask.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/Task/messageBulderDemo/DefaultTemplateMessageBulder.java
zq-erp/src/main/java/com/matrix/system/wechart/templateMsg/demo/MsgDemo3.java
zq-erp/src/main/java/fileMove.java
zq-erp/src/main/java/filecopy.java
zq-erp/src/main/java/findC.java
zq-erp/src/main/resources/config/application-alpha.properties
zq-erp/src/main/resources/config/application-local.properties
zq-erp/src/main/resources/config/application-meidu.properties
zq-erp/src/main/resources/config/application-meidusw.properties
zq-erp/src/main/resources/config/application-taiyan.properties
zq-erp/src/main/resources/config/application-test.properties
zq-erp/src/main/resources/config/application.properties
zq-erp/src/main/resources/config/config.json
zq-erp/src/main/resources/config/db/increment/2021-04-20bug.sql
zq-erp/src/main/resources/config/db/increment/推广员.sql
zq-erp/src/main/resources/config/db/increment/签到活动.sql
zq-erp/src/main/resources/config/db/increment/美度业绩升级.sql
zq-erp/src/main/resources/config/mdprd/application.properties
zq-erp/src/main/resources/config/mdprd/config.json
zq-erp/src/main/resources/config/mdprd/system.properties
zq-erp/src/main/resources/config/prd/application.properties
zq-erp/src/main/resources/config/prd/system.properties
zq-erp/src/main/resources/config/system.properties (deleted)
zq-erp/src/main/resources/config/test/application.properties
zq-erp/src/main/resources/config/test/config.json
zq-erp/src/main/resources/config/test/system.properties
zq-erp/src/main/resources/config/xcshop/application.properties
zq-erp/src/main/resources/config/xcshop/config.json
zq-erp/src/main/resources/config/xcshop/system.properties
zq-erp/src/main/resources/log4j.properties
zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignAwardSetDao.xml
zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignReceiveRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/activity/ActivitySignWriteoffDao.xml
zq-erp/src/main/resources/mybatis/mapper/common/BusParameterSettingsDao.xml
zq-erp/src/main/resources/mybatis/mapper/common/OperstionLogDao.xml
zq-erp/src/main/resources/mybatis/mapper/common/SysCompanyDao.xml
zq-erp/src/main/resources/mybatis/mapper/common/SysRoleDao.xml
zq-erp/src/main/resources/mybatis/mapper/common/SysRolePwoerFnDao.xml
zq-erp/src/main/resources/mybatis/mapper/common/SysUsersDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/BizUserDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopRevenueFlowDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalemanSettlementDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanApplyDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanGradeDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanOrderDao.xml
zq-erp/src/main/resources/mybatis/mapper/fenxiao/ShopSalesmanOrderItemDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveNewDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/AchieveRuleDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseFlowDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/MoneyCardUseV2Dao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/QuestionDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/ServicesFlowDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/ShoppingGoodsDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysBeauticianStateDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysBusinessDataDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysFollowupDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderFlowDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysOrderItemDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysShopInfoDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysStoreInfoDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/SysVipInfoDao.xml
zq-erp/src/main/resources/mybatis/mapper/hive/TjVipSumDao.xml
zq-erp/src/main/resources/mybatis/mapper/score/ScoreUseRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/score/ScoreVipDetailDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/BizUserDao.xml (deleted)
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesGroupJoinUserDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSalonRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopActivitiesSeckillRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopAdvertisDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCollectionDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopCouponRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopDeliveryInfoDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopInvoiceDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderDetailsDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderSearchDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopOrderV2Dao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductCommentDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopRefundRecordDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopShoppingCartDao.xml
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopSkuDao.xml
zq-erp/src/main/resources/readme-jyy
zq-erp/src/main/resources/static/demoPage/soketLoginTest.html
zq-erp/src/main/resources/static/demoPage/soketTest.html
zq-erp/src/main/resources/static/images/dui.png
zq-erp/src/main/resources/static/images/luckyDraw/line.png
zq-erp/src/main/resources/static/images/luckyDraw/oAward.png
zq-erp/src/main/resources/static/images/luckyDraw/sAward.png
zq-erp/src/main/resources/static/images/luckyDraw/start.png
zq-erp/src/main/resources/static/images/luckyDraw/tAward.png
zq-erp/src/main/resources/static/images/luckyDraw/xiexiecanyu.png
zq-erp/src/main/resources/static/images/luckyDraw/zhuanpan.png
zq-erp/src/main/resources/static/images/luckyDraw/zhuanpanchoujian.png
zq-erp/src/main/resources/static/images/pc.png
zq-erp/src/main/resources/static/images/qrcode.png
zq-erp/src/main/resources/static/images/qrcodeBack.png
zq-erp/src/main/resources/static/images/sign/jisumiaosha.png
zq-erp/src/main/resources/static/images/sign/meiriqiandao.png
zq-erp/src/main/resources/static/images/sign/shalonghuodong.png
zq-erp/src/main/resources/static/images/sign/signButton.png
zq-erp/src/main/resources/static/images/sign/signHead.png
zq-erp/src/main/resources/static/images/sign/tiantianpingtuan.png
zq-erp/src/main/resources/static/js/function/vip.js
zq-erp/src/main/resources/static/js/plugin/kindeditor/plugins/baidumap/index.html
zq-erp/src/main/resources/static/js/plugin/kindeditor/plugins/baidumap/map.html
zq-erp/src/main/resources/static/js/plugin/qrcode.js
zq-erp/src/main/resources/static/js/systools/AjaxProxyVue.js
zq-erp/src/main/resources/static/js/systools/MBase.js
zq-erp/src/main/resources/static/plugin/beditor/dialogs/map/map.html
zq-erp/src/main/resources/static/plugin/beditor/dialogs/map/show.html
zq-erp/src/main/resources/static/plugin/kindeditor/plugins/baidumap/index.html
zq-erp/src/main/resources/static/plugin/kindeditor/plugins/baidumap/map.html
zq-erp/src/main/resources/static/plugin/vue-treeselect/vue-treeselect.min.css
zq-erp/src/main/resources/static/plugin/vue-treeselect/vue-treeselect.umd.min.js
zq-erp/src/main/resources/static/templates/logisticsImport.xls
zq-erp/src/main/resources/static/templates/vipInfoImport.xls
zq-erp/src/main/resources/static/templates/vipProjUse.xls
zq-erp/src/main/resources/templates/views/admin/activity/activity-list.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-luckdraw-receive.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-luckyDraw-update.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-luckyDraw.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-market.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-logistics-info.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-receive.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-update.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-writeoff-info.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-sign-writeoff.html
zq-erp/src/main/resources/templates/views/admin/activity/activity-sign.html
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-apply.html
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-order.html
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-setting.html
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-update.html
zq-erp/src/main/resources/templates/views/admin/fenxiao/fenxiao-user.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/order/orderXq-form.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/order/projService-list.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/order/serviceOrderDetail.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/order/sysOrder-list.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/products/achieverule-list.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/score/score-setting.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/shop/shopInfo-form.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/achieveNewStatiostics.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-list-new.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-sale-list.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/daily-sum-list-new.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/jyls.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/operation-list.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-item.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-moneyCar-summary.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-item.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-order-summary.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-item.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projSercice-sumary.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-item.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/statistics/statistics-projuse-sumary.html
zq-erp/src/main/resources/templates/views/admin/hive-erp/vip/vipInfo-list.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/bj-form.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form-bak.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/cz-form.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/index.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/order-form.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form-bak2.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/orderXq-form.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form-bak.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/pbxq-form.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/print-order.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/print-service.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/servicceAddForm.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service-hk.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/service_all_list.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/underlineOrder.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/updateServiceOrderTime.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/updateServiceOrderTimeV2.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/vip_bak.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yyServiceAddForm.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form-bak.html
zq-erp/src/main/resources/templates/views/admin/hive/beautySalon/yypb-form.html
zq-erp/src/main/resources/templates/views/admin/hive/instore/store-list-pl.html
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-card.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-choice.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-detail.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-follow-add.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-follow.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-mealuse.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-msg.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-my.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-potential.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-service.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account-turn.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-account.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-card-user.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-search.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-vip.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-vipInfo-search.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit-info.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit-list.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM-visit.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/CRM.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/_foot.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/_pageNav.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/cwqk-list.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/mls-list.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/mobileLogin.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-car.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-history-msg.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-history.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-list.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg2.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg3.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg4.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-msg5.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-search.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-service.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-completed.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-end-service.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-look-endService.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-new.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-start-service.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order-use-time.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/order.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-msg.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-resetPassWord.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-shop-list.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-staff-list.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials-data.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials-info.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials1.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal-trainingMaterials2.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/personal.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/store-check-detail.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/store-check.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/mobile/vip-archives.html (deleted)
zq-erp/src/main/resources/templates/views/admin/hive/orgment/shopInfo-form.html
zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/meidu.html
zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/print-service-meidu.html
zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/print-service-taiyan.html
zq-erp/src/main/resources/templates/views/admin/hive/printTemplates/taiyan.html
zq-erp/src/main/resources/templates/views/admin/hive/products/goods-form.html
zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-md-list.html
zq-erp/src/main/resources/templates/views/admin/hive/products/shoppinggoods-zb-list.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-beauty-list.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new-bak.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-list-new.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-sale-list.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/daily-sum-list-new.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/jyls.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-item.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-moneyCar-summary.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-item.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-order-summary.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-item.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projSercice-sumary.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-item.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/statistics-projuse-sumary.html
zq-erp/src/main/resources/templates/views/admin/hive/statistics/vip-arrears-list.html
zq-erp/src/main/resources/templates/views/admin/hive/store/projService-list.html
zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list-bak.html
zq-erp/src/main/resources/templates/views/admin/hive/store/projServiceStartpl-list.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/followu-list.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/moneyCardUseFlow-list.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/question-form.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/question-list.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/tc-form.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-form.html
zq-erp/src/main/resources/templates/views/admin/hive/vip/vipInfo-list.html
zq-erp/src/main/resources/templates/views/admin/index.html
zq-erp/src/main/resources/templates/views/admin/oa/assets/fixeAssets-list.html
zq-erp/src/main/resources/templates/views/admin/shop/logisticsImport-form.html
zq-erp/src/main/resources/templates/views/admin/shop/parameterSetting-form.html
zq-erp/src/main/resources/templates/views/admin/shop/shopAdvertisType-list.html
zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-form.html
zq-erp/src/main/resources/templates/views/admin/shop/shopOrder-list.html
zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-form.html
zq-erp/src/main/resources/templates/views/admin/shop/shopProduct-list.html
zq-erp/src/main/resources/templates/views/admin/shop/shopProductComment-list.html
zq-erp/src/main/resources/templates/views/admin/shop/shopUser-list.html
zq-erp/src/main/resources/templates/views/admin/sys/customerDataDictionary-list.html
zq-erp/src/main/resources/templates/views/admin/sys/sysRole-form.html
zq-erp/src/main/resources/templates/views/common/login.html
zq-erp/src/main/resources/templates/views/common/showprojException.html
zq-erp/src/main/resources/templates/views/super/sysCompany-form.html
zq-erp/src/main/resources/templates/views/super/sysCompany-list.html
zq-erp/src/main/resources/权限
zq-erp/src/test/java/com/matrix/BizUserToVipInfoTool.java
zq-erp/src/test/java/com/matrix/FenxiaoSoreInitTest.java
zq-erp/src/test/java/com/matrix/JyyTests.java
zq-erp/src/test/java/com/matrix/JyyTests2.java
zq-erp/src/test/java/com/matrix/LocalCacheTest.java
zq-erp/src/test/java/com/matrix/ParameterSettingsTool.java
zq-erp/src/test/java/com/matrix/SalesOrderTaskTest.java
zq-erp/src/test/java/com/matrix/SourceFlowTests.java
zq-erp/src/test/java/com/matrix/TaiYanAliyunSmsServiceTest.java
zq-erp/src/test/java/com/matrix/TcProjTest.java
zq-erp/src/test/java/com/matrix/TesatAsyncMessage.java
zq-erp/src/test/java/com/matrix/四月份家居产品业绩恢复.java
zq-xcx/app.js
zq-xcx/project.config.json
zq-xcx/utils/util.js |