Merge branch 'score_shop' into api_score_meger
# Conflicts:
# zq-erp/src/main/java/com/matrix/system/common/init/InitWebContainer.java
4 files added
71 files modified
| | |
| | | |
| | | private Map<String, List<MessageHandler>> routes; |
| | | |
| | | private Map<String, ReentrantLock> lockMap = new HashMap<>(); |
| | | |
| | | private Map<String, ConcurrentLinkedQueue> messageQueue = new HashMap<>(); |
| | | |
| | | |
| | | @Override |
| | | public void run(ApplicationArguments args) throws Exception { |
| | |
| | | String getName(); |
| | | |
| | | /** |
| | | * 返回任务的路由key |
| | | * 返回任务的路由key,当有对应key的事件发生时,消息管理器会触发handle方法。 |
| | | * key 支持正则表达式 |
| | | * @return |
| | | */ |
| | | String getRouteKey(); |
| | |
| | | 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.WebUtil; |
| | | 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 |
| | |
| | | /* |
| | | package com.matrix.config; |
| | | |
| | | |
| | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | @Configuration |
| | | */ |
| | | /** |
| | | * 小型应用弃用rabbitmq,直接通过观察者模式对消息进行同步消费 参考 AsyncMessageManager |
| | | *//* |
| | | |
| | | //@Configuration |
| | | public class RabbitMqConfig { |
| | | |
| | | @Value("${rabbitmq.host}") |
| | |
| | | |
| | | |
| | | } |
| | | */ |
| | |
| | | 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.*; |
| | |
| | | |
| | | 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); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 将字符串中的某些值用指定字符代替 |
| | | * |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.matrix.component.redis.RedisClient; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.*; |
| | | import com.matrix.system.app.authority.AppAuthorityManager; |
| | |
| | | import com.matrix.system.common.authority.strategy.LoginStrategy; |
| | | import com.matrix.system.common.bean.SysUsers; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | 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.UploadUtil; |
| | |
| | | import java.io.IOException; |
| | | import java.io.UnsupportedEncodingException; |
| | | import java.security.NoSuchAlgorithmException; |
| | | import java.util.*; |
| | | import java.util.ArrayList; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | | |
| | | @Autowired |
| | | private RedisClient redisClient; |
| | | |
| | | @Value("${file_storage_path}") |
| | | private String fileStoragePath; |
| | |
| | | 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()); |
| | |
| | | return AjaxResult.buildFailInstance("该手机号不存在"); |
| | | } |
| | | |
| | | String codeExist = redisClient.getCachedValue(smsCodeDto.getTelphone()); |
| | | String codeExist = LocalCache.get(smsCodeDto.getTelphone()); |
| | | 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()); |
| | | 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("修改失败"); |
| | |
| | | @Autowired |
| | | private SysBeauticianStateService sysBeauticianStateService; |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @Autowired |
| | | private AsyncMessageManager asyncMessageManager; |
| | |
| | | @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()); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam); |
| | | |
| | | int i=projServicesService.confirmServiceOrder(idSubmitDto.getId()); |
| | | if(i>0){ |
| | | return AjaxResult.buildSuccessInstance("确认成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("确认失败"); |
| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.component.redis.RedisClient; |
| | | 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.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("退出成功"); |
| | | } |
| | | |
| | |
| | | package com.matrix.system.app.authority; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.matrix.component.redis.RedisClient; |
| | | 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; |
| | |
| | | |
| | | private static final int DEFAULT_2 = 2; |
| | | |
| | | @Autowired |
| | | RedisClient redisClient; |
| | | |
| | | @Autowired |
| | | SysFunctionService sysFunctionService; |
| | |
| | | |
| | | |
| | | String redisKey = USER_POWER_REDISKEY_APP + SecureUtil.md5(user.getSuId()+""); |
| | | String cachedValue = redisClient.getCachedValue(redisKey); |
| | | if (StringUtils.isNotBlank(cachedValue)) { |
| | | //从缓存中获取用户权限 |
| | | JSONObject powerMap = JSONUtil.parseObj(cachedValue); |
| | | String userFunctionMapStr = powerMap.get(USERFUNCTION).toString(); |
| | | JSONObject userFunctionMap = JSONUtil.parseObj(userFunctionMapStr); |
| | | Set<String> userFunctionMapKeys = userFunctionMap.keySet(); |
| | | userFunctionMapKeys.forEach(key -> { |
| | | userFunction.put(key, userFunctionMap.get(key, SysFunction.class)); |
| | | }); |
| | | Map<String, Object> cachePowerMap = LocalCache.get(redisKey); |
| | | if (Objects.nonNull(cachePowerMap)) { |
| | | |
| | | String userUrlMappingListStr = powerMap.get(USER_URL_MAPPING).toString(); |
| | | JSONArray userUrlMappingArray = JSONUtil.parseArray(userUrlMappingListStr); |
| | | for (int i = 0; i < userUrlMappingArray.size(); i++) { |
| | | userUrlMapping.add(userUrlMappingArray.get(i, String.class)); |
| | | } |
| | | userFunction = (Map<String, SysFunction>) cachePowerMap.get(USERFUNCTION); |
| | | |
| | | userUrlMapping = (List<String>) cachePowerMap.get(USER_URL_MAPPING); |
| | | |
| | | } else { |
| | | // 获取用户所有权限 |
| | | getUserFunction(user,userFunction, userUrlMapping); |
| | |
| | | Map<String ,Object> powerMap=new HashMap<>(); |
| | | powerMap.put(USERFUNCTION, userFunction); |
| | | powerMap.put(USER_URL_MAPPING, userUrlMapping); |
| | | redisClient.saveValue(redisKey,JSONUtil.parseObj(powerMap,true)); |
| | | LocalCache.save(redisKey,powerMap); |
| | | } |
| | | |
| | | |
| | | // TODO 这里的用户权限应该放到redis缓存中,在拦截器中做权限拦截 |
| | | WebUtil.setSessionAttribute(USERFUNCTION, userFunction); |
| | | WebUtil.setSessionAttribute(USER_URL_MAPPING, userUrlMapping); |
| | | result.putInMap(USERFUNCTION, userFunction); |
| | |
| | | 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.component.redis.RedisClient; |
| | | import com.matrix.core.anotations.RemoveRequestToken; |
| | | import com.matrix.core.anotations.SaveRequestToken; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | |
| | | 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 org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | private SysFunctionService sysFunctionService; |
| | | |
| | | public static final String BEV = "SYSROLE_BEV"; |
| | | @Autowired |
| | | RedisClient redisClient; |
| | | /** |
| | | * 列表显示 |
| | | * |
| | |
| | | } |
| | | AjaxResult result = modify(sysRoleService, WebUtil.getSessionAttribute(BEV), sysRole, AppVocabularyCode.ROLE); |
| | | WebUtil.removeSessionAttribute(BEV); |
| | | redisClient.batchDel(DefaultAuthorityManager.USER_POWER_REDISKEY); |
| | | LocalCache.batchRemove(DefaultAuthorityManager.USER_POWER_REDISKEY+"*"); |
| | | return result; |
| | | } |
| | | |
| | |
| | | package com.matrix.system.common.authority; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.matrix.component.redis.RedisClient; |
| | | 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; |
| | |
| | | **/ |
| | | public static final String USER_URL_MAPPING = "userUrlMapping"; |
| | | |
| | | @Autowired |
| | | RedisClient redisClient; |
| | | |
| | | private DefaultAuthorityManager() { |
| | | } |
| | |
| | | SysUsers sysUser = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); |
| | | |
| | | String redisKey = USER_POWER_REDISKEY_PC + SecureUtil.md5(sysUser.getSuId() + ""); |
| | | String cachedValue = redisClient.getCachedValue(redisKey); |
| | | if (StringUtils.isNotBlank(cachedValue)) { |
| | | //从缓存中获取用户权限 |
| | | JSONObject powerMap = JSONUtil.parseObj(cachedValue); |
| | | String userFunctionMapStr = powerMap.get(USERFUNCTION).toString(); |
| | | JSONObject userFunctionMap = JSONUtil.parseObj(userFunctionMapStr); |
| | | Set<String> userFunctionMapKeys = userFunctionMap.keySet(); |
| | | userFunctionMapKeys.forEach(key -> { |
| | | userFunction.put(key, userFunctionMap.get(key, SysFunction.class)); |
| | | }); |
| | | String menusFunctionListStr = powerMap.get(MENUSFUNCTION).toString(); |
| | | JSONArray menusFunctionArray = JSONUtil.parseArray(menusFunctionListStr); |
| | | for (int i = 0; i < menusFunctionArray.size(); i++) { |
| | | menuFunction.add(menusFunctionArray.get(i, SysFunction.class)); |
| | | } |
| | | String userUrlMappingListStr = powerMap.get(USER_URL_MAPPING).toString(); |
| | | JSONArray userUrlMappingArray = JSONUtil.parseArray(userUrlMappingListStr); |
| | | for (int i = 0; i < userUrlMappingArray.size(); i++) { |
| | | userUrlMapping.add(userUrlMappingArray.get(i, String.class)); |
| | | } |
| | | Map<String, Object> cachePowerMap = LocalCache.get(redisKey); |
| | | |
| | | if (Objects.nonNull(cachePowerMap)) { |
| | | |
| | | userFunction = (Map<String, SysFunction>) cachePowerMap.get(USERFUNCTION); |
| | | |
| | | menuFunction = (List<SysFunction>) cachePowerMap.get(MENUSFUNCTION); |
| | | |
| | | userUrlMapping = (List<String>) cachePowerMap.get(USER_URL_MAPPING); |
| | | |
| | | } else { |
| | | // 获取用户所有权限 |
| | | getUserFunction(userFunction, menuFunctionMap, userUrlMapping); |
| | |
| | | powerMap.put(USERFUNCTION, userFunction); |
| | | powerMap.put(MENUSFUNCTION, menuFunction); |
| | | powerMap.put(USER_URL_MAPPING, userUrlMapping); |
| | | redisClient.saveValue(redisKey, JSONUtil.parseObj(powerMap, true)); |
| | | //权限信息加入缓存中 |
| | | LocalCache.save(redisKey,powerMap); |
| | | } |
| | | |
| | | |
| | |
| | | package com.matrix.system.common.init; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.system.common.bean.SysCompany; |
| | | import com.matrix.system.common.dao.SysCompanyDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.context.ServletContextAware; |
| | | |
| | | import javax.servlet.ServletContext; |
| | | import java.util.HashMap; |
| | | 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; |
| | | |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * 初始化web容器的类 一些网站启动需要加载的数据和方法在这里配置和执行 |
| | | * @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"; |
| | | |
| | |
| | | |
| | | |
| | | @Autowired |
| | | private SysCompanyDao sysCompanyDao; |
| | | |
| | | private SysCompanyService sysCompanyService; |
| | | |
| | | |
| | | |
| | |
| | | private String systemLanguage; |
| | | |
| | | /** |
| | | * |
| | | * |
| | | * 容器启动后加载数据 |
| | | * @author:姜友瑶 |
| | | * @param sc |
| | | * @date 2016年10月18日 |
| | | */ |
| | | @Override |
| | | public void setServletContext(ServletContext sc) { |
| | | this.servletContext = sc; |
| | | public void run(ApplicationArguments args) { |
| | | |
| | | // 初始化调试模式 |
| | | initDebug(); |
| | | // 初始化语言环境 |
| | | initLanguage(); |
| | | //初始化公司 |
| | | //initParams(); |
| | | initParams(); |
| | | LogUtil.info("\r\n\r\n**********************************************\r\n" |
| | | + "* =========== Matrix启动成功 ===========\r\n" |
| | | + "* =========== 成功 ===========\r\n" |
| | | + "* DEBUG模式:" + debug+"*\r\n" |
| | | + "* 语言环境:" + Locale.getDefault().getLanguage()+"\r\n" |
| | | |
| | | |
| | | + "**********************************************\r\n"); |
| | | } |
| | | |
| | |
| | | |
| | | /** |
| | | * 初始化语言环境,默认为中文 |
| | | * |
| | | * |
| | | * @author JIANGYOUYAO |
| | | * @email 935090232@qq.com |
| | | * @date 2017年11月30日 |
| | |
| | | public void initParams() { |
| | | |
| | | //初始化所有的公司 |
| | | List<SysCompany> company=sysCompanyDao.selectAll(); |
| | | List<SysCompany> company=sysCompanyService.findByModel(null); |
| | | Map<String, SysCompany> companyMap=new HashMap<>(); |
| | | for (SysCompany sysCompany : company) { |
| | | companyMap.put(sysCompany.getComWebUrl(), sysCompany); |
| | | } |
| | | servletContext.setAttribute("companyMap", companyMap); |
| | | LocalCache.save("companyMap", companyMap); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.matrix.system.common.init; |
| | | |
| | | import com.google.common.util.concurrent.ThreadFactoryBuilder; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import lombok.Data; |
| | | |
| | | import java.util.Iterator; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | import java.util.Set; |
| | | import java.util.concurrent.*; |
| | | import java.util.concurrent.atomic.AtomicLong; |
| | | import java.util.stream.Collectors; |
| | | |
| | | public class LocalCache { |
| | | |
| | | /* |
| | | * 清理线程运行状态 0 未启动,1 已启动 |
| | | */ |
| | | private static int CLEAR_THREAD_STATUS = 0; |
| | | |
| | | private static ConcurrentMap<String, Value> localCache = new ConcurrentHashMap(60); |
| | | |
| | | /** |
| | | * 根据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.value)) |
| | | .collect(Collectors.toMap(Value::getKey, item -> (T) item.value)); |
| | | } |
| | | |
| | | /** |
| | | * 获取本地缓存 |
| | | * |
| | | * @param key |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public static <T> T get(String key) { |
| | | Value value = localCache.get(key); |
| | | if (Objects.nonNull(value)) { |
| | | return (T) value.value; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 删除缓存 |
| | | * |
| | | * @param key |
| | | * @param <T> |
| | | * @return |
| | | */ |
| | | public static <T> T remove(String key) { |
| | | Value value = localCache.remove(key); |
| | | if (Objects.nonNull(value)) { |
| | | return (T) value.value; |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | /** |
| | | * 批量删除缓存 |
| | | * |
| | | * @param key |
| | | * @return |
| | | */ |
| | | public static int batchRemove(String key) { |
| | | int count = 0; |
| | | Set<Map.Entry<String, Value>> entries = localCache.entrySet(); |
| | | Iterator<Map.Entry<String, Value>> iterator = entries.iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, Value> 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); |
| | | } |
| | | startClearThread(); |
| | | } |
| | | |
| | | /** |
| | | * 重置缓存失效时间 |
| | | * @param key |
| | | */ |
| | | public static void resetExpire(String key) { |
| | | Objects.requireNonNull(key); |
| | | Value value = localCache.get(key); |
| | | if(Objects.nonNull(value)){ |
| | | value.getCreateTime().set(System.currentTimeMillis()); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 清理过期对象 |
| | | */ |
| | | private synchronized static 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, Value>> entries = localCache.entrySet(); |
| | | Iterator<Map.Entry<String, Value>> iterator = entries.iterator(); |
| | | while (iterator.hasNext()) { |
| | | Map.Entry<String, Value> next = iterator.next(); |
| | | |
| | | if (next.getValue().timeOut == 0) { |
| | | continue; |
| | | } |
| | | |
| | | boolean isTimeOut = (System.currentTimeMillis() - next.getValue().getCreateTime().longValue()) > next.getValue().timeOut; |
| | | if (isTimeOut) { |
| | | Value removed = localCache.remove(next.getKey()); |
| | | LogUtil.debug("清除过期对象:{}", removed.value); |
| | | } |
| | | } |
| | | Thread.sleep(1000); |
| | | } catch (InterruptedException e) { |
| | | LogUtil.error("清理缓存线程异常停止", e); |
| | | CLEAR_THREAD_STATUS = 0; |
| | | } |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | } |
| | | |
| | | |
| | | private static Value buildValue(String key, Object value) { |
| | | return buildValue(key, value, 0); |
| | | } |
| | | |
| | | |
| | | private static Value buildValue(String key, Object value, long timeOut) { |
| | | Value instances = new Value(); |
| | | instances.createTime = new AtomicLong(System.currentTimeMillis()); |
| | | instances.key = key; |
| | | instances.value = value; |
| | | instances.timeOut = timeOut; |
| | | return instances; |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | /** |
| | | * 缓存对象 |
| | | */ |
| | | @Data |
| | | static class Value { |
| | | |
| | | /** |
| | | * 过期时间,0 表示不过期,单位毫秒 |
| | | */ |
| | | private long timeOut = 0; |
| | | /** |
| | | * 缓存key |
| | | */ |
| | | private String key; |
| | | /** |
| | | * 缓存值 |
| | | */ |
| | | private Object value; |
| | | |
| | | /** |
| | | * 缓存创建时间 |
| | | */ |
| | | private AtomicLong createTime; |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | } |
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.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 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) != 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); |
| | | 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; |
| | | } |
| | | |
| | | |
| | | } |
| | |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.fasterxml.jackson.databind.ObjectMapper; |
| | | import com.matrix.component.redis.RedisClient; |
| | | 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.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; |
| | |
| | | return false; |
| | | } |
| | | |
| | | String userStr = redisClient.getCachedValue(token); |
| | | // redisClient.resetExpire(token); |
| | | if (StringUtils.isBlank(userStr)) { |
| | | SysUsers sysUsers = LocalCache.get(token); |
| | | 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.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"); |
| | | 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(); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.matrix.system.common.service.impl; |
| | | |
| | | import cn.hutool.crypto.SecureUtil; |
| | | import com.matrix.component.redis.RedisClient; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | |
| | | 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; |
| | |
| | | private static final String SU_ID = "su_id"; |
| | | |
| | | private static final String SU_ACCOUNT = "su_account"; |
| | | @Autowired |
| | | RedisClient redisClient; |
| | | @Autowired |
| | | private SysUsersDao sysUsersDao; |
| | | |
| | |
| | | //删除用户权限缓存 |
| | | String redisKey=DefaultAuthorityManager.USER_POWER_REDISKEY+ SecureUtil.md5(oldSysUsers.getSuId()+""); |
| | | String redisKeyPc=DefaultAuthorityManager.USER_POWER_REDISKEY_PC+ SecureUtil.md5(oldSysUsers.getSuId()+""); |
| | | redisClient.removeObject(redisKey); |
| | | redisClient.removeObject(redisKeyPc); |
| | | LocalCache.remove(redisKey); |
| | | LocalCache.remove(redisKeyPc); |
| | | |
| | | return MatrixConstance.DML_SUCCESSS; |
| | | } |
| | |
| | | |
| | | /** |
| | | * 补交 |
| | | * |
| | | * @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, "补交成功"); |
| | |
| | | @Autowired |
| | | private SysOrderFlowDao sysOrderFlowDao; |
| | | |
| | | @Autowired |
| | | RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @Autowired |
| | | private BusParameterSettingsDao busParameterSettingsDao; |
| | |
| | | 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.app.dto.IdSubmitDto; |
| | | 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.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.service.*; |
| | | 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.ui.ModelMap; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | |
| | | } |
| | | } |
| | | |
| | | @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 |
| | |
| | | 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)) { |
| | | && !checkProjServices.getState().equals(Dictionary.SERVICE_STATU_DQR)) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "您只能取消待预约订单"); |
| | | } |
| | | } |
| | | return erpCancelOrder(services); |
| | | return erpCancelOrder(services); |
| | | } |
| | | /** |
| | | * 根据id取消预约 |
| | |
| | | int findApiServiceOrderListTotal(ServiceOrderListDto serviceOrderListDto); |
| | | |
| | | public boolean skipServiceOrderStep(String step); |
| | | |
| | | /** |
| | | * 确认服务单 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | int confirmServiceOrder(Long id); |
| | | } |
| | |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgParam; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.transaction.annotation.Transactional; |
| | | |
| | |
| | | |
| | | |
| | | // 更新收款时间 |
| | | pageOrder.setPayTime(new Date()); |
| | | pageOrder.setStatu(Dictionary.ORDER_STATU_YFK); |
| | | sysOrderDao.update(pageOrder); |
| | | updateOrderInfo(pageOrder); |
| | | |
| | | // 获取用户信息 |
| | | SysVipInfo vipInfo = sysVipInfoDao.selectById(pageOrder.getVipId()); |
| | |
| | | //设置会员积分 |
| | | addVipScore(pageOrder); |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 付款后更新订单信息 |
| | | * @param pageOrder |
| | | */ |
| | | private void updateOrderInfo(SysOrder pageOrder) { |
| | | pageOrder.setPayTime(new Date()); |
| | | pageOrder.setStatu(Dictionary.ORDER_STATU_YFK); |
| | | List<SysOrderFlow> flows = pageOrder.getFlows(); |
| | | |
| | | BigDecimal cashPayAmount = flows.stream() |
| | | .filter(item -> (!item.getPayMethod().equals("储值卡")) && (!item.getPayMethod().equals("欠款"))) |
| | | .map(SysOrderFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | |
| | | BigDecimal cardPayAmount = flows.stream() |
| | | .filter(item -> item.getPayMethod().equals("储值卡") && item.getIsGift().equals("N")) |
| | | .map(SysOrderFlow::getAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | |
| | | pageOrder.setCardPay(cardPayAmount.doubleValue()); |
| | | pageOrder.setCashPay(cashPayAmount.doubleValue()); |
| | | //欠款金额在流水处理中处理了 |
| | | |
| | | sysOrderDao.update(pageOrder); |
| | | } |
| | | |
| | | private void checkOrder(SysOrder pageOrder) { |
| | |
| | | //赠送项目是否计算消耗业绩否则 赠送产品按原价计算消耗 |
| | | boolean zsConsumeAchieve = projServicesService.skipServiceOrderStep(Dictionary.ZS_CONSUME_ACHIEVE); |
| | | if (zsConsumeAchieve) { |
| | | puse.setPrice(sysOrderItem.getShoppingGoods().getSealPice()); |
| | | //赠送情况下,如果收款金额大于0,就是赠送金额划扣的情况,金额即为划扣的折扣金额 |
| | | if(sysOrderItem.getZkPrice()>0){ |
| | | puse.setPrice(sysOrderItem.getZkPrice()); |
| | | }else{ |
| | | puse.setPrice(sysOrderItem.getShoppingGoods().getSealPice()); |
| | | } |
| | | } else { |
| | | puse.setPrice(0D); |
| | | } |
| | | |
| | | |
| | | } |
| | | // 设置失效时间 |
| | | Date invalidTime = shoppingGoodsService.calInvalidTime(sysOrderItem.getShoppingGoods(), 1, null); |
| | | puse.setFailTime(invalidTime); |
| | | puse.setBalance(sysOrderItem.getShoppingGoods().getSealPice() * puse.getSurplusCount()); |
| | | puse.setBalance(puse.getPrice() * puse.getSurplusCount()); |
| | | sysProjUseDao.insert(puse); |
| | | } |
| | | |
| | |
| | | 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.pojo.VerifyResult; |
| | | import com.matrix.core.tools.DateUtil; |
| | |
| | | SysProjUse sysProjUse = projUseService.findById(sysBeauticianState.getPuseId()); |
| | | |
| | | //检查是否已经处于无效状态 |
| | | if(Dictionary.TAOCAN_STATUS_WX.equals(sysProjUse.getStatus())){ |
| | | if(Dictionary.TAOCAN_STATUS_WX.equals(sysProjUse.getStatus())){ |
| | | return new VerifyResult(true, sysProjUse.getProjName() + "项目已经失效"); |
| | | } |
| | | |
| | |
| | | |
| | | return flag; |
| | | } |
| | | |
| | | @Override |
| | | public int confirmServiceOrder(Long id) { |
| | | SysProjServices services = new SysProjServices(); |
| | | services.setId(id); |
| | | services.setState(Dictionary.BEATUI_STATE_DYY); |
| | | int i = modify(services); |
| | | if (i > 0) { |
| | | //发送微信公众号提醒 |
| | | services=findById(services.getId()); |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(services.getCompanyId(),UniformMsgParam.GZH_YYCG); |
| | | uniformMsgParam.put("serviceId",services.getId()); |
| | | asyncMessageManager.sendMsg(AsyncMessageRouting.SEND_UNIFORM_TEMPLATE_MSG ,uniformMsgParam); |
| | | |
| | | } |
| | | return i; |
| | | } |
| | | } |
New file |
| | |
| | | package com.matrix.system.hive.vo; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * 补交订单费用vo |
| | | */ |
| | | @Data |
| | | public class BjOrderVo { |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @Value("${evn}") |
| | | private String evn; |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @Autowired |
| | | private AsyncMessageManager asyncMessageManager; |
| | |
| | | package com.matrix.system.shopXcx.action; |
| | | |
| | | import com.matrix.component.asyncmessage.AsyncMessageManager; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.core.anotations.RemoveRequestToken; |
| | | import com.matrix.core.anotations.SaveRequestToken; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | |
| | | @Autowired |
| | | private ShopLogisticsInfoDao shopLogisticsInfoDao; |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | //记录编辑前的值Before_Edit_Value |
| | | public static final String BEV = "ShopDeliveryInfo_BEV"; |
| | |
| | | package com.matrix.system.shopXcx.action; |
| | | |
| | | import com.matrix.component.asyncmessage.AsyncMessageManager; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil; |
| | | import com.matrix.core.anotations.RemoveRequestToken; |
| | | import com.matrix.core.anotations.SaveRequestToken; |
| | |
| | | @Autowired |
| | | private ShopDeliveryInfoDao shopDeliveryInfoDao; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | @Autowired |
| | | private AsyncMessageManager asyncMessageManager; |
| | | @Autowired |
| | | private ShopCouponRecordDao shopCouponRecordDao; |
| | |
| | | @Value("${evn}") |
| | | private String evn; |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @Autowired |
| | | BusParameterSettingsDao parameterSettingsDao; |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.asyncmessage.AsyncMessageManager; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.component.wechat.externalInterface.protocol.paramProtocol.BrandWCPayRequestData; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | |
| | | |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | ShopCouponRecordDao shopCouponRecordDao; |
| | |
| | | @GetMapping(value = "/getOrderStatusCount") |
| | | @ResponseBody |
| | | public AjaxResult getOrderStatusCount() { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance( |
| | | shopOrderDao.selectOrderStatusCount(sysVipInfo.getId())); |
| | | return result; |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.component.tools.AES; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.shopXcx.api.pojo.BindingPhoneNumberPOJO; |
| | |
| | | private SysVipInfoDao sysVipInfoDao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate mqTemplate; |
| | | |
| | | @Value("${evn}") |
| | | private String evn; |
| | |
| | | if (StringUtils.isBlank(bindingPhoneNumber.getPhoneNumber())) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "手机号码不能为空"); |
| | | } |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | |
| | | |
| | | SysVipInfo oldeUser = sysVipInfoDao.selectByPhone(bindingPhoneNumber.getPhoneNumber(), loginUser.getCompanyId()); |
| | |
| | | oldeUser.setAvatarUrl(loginUser.getAvatarUrl()); |
| | | sysVipInfoDao.update(oldeUser); |
| | | sysVipInfoDao.deleteById(loginUser.getId()); |
| | | String token = redisUserLoginUtils.saveUserInfo(oldeUser); |
| | | String token = userCacheManager.saveUserInfo(oldeUser); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance("绑定成功"); |
| | | result.putInMap("token",token); |
| | | result.putInMap("userInfo",oldeUser); |
| | |
| | | @RequestMapping(value = "/deciphering") |
| | | public @ResponseBody |
| | | AjaxResult deciphering(@RequestBody DataDecipheringVo dataDecipheringVo) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | String session_key = loginUser.getSessionKey(); |
| | | LogUtil.debug(dataDecipheringVo.toString()); |
| | | String jsonResult = AES.wxDecrypt(dataDecipheringVo.getEncryptedData(), session_key, dataDecipheringVo.getIv()); |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.shopXcx.bean.ShopCollection; |
| | | import com.matrix.system.shopXcx.dao.ShopCollectionDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Autowired |
| | | private ShopCollectionDao collectionDao; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | /** |
| | | * 接收保存收藏数据 |
| | |
| | | @PostMapping(value = "/saveCollection") |
| | | public @ResponseBody |
| | | AjaxResult saveCollection(@RequestBody ShopCollection collection) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | collection.setCreateBy(loginUser.getOpenId()); |
| | | collection.setUpdateBy(loginUser.getOpenId()); |
| | | collection.setCollUserid(loginUser.getOpenId()); |
| | |
| | | @ResponseBody |
| | | public AjaxResult deleteByProductId(@PathVariable("collProductid") Integer collProductid){ |
| | | Map<String, Object> deleteMap = new HashMap<>(); |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | String collUserid = loginUser.getOpenId(); |
| | | deleteMap.put("collProductid", collProductid); |
| | | deleteMap.put("collUserid", collUserid); |
| | |
| | | @PostMapping("/findCollection") |
| | | @ResponseBody |
| | | public AjaxResult getCollectionByUserId(@RequestBody ShopCollection collection) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | String userId = loginUser.getOpenId(); |
| | | collection.setCollUserid(userId); |
| | | List<ShopCollection> list = collectionDao.selectByUserId(collection); |
| | |
| | | @PostMapping("/findByUserIdAndProid/{collProductid}") |
| | | @ResponseBody |
| | | public AjaxResult findByUserIdAndProid(@PathVariable("collProductid") Integer collProductid) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | String userId = loginUser.getOpenId(); |
| | | List<ShopCollection> list = collectionDao.selectByUserIdAndProid(collProductid,userId); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, list, list.size()); |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.asyncmessage.AsyncMessageManager; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.component.wechat.externalInterface.common.Signature; |
| | | import com.matrix.component.wechat.externalInterface.common.Util; |
| | | import com.matrix.component.wechat.externalInterface.protocol.queryProtocol.NotifyData; |
| | |
| | | @Autowired |
| | | private ShopPayLogDao shopPayLogDao; |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @Autowired |
| | | private ShopActivitiesGroupJoinUserDao shopActivitiesGroupJoinUserDao; |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.redis.RedisClient; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.app.authority.AppAuthorityManager; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.common.service.SysUsersService; |
| | | import com.matrix.system.hive.bean.SysOrderFlow; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | |
| | | @Autowired |
| | | private AppAuthorityManager authorityManager; |
| | | |
| | | @Autowired |
| | | private RedisClient redisClient; |
| | | |
| | | @Autowired |
| | | private SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | private SysOrderDao sysOrderDao; |
| | |
| | | }) |
| | | @PostMapping(value = "/findUserOrderList") |
| | | public AjaxResult findUserOrderList(@RequestBody @Validated ErpOrderListDto erpOrderListDto) { |
| | | SysVipInfo vipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo vipInfo = userCacheManager.getLoginUser(); |
| | | |
| | | erpOrderListDto.setVipId(vipInfo.getId()); |
| | | List<ErpOrderDetailVo> rows = sysOrderDao.selectErpOrderList(erpOrderListDto); |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.component.tools.WxacodeUtil; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.shopXcx.api.WeChatApiTools; |
| | | import com.matrix.system.shopXcx.bean.ShopWxAcode; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @RequestMapping(value = "wxapi/getAcode") |
| | | public class WxGetAcodeAction { |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | @Autowired |
| | | WeChatApiTools weChatApiTools; |
| | | /** |
| | |
| | | @PostMapping("/getWxAcode") |
| | | @ResponseBody |
| | | public AjaxResult getWxAcode(@RequestBody ShopWxAcode wxAcode) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | String openId = loginUser.getOpenId(); |
| | | try { |
| | | String wxacodeUrl = WxacodeUtil.getWxacode(wxAcode.getScene(), wxAcode.getPage(), wxAcode.getFileName(), |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.common.bean.CustomerDataDictionary; |
| | | import com.matrix.system.common.dao.CustomerDataDictionaryDao; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | |
| | | import com.matrix.system.common.dao.CustomerDataDictionaryDao; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.shopXcx.bean.ShopInvoice; |
| | | import com.matrix.system.shopXcx.dao.ShopInvoiceDao; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | |
| | | @Autowired |
| | | private ShopInvoiceDao invoiceDao; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | /** |
| | | * 查询发票内容接口 |
| | |
| | | @PostMapping(value = "/saveInvoice") |
| | | public @ResponseBody |
| | | AjaxResult saveInvoice(@RequestBody ShopInvoice shopInvoice) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | shopInvoice.setCreateBy(loginUser.getOpenId()); |
| | | shopInvoice.setUpdateBy(loginUser.getOpenId()); |
| | | shopInvoice.setUserId(loginUser.getOpenId()); |
| | |
| | | @PostMapping("/findProductComment") |
| | | @ResponseBody |
| | | public AjaxResult getProductCommentByUserId(@RequestBody ShopInvoice shopInvoice) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | String userId = loginUser.getOpenId(); |
| | | shopInvoice.setUserId(userId); |
| | | List<ShopInvoice> list = invoiceDao.selectByUserId(shopInvoice); |
| | |
| | | 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.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.component.wechat.externalInterface.protocol.paramProtocol.BrandWCPayRequestData; |
| | | import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.BasePageQueryDto; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.hive.bean.MoneyCardUse; |
| | | import com.matrix.system.hive.bean.MoneyCardUseFlow; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | |
| | | private MoneyCardUseV2Dao moneyCardUseV2Dao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | MoneyCardUseFlowDao moneyCardUseFlowDao; |
| | |
| | | @ApiResponse(code = 200, message = "ok", response = WxMoneyCardUseVO.class) |
| | | }) |
| | | public AjaxResult getUserVipCard() { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | QueryWrapper queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("vip_id", sysVipInfo.getId()); |
| | | queryWrapper.eq("is_vip_car","Y"); |
| | |
| | | @ApiResponse(code = 200, message = "ok", response = WxMoneyCardUseVO.class) |
| | | }) |
| | | public AjaxResult getUserMoneyCardUseList(@RequestBody @Validated BasePageQueryDto pageDto) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | QueryWrapper queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("vip_id", sysVipInfo.getId()); |
| | | IPage<MoneyCardUse> page = new Page<>(pageDto.getPageNum(), pageDto.getPageSize()); |
| | |
| | | if (total < 0.02) { |
| | | return AjaxResult.buildFailInstance("充值金额最底1元"); |
| | | } |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | MoneyCardUseFlow moneyCardUseFlow = new MoneyCardUseFlow(); |
| | | moneyCardUseFlow.setVipId(sysVipInfo.getId()); |
| | | moneyCardUseFlow.setPayNo(codeService.get32LenNumberCode()); |
| | |
| | | @ApiResponse(code = 200, message = "ok", response = MoneyCardUseFlow.class) |
| | | }) |
| | | public AjaxResult getRechargeList(@RequestBody @Validated MoneyCardUseFlowDto pageDto) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | pageDto.setCompanyId(sysVipInfo.getCompanyId()); |
| | | List<MoneyCardUseFlow> dataList = moneyCardUseFlowDao.selectForWxInPage(pageDto); |
| | | return AjaxResult.buildSuccessInstance(dataList); |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | 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.init.UserCacheManager; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.score.constant.ScoreSettingConstant; |
| | | import com.matrix.system.score.entity.ScoreVipDetail; |
| | |
| | | @Autowired |
| | | private ShopProductCommentDao productCommentDao; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | @Autowired |
| | | private ShopOrderDao shopOrderDao; |
| | | |
| | |
| | | @PostMapping(value = "/saveProductComment") |
| | | public @ResponseBody |
| | | AjaxResult saveProductComment(@RequestBody List<ShopProductComment> commentList) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | int flag = 0; |
| | | if(CollectionUtils.isNotEmpty(commentList)){ |
| | | for(ShopProductComment productComment : commentList){ |
| | |
| | | @PostMapping("/findProductComment") |
| | | @ResponseBody |
| | | public AjaxResult getProductCommentByUserId(@RequestBody ShopProductComment productComment) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | String userId = loginUser.getOpenId(); |
| | | productComment.setUserId(userId); |
| | | List<ShopProductComment> list = productCommentDao.selectByUserId(productComment); |
| | |
| | | |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | |
| | | import com.matrix.system.shopXcx.bean.ShopReceiveAddress; |
| | | import com.matrix.system.shopXcx.dao.ShopReceiveAddressDao; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.shopXcx.api.pojo.AddressUntilsPOJO; |
| | | import com.matrix.system.shopXcx.api.tools.AddressUntils; |
| | | import com.matrix.system.shopXcx.bean.ShopReceiveAddress; |
| | | import com.matrix.system.shopXcx.dao.ShopReceiveAddressDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.*; |
| | |
| | | private ShopReceiveAddressDao shopReceiveAddressDao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | /** |
| | | * 接收保存收货地址 |
| | | */ |
| | | @PostMapping(value = "/saveReceiveAddress") |
| | | public @ResponseBody |
| | | AjaxResult saveReceiveAddress(@RequestBody ShopReceiveAddress receiveAddress) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | receiveAddress.setCreateBy(loginUser.getOpenId()); |
| | | receiveAddress.setUpdateBy(loginUser.getOpenId()); |
| | | receiveAddress.setAddrUserid(loginUser.getOpenId()); |
| | |
| | | @PostMapping("/findReceiveAddress") |
| | | @ResponseBody |
| | | public AjaxResult getByAddrUserId(@RequestBody ShopReceiveAddress receiveAddress) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | String userId = loginUser.getOpenId(); |
| | | receiveAddress.setAddrUserid(userId); |
| | | List<ShopReceiveAddress> list = shopReceiveAddressDao.selectByModel(receiveAddress); |
| | |
| | | @PostMapping("/findAddrByAddrId/{addrId}") |
| | | @ResponseBody |
| | | public AjaxResult getByAddrId(@PathVariable("addrId") Integer addrId) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | String userId = loginUser.getOpenId(); |
| | | ShopReceiveAddress params = new ShopReceiveAddress(); |
| | | params.setAddrUserid(userId); |
| | |
| | | @PostMapping(value = "/updateReceiveAddress") |
| | | public @ResponseBody |
| | | AjaxResult updateReceiveAddress(@RequestBody ShopReceiveAddress receiveAddress) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | receiveAddress.setCreateBy(loginUser.getOpenId()); |
| | | receiveAddress.setUpdateBy(loginUser.getOpenId()); |
| | | receiveAddress.setAddrUserid(loginUser.getOpenId()); |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.component.tools.WxUtils; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.dao.CustomerDataDictionaryDao; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.shopXcx.api.service.WxShopRefundRecordService; |
| | | import com.matrix.system.shopXcx.api.tools.SMSTools; |
| | |
| | | @RequestMapping(value = "wxapi/RefundRecord") |
| | | public class WxRefundRecordAction { |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | @Autowired |
| | | private ShopRefundRecordDao refundRecordDao; |
| | | @Autowired |
| | |
| | | @PostMapping(value = "/saveRefundRecord") |
| | | public @ResponseBody |
| | | AjaxResult saveRefundRecord(@RequestBody ShopRefundRecord refundRecord) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | refundRecord.setCreateBy(loginUser.getOpenId()); |
| | | refundRecord.setUpdateBy(loginUser.getOpenId()); |
| | | refundRecord.setUserId(loginUser.getId()); |
| | |
| | | @PostMapping("/findRefundRecord") |
| | | @ResponseBody |
| | | public AjaxResult getRefundRecordByUserId(@RequestBody ShopRefundRecord refundRecord) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | refundRecord.setUserId(loginUser.getId()); |
| | | List<ShopRefundRecord> list = refundRecordDao.selectByRefundUserId(refundRecord); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, list, list.size()); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanOrderDao; |
| | | import com.matrix.system.fenxiao.service.ShopSalesmanApplyService; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.shopXcx.api.dto.SaleOrderDto; |
| | | import com.matrix.system.shopXcx.vo.SalesOrderVo; |
| | | import io.swagger.annotations.Api; |
| | |
| | | ShopSalesmanApplyService shopSalesmanApplyService; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | private SysVipInfoDao sysVipInfoDao; |
| | |
| | | @ApiResponse(code = 200, message = "ok", response = SalesOrderVo.class) |
| | | }) |
| | | AjaxResult getInvitationuserList(@RequestBody @Validated SaleOrderDto saleOrderDto) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | Page<SalesOrderVo> page=new Page<>(saleOrderDto.getPageNum(),saleOrderDto.getPageSize()); |
| | | if(StringUtils.isBlank(saleOrderDto.getSort())){ |
| | | saleOrderDto.setSort("create_time"); |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | |
| | | @Autowired |
| | | private ShopSkuDao shopSkuDao; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @ApiOperation(value = "查询推广商品", notes = "") |
| | | @PostMapping(value = "/getSalesProductList") |
| | |
| | | shopProduct.setAbleSales(ShopProduct.ABLE_SALES); |
| | | shopProduct.setCompanyId(HostInterceptor.getCompanyId()); |
| | | List<ShopProduct> shopProducts = shopProductDao.selectByModelWx(shopProduct); |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectById(sysVipInfo.getSalesmanGrade()); |
| | | shopProducts.forEach(item->{ |
| | | List<ShopSku> shopSkus = shopSkuDao.selectByPid(item.getId()); |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | |
| | | |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | private SysVipInfoDao sysVipInfoDao; |
| | |
| | | @ApiResponse(code = 200, message = "ok", response = ShopRevenueFlow.class) |
| | | }) |
| | | AjaxResult getInvitationuserList(@RequestBody @Validated RevenueFlowDto revenueFlowDto) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | Page<ShopRevenueFlow> page=new Page<>(revenueFlowDto.getPageNum(),revenueFlowDto.getPageSize()); |
| | | revenueFlowDto.setUserId(loginUser.getId()); |
| | | IPage<ShopRevenueFlow> shopSalesmanApplyIPage = revenueFlowDao.selectRevenuFlowList(page, revenueFlowDto); |
| | |
| | | }) |
| | | @Transactional |
| | | AjaxResult withdrawalCash(@RequestBody @Validated WithdrawalCashDto withdrawalCashDto) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | loginUser=sysVipInfoDao.selectById(loginUser.getId()); |
| | | if(withdrawalCashDto.getAmount()<1){ |
| | | return AjaxResult.buildFailInstance("最小提现金额为1元"); |
| | |
| | | //扣除用户剩余提现金额 |
| | | loginUser.setWithdrawalCash(loginUser.getWithdrawalCash()-withdrawalCashDto.getAmount()); |
| | | sysVipInfoDao.update(loginUser); |
| | | redisUserLoginUtils.updateUserInfo(loginUser); |
| | | |
| | | |
| | | userCacheManager.updateUserInfo(loginUser); |
| | | return AjaxResult.buildSuccessInstance("提现成功"); |
| | | } |
| | | } |
| | |
| | | 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.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.component.tools.ImageUtil; |
| | | import com.matrix.component.tools.WxacodeUtil; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | |
| | | 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.init.UserCacheManager; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.fenxiao.constant.FenxiaoSettingConstant; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanApply; |
| | | import com.matrix.system.fenxiao.service.ShopSalesmanApplyService; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | | import com.matrix.system.hive.plugin.util.CollectionUtils; |
| | | import com.matrix.system.shopXcx.api.WeChatApiTools; |
| | | import com.matrix.system.shopXcx.dao.ShopProductDao; |
| | |
| | | import java.awt.*; |
| | | import java.awt.image.BufferedImage; |
| | | import java.io.File; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.stream.Collectors; |
| | |
| | | ShopSalesmanApplyService shopSalesmanApplyService; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | private SysVipInfoDao sysVipInfoDao; |
| | |
| | | @PostMapping(value = "/applyToBeAnSalesman") |
| | | @Transactional |
| | | public AjaxResult applyToBeAnSalesman(@RequestBody Map<String, String> param) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | Long invitationId=null; |
| | | if(StringUtils.isNotBlank(param.get("invitationId"))){ |
| | | invitationId = Long.parseLong(param.get("invitationId")); |
| | |
| | | } |
| | | ShopSalesmanApply shopSalesmanApply = shopSalesmanApplyService.applyToBeAnSalesman(loginUser.getId(), null, invitationId, ShopSalesmanApply.APPLY_WAY_SELF); |
| | | loginUser = sysVipInfoDao.selectById(loginUser.getId()); |
| | | redisUserLoginUtils.updateUserInfo(loginUser); |
| | | userCacheManager.updateUserInfo(loginUser); |
| | | return AjaxResult.buildSuccessInstance(shopSalesmanApply); |
| | | |
| | | |
| | |
| | | }) |
| | | @GetMapping(value = "/queryApplyProgress") |
| | | public AjaxResult queryApplyProgress() { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | QueryWrapper<ShopSalesmanApply> queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.eq("user_id", loginUser.getId()); |
| | | queryWrapper.eq("apply_status", ShopSalesmanApply.APPLY_STATUS_DSH); |
| | |
| | | return AjaxResult.buildFailInstance("请求参数错误"); |
| | | } |
| | | |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | if (invitationId.equals(loginUser.getId())) { |
| | | return AjaxResult.buildSuccessInstance("不能绑定自己"); |
| | | } |
| | |
| | | @PostMapping(value = "/getInvitationPoster") |
| | | AjaxResult getInvitationPoster() { |
| | | try { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | |
| | | String baseSavePath = PropertiesUtil.getString(AppConstance.FILES_TORAGE_PATH); |
| | | // 图片访问URL |
| | |
| | | @ApiResponse(code = 200, message = "ok", response = SalesmanVo.class) |
| | | }) |
| | | AjaxResult getInvitationuserList(@RequestBody BasePageQueryDto pageDto) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | Page<SalesmanVo> page = new Page<>(pageDto.getPageNum(), pageDto.getPageSize()); |
| | | IPage<SalesmanVo> shopSalesmanApplyIPage = salesmanApplyDao.selectInvitationuserInPage(page, loginUser.getId(), pageDto.getKeywords()); |
| | | AjaxResult result = AjaxResult.buildSuccessInstance(shopSalesmanApplyIPage.getRecords()); |
| | |
| | | @ApiResponse(code = 200, message = "ok", response = SalesmanCenterInfo.class) |
| | | }) |
| | | AjaxResult getSalesmanCenterInfo() { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | SalesmanCenterInfo salesmanCenterInfo = salesmanApplyDao.selectSalesmanCenterInfo(loginUser.getId()); |
| | | return AjaxResult.buildSuccessInstance(salesmanCenterInfo); |
| | | } |
| | |
| | | @ApiResponse(code = 200, message = "ok", response = SalesmanApplyCondition.class) |
| | | }) |
| | | AjaxResult getSalesmanApplyCondition() { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | VerificationResult ableToBeAnSalesman = shopSalesmanApplyService.isAbleToBeAnSalesman(loginUser.getId(), loginUser.getCompanyId()); |
| | | SalesmanApplyCondition applyConditionInfo = new SalesmanApplyCondition(); |
| | | applyConditionInfo.setIsAbleApply(ableToBeAnSalesman.isJudgeResult()); |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.component.tools.ImageUtil; |
| | | import com.matrix.component.tools.WxacodeUtil; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | |
| | | private ShopProductDao shopProductDao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | private ShopShareQrcordDao shareQrcordDao; |
| | |
| | | @RequestMapping(value = "/getProductShareQrcode") |
| | | public @ResponseBody |
| | | AjaxResult getwxacode1(@RequestBody QrcodeVo qrcodeVo) throws Exception { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | loginUser = sysVipInfoDao.selectById(loginUser.getId()); |
| | | //活动类型 |
| | | ShopActivities activities=null; |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.shopXcx.api.service.WXShopOrderService; |
| | |
| | | private ShopProductDao shopProductDao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | private WxShopActivitiesGroupService wxShopActivitiesGroupService; |
| | |
| | | */ |
| | | @GetMapping(value = "/findOwnerGroupBuyInfo/{actId}") |
| | | public AjaxResult findOwnerGroupBuyInfo(@PathVariable("actId") Long actId) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | |
| | | // 1、判断该用户在该活动中有没有正在拼团 若有,则返回正在拼团的用户列表,若没有则返回gruoping=1且返回正在拼团的拼团列表, 若加入了团未完成付款,则需要再做设置 |
| | | ShopActivitiesGroupJoin isExsit = shopActivitiesGroupJoinDao.selectIsExistGroupInfoByUserId(actId, sysVipInfo.getOpenId()); |
| | |
| | | */ |
| | | @GetMapping(value = "/findGroupJoinInfo/{gjId}") |
| | | public AjaxResult findGroupJoinInfo(@PathVariable Long gjId) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | ShopActivitiesGroupJoin groupJoin = shopActivitiesGroupJoinDao.selectOwnerGroupJoinInfo(gjId); |
| | | int isExist = 2; |
| | | |
| | |
| | | |
| | | @PostMapping(value = "/calPrice") |
| | | public AjaxResult calPrice(@RequestBody CreateGroupBuyDTO createGroupBuyDTO) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | ShopActivitiesGroupPrice groupPrice = shopActivitiesGroupPriceDao.selectById(createGroupBuyDTO.getGpId()); |
| | | // 判断参数中gjId是否为空,若为空则为团长开团。再判断团长价是否为空,如果不为空则拥有团长价 |
| | | if (createGroupBuyDTO.getGjId() == null) { |
| | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.activity.dao.ActivitySignAwardSetDao; |
| | |
| | | private ShopActivitiesDao shopActivitiesDao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | private ActivitySignAwardSetDao activitySignAwardSetDao; |
| | |
| | | @GetMapping(value = "/getLuckydrawBasicInfo") |
| | | public AjaxResult getLuckydrawBasicInfo() { |
| | | //获取登录人信息 |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | Long companyId = loginUser.getCompanyId(); |
| | | Long userId = loginUser.getId(); |
| | | //获取抽奖活动的信息 |
| | |
| | | @ResponseBody |
| | | @Transactional |
| | | public AjaxResult clickLuckyDraw(@PathVariable("actId") long actId) { |
| | | SysVipInfo user = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo user = userCacheManager.getLoginUser(); |
| | | Long userId = user.getId(); |
| | | Long companyId = user.getCompanyId(); |
| | | /** |
| | |
| | | @GetMapping(value = "scoreLuckyDraw/{actId}") |
| | | @ResponseBody |
| | | public AjaxResult logisticsInsureById(@PathVariable("actId") Long actId) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | Long userId = loginUser.getId(); |
| | | Long companyId = loginUser.getCompanyId(); |
| | | //获取用户总积分 |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | |
| | | private ShopActivitiesSalonAttributeDao shopActivitiesSalonAttributeDao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | private ShopActivitiesSalonRecordDao shopActivitiesSalonRecordDao; |
| | |
| | | */ |
| | | @GetMapping(value = "/findSalonInfoById/{id}") |
| | | public AjaxResult findSalonInfoById(@PathVariable("id") Long id) { |
| | | SysVipInfo user = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo user = userCacheManager.getLoginUser(); |
| | | ShopActivities shopActivities = shopActivitiesDao.selectSalonActivityById(id); |
| | | ShopActivitiesSalonRecord salonRecord = shopActivitiesSalonRecordDao.selectSalonRecordByUserIdAndActId(user.getOpenId(), id); |
| | | AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功"); |
| | |
| | | @PostMapping(value = "/joinSalonActivity") |
| | | @Transactional |
| | | public AjaxResult joinSalonActivity(@RequestBody CreateSalonDTO salonDTO) { |
| | | SysVipInfo user = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo user = userCacheManager.getLoginUser(); |
| | | |
| | | ShopActivities shopActivities = shopActivitiesDao.selectById(salonDTO.getActId()); |
| | | if (shopActivities == null) { |
| | |
| | | */ |
| | | @RequestMapping(value = "/findSalonListByUser") |
| | | public AjaxResult findSalonListByUser(@RequestBody SalonVO salonVO) { |
| | | SysVipInfo user = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo user = userCacheManager.getLoginUser(); |
| | | salonVO.setUserId(user.getOpenId()); |
| | | List<ShopActivities> list = shopActivitiesDao.selectSalonActivityByUser(salonVO); |
| | | return AjaxResult.buildSuccessInstance(list); |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.shopXcx.api.service.WXShopOrderService; |
| | | import com.matrix.system.shopXcx.api.service.WxShopActivitiesSecKillService; |
| | |
| | | private WxShopActivitiesSecKillService wxShopActvitiesSecKillService; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | |
| | | /** |
| | |
| | | */ |
| | | @PostMapping(value = "/calSecKillPrice") |
| | | public AjaxResult calSecKillPrice(@RequestBody SecKillVO secKillVO) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | ShopActivitiesSeckillInfo seckillInfo = shopActivitiesSeckillInfoDao.selectById(secKillVO.getId()); |
| | | if (seckillInfo == null) { |
| | | return AjaxResult.buildFailInstance("参数有误"); |
| | |
| | | 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.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.activity.dao.ActivitySignAwardSetDao; |
| | |
| | | private ShopActivitiesDao shopActivitiesDao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | private ActivitySignAwardSetDao activitySignAwardSetDao; |
| | |
| | | @GetMapping(value = "/getSignBasicInfo") |
| | | public AjaxResult getSignBasicInfo() { |
| | | //获取登录人信息 |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | Long companyId = loginUser.getCompanyId(); |
| | | Long userId = loginUser.getId(); |
| | | //获取签到活动的信息 |
| | |
| | | @ResponseBody |
| | | public AjaxResult getSignRecord(@PathVariable("actId") long actId,@PathVariable("month") String dateStr) { |
| | | //获取登录人信息 |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | Long companyId = loginUser.getCompanyId(); |
| | | Long userId = loginUser.getId(); |
| | | Date date = DateUtil.parse(dateStr); |
| | |
| | | @ResponseBody |
| | | @Transactional |
| | | public AjaxResult clickSign(@PathVariable("actId") long actId) { |
| | | SysVipInfo user = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo user = userCacheManager.getLoginUser(); |
| | | Long userId = user.getId(); |
| | | Long companyId = user.getCompanyId(); |
| | | /** |
| | |
| | | @ApiResponse(code = 200, message = "ok", response = SignAwardListVo.class) |
| | | }) |
| | | public AjaxResult getSignAwardList(@RequestBody @Validated SignAwardDto signAwardDto) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | Page<SalesOrderVo> page=new Page<>(signAwardDto.getPageNum(),signAwardDto.getPageSize()); |
| | | if(StringUtils.isBlank(signAwardDto.getSort())){ |
| | | signAwardDto.setSort("create_time"); |
| | |
| | | @ApiResponse(code = 200, message = "ok", response = SeeAwardTextVo.class) |
| | | }) |
| | | public AjaxResult seeAwardText(@RequestBody @Validated SeeAwardTextDto seeAwardTextDto) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | seeAwardTextDto.setUserId(loginUser.getId()); |
| | | seeAwardTextDto.setCompanyId(loginUser.getCompanyId()); |
| | | SeeAwardTextVo seeAwardTextVO = activitySignReceiveRecordDao.selectSeeAwardTextVOById(seeAwardTextDto); |
| | |
| | | @ApiResponse(code = 200, message = "ok", response = SeeAwardTextVo.class) |
| | | }) |
| | | public AjaxResult logisticsInsure(@RequestBody @Validated SeeAwardTextDto seeAwardTextDto) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | seeAwardTextDto.setUserId(loginUser.getId()); |
| | | seeAwardTextDto.setCompanyId(loginUser.getCompanyId()); |
| | | SeeAwardTextVo seeAwardTextVO = activitySignReceiveRecordDao.selectSeeAwardTextVOById(seeAwardTextDto); |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | |
| | | @Autowired |
| | | private ShopCouponDao shopCouponDao; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | /** |
| | | * 获取可以领取的优惠券 |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanGrade; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | import com.matrix.system.common.dao.CustomerDataDictionaryDao; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanGradeDao; |
| | | import com.matrix.system.fenxiao.entity.ShopSalesmanGrade; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.shopXcx.api.service.WxShopCouponService; |
| | | import com.matrix.system.shopXcx.bean.*; |
| | | import com.matrix.system.shopXcx.dao.*; |
| | |
| | | private ShopArticleDao shopArticleDao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | WxShopCouponService shopCouponService; |
| | |
| | | @RequestMapping(value = "/getProductById/{shopId}/{id}") |
| | | @ResponseBody |
| | | public AjaxResult getProductById(@PathVariable Long shopId, @PathVariable("id") Integer id) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | ShopProduct shopProduct = shopProductDao.selectById(id); |
| | | if (shopProduct == null) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, "没有查询到商品"); |
| | |
| | | |
| | | |
| | | |
| | | if (redisUserLoginUtils.isUserLogin()) { |
| | | if (userCacheManager.isUserLogin()) { |
| | | //查询产品适配的优惠券 |
| | | result.putInMap("couponList", shopCouponService.getCouponListByProductId(id)); |
| | | //查询产品是否被用户收藏 |
| | | result.putInMap("checkCollect", CollectionUtils.isNotEmpty(collectionDao.selectByUserIdAndProid(id, redisUserLoginUtils.getLoginUser(SysVipInfo.class).getOpenId()))); |
| | | SysVipInfo user=userCacheManager.getLoginUser(); |
| | | result.putInMap("checkCollect", CollectionUtils.isNotEmpty(collectionDao.selectByUserIdAndProid(id, user.getOpenId()))); |
| | | } else { |
| | | result.putInMap("checkCollect", false); |
| | | } |
| | |
| | | * @param shopProduct |
| | | */ |
| | | private void saveSearchHistroy(@RequestBody ShopProduct shopProduct) { |
| | | SysVipInfo bigUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo bigUser = userCacheManager.getLoginUser(); |
| | | ShopSearchRecord searchBean = new ShopSearchRecord(); |
| | | if (StringUtils.isNotBlank(shopProduct.getTitle())) { |
| | | searchBean.setSearchType(AppConstance.SEARCH_TYPE); |
| | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.score.dao.ScoreUseRecordDao; |
| | | import com.matrix.system.score.dao.ScoreVipDetailDao; |
| | |
| | | public class WxShopScoreAction { |
| | | |
| | | @Autowired |
| | | RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | ScoreUseRecordDao scoreUseRecordDao; |
| | |
| | | @ApiResponse(code = 200, message = "ok", response = ScoreUseRecordVo.class) |
| | | }) |
| | | AjaxResult getFlowList(@RequestBody @Validated ScoreFlowDto scoreFlowDto) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | Page<ScoreUseRecordVo> page=new Page<>(scoreFlowDto.getPageNum(),scoreFlowDto.getPageSize()); |
| | | scoreFlowDto.setVipId(loginUser.getId()); |
| | | IPage<ScoreUseRecordVo> shopScoreRecord = scoreUseRecordDao.selectFlowList(page, scoreFlowDto); |
| | |
| | | @ApiResponse(code = 200, message = "ok", response = AjaxResult.class) |
| | | }) |
| | | AjaxResult getUserScore() { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | AjaxResult result=AjaxResult.buildSuccessInstance(scoreVipDetailDao.selectUserTotalScore(loginUser.getId())); |
| | | return result; |
| | | } |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.constance.SystemErrorCode; |
| | | import com.matrix.core.constance.SystemMessageCode; |
| | | import com.matrix.core.exception.GlobleException; |
| | |
| | | @Autowired |
| | | private ShopShoppingCartDao shoppingCartDao; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | WxShopCouponService shopCouponService; |
| | |
| | | @PostMapping("/findShoppingCart") |
| | | @ResponseBody |
| | | public AjaxResult getShoppingCartByUserId(@RequestBody ShopShoppingCart shoppingCart) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | List<ShopShoppingCart> list = shoppingCartDao.selectByCartUserId(shoppingCart.getShopId(),loginUser.getId()); |
| | | List<ShopCartVo> shopCartVoList = shoppingCartService.buildShopCart(list); |
| | | AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, shopCartVoList, shopCartVoList.size()); |
| | |
| | | public |
| | | @ResponseBody |
| | | AjaxResult getUserCartCount(@PathVariable("shopId") Long shopId) { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | Integer userCartCount = shoppingCartDao.selectUserCartCount(shopId, loginUser.getId()); |
| | | if (userCartCount == null) { |
| | | userCartCount = 0; |
| | |
| | | |
| | | shoppingCart.setCartProductId(sku.getpId()); |
| | | |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | shoppingCart.setCreateBy(loginUser.getOpenId()); |
| | | shoppingCart.setUpdateBy(loginUser.getOpenId()); |
| | | shoppingCart.setCartUserId(loginUser.getId()); |
| | |
| | | @ResponseBody |
| | | public AjaxResult updateCartAllSelected(@PathVariable("isSelected") Integer isSelected, |
| | | @PathVariable("shopId") Long shopId) { |
| | | SysVipInfo user = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo user = userCacheManager.getLoginUser(); |
| | | shoppingCartDao.updateAllSelected(user.getOpenId(), shopId, isSelected); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, "修改成功"); |
| | | } |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.StringUtils; |
| | |
| | | private SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | private ShopProductDao shopProductDao; |
| | | |
| | | @RequestMapping(value = "/showSkinList") |
| | | public @ResponseBody AjaxResult showSkinList(@RequestBody SkinCheckDTO skinCheckDTO) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | PaginationVO pageVo = new PaginationVO(); |
| | | pageVo.setLimit(skinCheckDTO.getLimit()); |
| | | pageVo.setOffset(skinCheckDTO.getOffset()); |
| | |
| | | |
| | | import cn.hutool.core.bean.BeanUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.component.tools.HttpCurlUtil; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.tools.LogUtil; |
| | |
| | | @Autowired |
| | | BusParameterSettingsDao busParameterSettingsDao; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | @Autowired |
| | | ShopSalesmanApplyDao salesmanApplyDao; |
| | | |
| | |
| | | } |
| | | // 存放redis |
| | | sysVipInfo.setLevelCard(null); |
| | | String token = redisUserLoginUtils.saveUserInfo(sysVipInfo); |
| | | String token = userCacheManager.saveUserInfo(sysVipInfo); |
| | | LogUtil.info("用户token={}", token); |
| | | res.putInMap("token", token); |
| | | res.putInMap("userInfo", sysVipInfo); |
| | |
| | | @RequestMapping(value = "/findUserInfo") |
| | | public @ResponseBody |
| | | AjaxResult findUserInfo() { |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | SysVipInfo sysVipInfo = sysVipInfoService.findById(loginUser.getId()); |
| | | sysVipInfo.setPointAll(scoreVipDetailDao.selectUserTotalScore(loginUser.getId())); |
| | | sysVipInfo.setBalance(moneyCardUseDao.selectVipCardTotalMoney(loginUser.getId())); |
| | |
| | | public @ResponseBody |
| | | AjaxResult saveUserInfo(@RequestBody XcxUserSaveUserInfoDto xcxUserSaveUserInfoDto) { |
| | | |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo loginUser = userCacheManager.getLoginUser(); |
| | | SysVipInfo sysVipInfo = new SysVipInfo(); |
| | | sysVipInfo.setId(loginUser.getId()); |
| | | |
| | |
| | | if ((loginUser.getIsSales() == null || loginUser.getIsSales() == 2) |
| | | && StringUtils.isNotBlank(sysVipInfo.getNickName())) {//目前还不是分销员 |
| | | BusParameterSettings fxSwith = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_SWITCH, HostInterceptor.getCompanyId()); |
| | | if (fxSwith.getParamValue().equals("1")) {//开启分销 |
| | | if (fxSwith!=null && fxSwith.getParamValue().equals("1")) {//开启分销 |
| | | BusParameterSettings applyWay = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_APPLY_WAY, loginUser.getCompanyId()); |
| | | if (applyWay.getParamValue().equals(FenxiaoSettingConstant.FX_APPLY_WAY_AUTO)) {//自动成为分销员 |
| | | QueryWrapper<ShopSalesmanApply> queryWrapper = new QueryWrapper<>(); |
| | |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.shopXcx.dao.ShopSearchRecordDao; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | private ShopSearchRecordDao shopSearchRecordDao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | /** |
| | | * 查询搜索记录 |
| | |
| | | @RequestMapping(value = "/getSearchRecordList") |
| | | @ResponseBody |
| | | public AjaxResult getSearchRecordList(){ |
| | | SysVipInfo bigUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo bigUser = userCacheManager.getLoginUser(); |
| | | if(bigUser == null){ |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL,"用户未授权"); |
| | | } |
| | |
| | | @RequestMapping(value = "/deleteSearchRecord") |
| | | @ResponseBody |
| | | public AjaxResult deleteSearchRecord(){ |
| | | SysVipInfo bigUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo bigUser = userCacheManager.getLoginUser(); |
| | | shopSearchRecordDao.deleteByUserId(bigUser.getOpenId()); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS,"删除成功"); |
| | | } |
| | |
| | | package com.matrix.system.shopXcx.api.action; |
| | | |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.VerifyResult; |
| | |
| | | private SysBeauticianStateService sysBeauticianStateService; |
| | | |
| | | @Autowired |
| | | RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | ShopProductDao productDao; |
| | |
| | | @Autowired |
| | | SysVipInfoDao sysVipInfoDao; |
| | | |
| | | @Autowired |
| | | RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @Autowired |
| | | SysProjUseDao projUseDao; |
| | |
| | | @RequestMapping(value = "/createServiceOrder") |
| | | public @ResponseBody |
| | | AjaxResult createServiceOrder(@RequestBody Onlinebooking onlinebooking) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | SysVipInfo vipInfo = vipInfoDao.selectByPhone(sysVipInfo.getPhone(),HostInterceptor.getCompanyId()); |
| | | SysProjUse sysProjUse = projUseDao.selectById(Long.parseLong(onlinebooking.getProductId() + "")); |
| | | Date yyTime = DateUtil.stringToDate(onlinebooking.getTimeStr(), DateUtil.DATE_FORMAT_MM); |
| | |
| | | @PostMapping(value = "/getServiceOrderList") |
| | | @ResponseBody |
| | | public AjaxResult findServiceOrderList(@RequestBody @Validated ErpServiceOrderListDto orderListDto) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | orderListDto.setVipId(sysVipInfo.getId()); |
| | | List<ErpServiceOrderListVo> apiServiceOrderListInPage = projServicesDao.findWxServiceOrderList(orderListDto); |
| | | return AjaxResult.buildSuccessInstance(apiServiceOrderListInPage,"查询成功"); |
| | |
| | | package com.matrix.system.shopXcx.api.service; |
| | | |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | |
| | | @Autowired |
| | | private ShopShoppingCartDao shoppingCartDao; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | WxShopCouponService shopCouponService; |
| | |
| | | package com.matrix.system.shopXcx.api.service; |
| | | |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.tools.LogUtil; |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.shopXcx.api.vo.ShopCartBillVo; |
| | |
| | | @Autowired |
| | | private ShopShoppingCartDao shoppingCartDao; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | WxShopCouponService shopCouponService; |
| | |
| | | import cn.hutool.core.collection.CollUtil; |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.component.tools.WxUtils; |
| | | import com.matrix.component.wechat.externalInterface.protocol.paramProtocol.BrandWCPayRequestData; |
| | | import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil; |
| | |
| | | import com.matrix.system.common.dao.BusParameterSettingsDao; |
| | | import com.matrix.system.common.dao.CustomerDataDictionaryDao; |
| | | import com.matrix.system.common.interceptor.HostInterceptor; |
| | | import com.matrix.system.constance.Dictionary; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.system.hive.dao.ShoppingGoodsDao; |
| | | import com.matrix.system.hive.dao.SysVipInfoDao; |
| | |
| | | @Autowired |
| | | private WxShopOrderUtil wxShopOrderUtil; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | @Autowired |
| | | private WeixinServiceUtil weixinServiceUtil; |
| | | @Autowired |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public ShopOrder createShopOrder(ShopOrderDto shopOrderDto) throws Exception { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | |
| | | |
| | | |
| | |
| | | //支付总积分 |
| | | Integer scoreCount=0; |
| | | |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | |
| | | //计算购物车中物品的优惠信息 |
| | | List<OrderItemDto> orderItemDtos = shopOrderDto.getOrderItemList() |
| | |
| | | */ |
| | | @Override |
| | | public AjaxResult getMyOrderInfo(OrderInfoQueryPOJO orderInfoQueryPOJO) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | orderInfoQueryPOJO.setSort("update_time"); |
| | | if (orderInfoQueryPOJO.getOffset() >= 1) { |
| | | orderInfoQueryPOJO.setOffset((orderInfoQueryPOJO.getOffset() - 1) * orderInfoQueryPOJO.getLimit()); |
| | |
| | | */ |
| | | @Override |
| | | public AjaxResult getOrderInfoById(Integer orderId) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | ShopOrder shopOrder = shopOrderDao.selectOrderInfoById(sysVipInfo.getId(), orderId); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, Arrays.asList(shopOrder)); |
| | | } |
| | |
| | | } |
| | | if (shopOrder.getDiscountAmount() != null && shopOrder.getDiscountAmount().compareTo(BigDecimal.ZERO) > 0) { |
| | | ShopCouponRecord shopCouponRecord = new ShopCouponRecord(); |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | shopCouponRecord.setUserId(sysVipInfo.getId()); |
| | | shopCouponRecord.setOrderId(orderId); |
| | | List<ShopCouponRecord> recordList = shopCouponRecordDao.selectByModel(shopCouponRecord); |
| | |
| | | * @param orderId |
| | | * @return |
| | | */ |
| | | @Autowired |
| | | RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @Override |
| | | public AjaxResult findOrderPayStatus(Integer orderId) { |
| | |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.component.tools.WxUtils; |
| | | import com.matrix.component.wechat.externalInterface.protocol.paramProtocol.BrandWCPayRequestData; |
| | | import com.matrix.core.exception.GlobleException; |
| | |
| | | private ShopActivitiesGroupInfoDao shopActivitiesGroupInfoDao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | private ShopActivitiesGroupPriceDao shopActivitiesGroupPriceDao; |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult createGroupBuy(CreateGroupBuyDTO createGroupBuyDTO) throws Exception { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | |
| | | ShopActivitiesGroupPrice groupPrice = shopActivitiesGroupPriceDao.selectById(createGroupBuyDTO.getGpId()); |
| | | ShopActivitiesGroupInfo groupInfo = shopActivitiesGroupInfoDao.selectGroupInfoByActId(groupPrice.getActId()); |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public AjaxResult joinGroupBuy(CreateGroupBuyDTO createGroupBuyDTO) throws Exception { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | |
| | | // TODO 需判断拼团结束时间以及当前拼团是否已满员 |
| | | |
| | |
| | | if (shopReceiveAddress == null) { |
| | | throw new GlobleException("请选择正确的收获地址"); |
| | | } |
| | | SysVipInfo user=redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo user=userCacheManager.getLoginUser(); |
| | | ShopOrder shopOrder = new ShopOrder(); |
| | | shopOrder.setCompanyId(user.getCompanyId()); |
| | | shopOrder.setStoreId(Integer.parseInt(createGroupBuyDTO.getShopId().toString())); |
| | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.component.tools.WxUtils; |
| | | import com.matrix.component.wechat.externalInterface.protocol.paramProtocol.BrandWCPayRequestData; |
| | | import com.matrix.core.exception.GlobleException; |
| | |
| | | @Autowired |
| | | private ShopOrderDetailsDao shopOrderDetailsDao; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | @Autowired |
| | | private ShopActivitiesSeckillRecordDao shopActivitiesSeckillRecordDao; |
| | | |
| | | @Override |
| | | public AjaxResult createSecKillOrder(CreateSecKillDTO secKillDTO) throws Exception { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | ShopActivitiesSeckillInfo seckillInfo = shopActivitiesSeckillInfoDao.selectById(secKillDTO.getId()); |
| | | if (seckillInfo == null) { |
| | | return AjaxResult.buildFailInstance("秒杀不存在"); |
| | |
| | | } |
| | | |
| | | private ShopOrder createOrder(CreateSecKillDTO secKillDTO) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | ShopReceiveAddress shopReceiveAddress = shopReceiveAddressDao.selectById(secKillDTO.getAddressId()); |
| | | if (shopReceiveAddress == null) { |
| | | throw new GlobleException("请选择正确的收获地址"); |
| | |
| | | package com.matrix.system.shopXcx.api.service.impl; |
| | | |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.core.pojo.PaginationVO; |
| | | import com.matrix.core.tools.LogUtil; |
| | |
| | | @Autowired |
| | | private WxShopOrderUtil wxShopOrderUtil; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | @Autowired |
| | | private ShopCouponDao shopCouponDao; |
| | | @Autowired |
| | |
| | | List<CouponReceiveInfoVO> shopCoupons = new ArrayList<>(); |
| | | |
| | | |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | //1.找到用户所有的优惠券 |
| | | List<CouponReceiveInfoVO> userAllCoupon = shopCouponRecordDao.selectMyCouponByStatus(companyId, sysVipInfo.getId(), AppConstance.MY_COUPON_NOT_USE, |
| | | null); |
| | |
| | | */ |
| | | @Override |
| | | public AjaxResult getUsableCoupon(PaginationVO pageVo) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | boolean newPeople = wxShopCouponUtil.verifyIsNewPeople(sysVipInfo.getId()); |
| | | List<ShopCoupon> list = shopCouponDao.selectUsableCoupon(newPeople, sysVipInfo.getOpenId(), pageVo); |
| | | return new AjaxResult(AjaxResult.STATUS_SUCCESS, list); |
| | |
| | | @Override |
| | | public AjaxResult receiveCoupon(Integer couponId) { |
| | | ShopCoupon shopCoupon = shopCouponDao.selectById(couponId); |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | |
| | | // 如果没有找到该优惠券 |
| | | if (shopCoupon == null) { |
| | |
| | | */ |
| | | @Override |
| | | public AjaxResult getMyCouponInfoByStatus(Long companyId, Integer status, PaginationVO pageVo) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | // 如果查询使用或未使用状态的优惠券列表 |
| | | if (AppConstance.MY_COUPON_USE.equals(status) || AppConstance.MY_COUPON_NOT_USE.equals(status)) { |
| | | List<CouponReceiveInfoVO> list = shopCouponRecordDao.selectMyCouponByStatus(companyId,sysVipInfo.getId(), status, |
| | |
| | | attrIds.addAll(ids); |
| | | } |
| | | } |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | List<ShopCoupon> list = shopCouponDao.selectUsableCouponByProductInfo(sysVipInfo.getOpenId(), productId, |
| | | attrIds); |
| | | return list; |
| | |
| | | */ |
| | | @Override |
| | | public AjaxResult getCouponListByTag(String tag, Long companyId) { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | boolean newPeople = wxShopCouponUtil.verifyIsNewPeople(sysVipInfo.getId()); |
| | | List<ShopCoupon> couponList = shopCouponDao.selectCouponListByTag(newPeople, sysVipInfo.getOpenId(), tag,companyId); |
| | | AjaxResult res = new AjaxResult(AjaxResult.STATUS_SUCCESS, couponList); |
| | |
| | | package com.matrix.system.shopXcx.api.tools; |
| | | |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.system.shopXcx.api.service.WxShopMemberDayService; |
| | | import com.matrix.system.shopXcx.bean.ShopOrder; |
| | | import com.matrix.system.shopXcx.dao.ShopCouponRecordDao; |
| | |
| | | @Autowired |
| | | private ShopOrderDao shopOrderDao; |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | @Autowired |
| | | private ShopCouponRecordDao shopCouponRecordDao; |
| | | @Autowired |
| | |
| | | public void handle(Map<String,Object> param){ |
| | | try { |
| | | |
| | | JSONObject messageJsonParam=JSONObject.parseObject(param.get("messages").toString()); |
| | | |
| | | if(!messageJsonParam.containsKey("companyId")||(!messageJsonParam.containsKey("templateCode"))){ |
| | | if(!param.containsKey("companyId")||(!param.containsKey("templateCode"))){ |
| | | LogUtil.error("小程序消息推送参数格式异常发送模板消息需要传JSONO字符串作为格式 例如:{\"companyId\":17,\"templateCode\":10000} companyId 、templateCode 是必须属性"); |
| | | return; |
| | | } |
| | | Long companyId = Long.parseLong( messageJsonParam.get("companyId").toString()); |
| | | Integer templateCode = Integer.parseInt( messageJsonParam.get("templateCode").toString()); |
| | | Long companyId = Long.parseLong( param.get("companyId").toString()); |
| | | Integer templateCode = Integer.parseInt( param.get("templateCode").toString()); |
| | | |
| | | //获取公司微信配置参数 |
| | | BusParameterSettings xcxAppId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_APPID, companyId); |
| | |
| | | bulderParam.put("xcxAppId", xcxAppId.getParamValue()); |
| | | bulderParam.put("gzhAppid", gzhAppid.getParamValue()); |
| | | bulderParam.put("template_id", template.getUuid()); |
| | | bulderParam.put("messageJsonParam", messageJsonParam); |
| | | bulderParam.put("messageJsonParam", param); |
| | | //调用模板计算出消息体 |
| | | Map msgResult = templateMessageBulder.buildMsg(bulderParam); |
| | | |
| | |
| | | |
| | | |
| | | #rabbitMQ配置 |
| | | rabbitmq.host=47.111.134.136 |
| | | rabbitmq.port=5672 |
| | | rabbitmq.username=hivequeue |
| | | rabbitmq.password=hivequeueadmin |
| | | #rabbitmq.host=47.111.134.136 |
| | | #rabbitmq.port=5672 |
| | | #rabbitmq.username=hivequeue |
| | | #rabbitmq.password=hivequeueadmin |
| | | useRabbit=false |
| | | |
| | | server.session.timeout=120 |
| | |
| | | maxUploadSize=10485760 |
| | | |
| | | #Matser\u7684ip\u5730\u5740 |
| | | redis.hostname=120.27.238.55 |
| | | #redis.hostname=120.27.238.55 |
| | | #\u7AEF\u53E3\u53F7 |
| | | redis.port=6379 |
| | | #redis.port=6379 |
| | | #\u5982\u679C\u6709\u5BC6\u7801 |
| | | redis.password=xcong123 |
| | | #redis.password=xcong123 |
| | | #\u5BA2\u6237\u7AEF\u8D85\u65F6\u65F6\u95F4\u5355\u4F4D\u662F\u6BEB\u79D2 \u9ED8\u8BA4\u662F2000 |
| | | redis.timeout=10000 |
| | | redis.database=2 |
| | | redis_time_out=1800000 |
| | | #redis.timeout=10000 |
| | | #redis.database=2 |
| | | #redis_time_out=1800000 |
| | | cookie_time_out=36000 |
| | | |
| | | #APP登录公钥 |
| | |
| | | log4j.appender.STDOUT = org.apache.log4j.ConsoleAppender |
| | | log4j.appender.STDOUT.Target = System.out |
| | | log4j.appender.STDOUT.Threshold = DEBUG |
| | | log4j.appender.STDOUT.MaxFileSize = 100M |
| | | log4j.appender.STDOUT.layout = org.apache.log4j.PatternLayout |
| | | log4j.appender.STDOUT.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss.SSS}-[ %X{Tr} ] [ %p ]-[ %t ] %m%n |
| | | log4j.appender.STDOUT.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss.SSS}-[ %X{Tr} ] [ %p ]-[ %t ] %m%n |
| | | |
| | | |
| | | ### 输出DEBUG 级别以上的日志到=/error.log ### |
| | | # 输出DEBUG 级别以上的日志到=/error.log ### |
| | | log4j.appender.DEBUG = com.matrix.core.tools.MatrixFileAppender |
| | | log4j.appender.DEBUG.File = /debug.log |
| | | log4j.appender.DEBUG.Append = true |
| | | log4j.appender.DEBUG.Threshold = DEBUG |
| | | log4j.appender.DEBUG.Threshold = DEBUG |
| | | log4j.appender.DEBUG.MaxFileSize = 100M |
| | | log4j.appender.DEBUG.MaxBackupIndex = 7 |
| | | log4j.appender.DEBUG.layout = org.apache.log4j.PatternLayout |
| | | log4j.appender.DEBUG.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss.SSS}-[ %X{Tr} ] [ %p ]-[ %t ] %m%n |
| | | |
| | | log4j.appender.INFO = com.matrix.core.tools.MatrixFileAppender |
| | | log4j.appender.INFO.File = /info.log |
| | | log4j.appender.INFO.Append = true |
| | | log4j.appender.INFO.Threshold = INFO |
| | | log4j.appender.INFO.layout = org.apache.log4j.PatternLayout |
| | | log4j.appender.INFO.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss.SSS}-[ %X{Tr} ] [ %p ]-[ %t ] %m%n |
| | | #log4j.appender.INFO = com.matrix.core.tools.MatrixFileAppender |
| | | #log4j.appender.INFO.File = /info.log |
| | | #log4j.appender.INFO.Append = true |
| | | #log4j.appender.INFO.Threshold = INFO |
| | | #log4j.appender.INFO.MaxBackupIndex = 5 |
| | | #log4j.appender.INFO.layout = org.apache.log4j.PatternLayout |
| | | #log4j.appender.INFO.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss.SSS}-[ %X{Tr} ] [ %p ]-[ %t ] %m%n |
| | | |
| | | log4j.appender.WARN = com.matrix.core.tools.MatrixFileAppender |
| | | log4j.appender.WARN.File = /warn.log |
| | | log4j.appender.WARN.Append = true |
| | | log4j.appender.WARN.Threshold = WARN |
| | | log4j.appender.WARN.layout = org.apache.log4j.PatternLayout |
| | | log4j.appender.WARN.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss.SSS}-[ %X{Tr} ] [ %p ]-[ %t ] %m%n |
| | | |
| | | ### 输出ERROR 级别以上的日志到=/error.log ### |
| | | log4j.appender.ERROR = com.matrix.core.tools.MatrixFileAppender |
| | | log4j.appender.ERROR.File =/error.log |
| | | log4j.appender.ERROR.Append = true |
| | | log4j.appender.ERROR.Threshold = ERROR |
| | | log4j.appender.ERROR.layout = org.apache.log4j.PatternLayout |
| | | log4j.appender.ERROR.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss.SSS}-[ %X{Tr} ] [ %p ]-[ %t ] %m%n |
| | | #log4j.appender.WARN = com.matrix.core.tools.MatrixFileAppender |
| | | #log4j.appender.WARN.File = /warn.log |
| | | #log4j.appender.WARN.Append = true |
| | | #log4j.appender.WARN.Threshold = WARN |
| | | #log4j.appender.WARN.layout = org.apache.log4j.PatternLayout |
| | | #log4j.appender.WARN.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss.SSS}-[ %X{Tr} ] [ %p ]-[ %t ] %m%n |
| | | # |
| | | #### 输出ERROR 级别以上的日志到=/error.log ### |
| | | #log4j.appender.ERROR = com.matrix.core.tools.MatrixFileAppender |
| | | #log4j.appender.ERROR.File =/error.log |
| | | #log4j.appender.ERROR.Append = true |
| | | #log4j.appender.ERROR.Threshold = ERROR |
| | | #log4j.appender.ERROR.layout = org.apache.log4j.PatternLayout |
| | | #log4j.appender.ERROR.layout.ConversionPattern = %-d{yyyy-MM-dd HH:mm:ss.SSS}-[ %X{Tr} ] [ %p ]-[ %t ] %m%n |
| | | |
| | | #mybatis log |
| | | log4j.logger.druid.sql=INFO |
| | |
| | | <body> |
| | | <div class="panel-body" id="app" v-cloak> |
| | | <el-row style="padding:20px;"> |
| | | <el-col :span="4"> |
| | | <el-card class="box-card" :body-style="{ padding: '10px 10px'}"> |
| | | <img src="../../../images/sign/meiriqiandao.png" class="image"> |
| | | <div style="padding: 5px;"> |
| | | <span style="padding:5px;font-size: 18px;">每日签到</span> |
| | | <div class="bottom clearfix"> |
| | | <el-button type="primary" size="mini" class="button" @click="createSign()" round>马上创建</el-button> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | <!-- <el-col :span="4">--> |
| | | <!-- <el-card class="box-card" :body-style="{ padding: '10px 10px'}">--> |
| | | <!-- <img src="../../../images/sign/meiriqiandao.png" class="image">--> |
| | | <!-- <div style="padding: 5px;">--> |
| | | <!-- <span style="padding:5px;font-size: 18px;">每日签到</span>--> |
| | | <!-- <div class="bottom clearfix">--> |
| | | <!-- <el-button type="primary" size="mini" class="button" @click="createSign()" round>马上创建</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </el-card>--> |
| | | <!-- </el-col>--> |
| | | <el-col :span="4"> |
| | | <el-card class="box-card" :body-style="{ padding: '10px 10px'}"> |
| | | <img src="../../../images/sign/tiantianpingtuan.png" class="image"> |
| | |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <el-row style="padding:20px;"> |
| | | <el-col :span="4"> |
| | | <el-card class="box-card" :body-style="{ padding: '10px 10px'}"> |
| | | <img src="../../../images/luckyDraw/zhuanpanchoujian.png" class="image"> |
| | | <div style="padding: 5px;"> |
| | | <span style="padding:5px;font-size: 18px;">转盘抽奖</span> |
| | | <div class="bottom clearfix"> |
| | | <el-button type="primary" size="mini" class="button" @click="createLuckyDraw()" round>马上创建</el-button> |
| | | </div> |
| | | </div> |
| | | </el-card> |
| | | </el-col> |
| | | </el-row> |
| | | <!-- <el-row style="padding:20px;">--> |
| | | <!-- <el-col :span="4">--> |
| | | <!-- <el-card class="box-card" :body-style="{ padding: '10px 10px'}">--> |
| | | <!-- <img src="../../../images/luckyDraw/zhuanpanchoujian.png" class="image">--> |
| | | <!-- <div style="padding: 5px;">--> |
| | | <!-- <span style="padding:5px;font-size: 18px;">转盘抽奖</span>--> |
| | | <!-- <div class="bottom clearfix">--> |
| | | <!-- <el-button type="primary" size="mini" class="button" @click="createLuckyDraw()" round>马上创建</el-button>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- </el-card>--> |
| | | <!-- </el-col>--> |
| | | <!-- </el-row>--> |
| | | |
| | | </div> |
| | | </body> |
| | |
| | | </div> |
| | | <div class="col-sm-8 col-sm-offset-1" style="padding: 10px"> |
| | | <el-form-item label="活动编码" prop="actCode"> |
| | | <el-input v-model.number="ruleForm.actCode" placeholder="请输入最大开团数量"></el-input> |
| | | <el-input v-model.number="ruleForm.actCode" placeholder="请输入活动编码"></el-input> |
| | | </el-form-item> |
| | | </div> |
| | | <div class="col-sm-4 col-sm-offset-1" style="padding: 10px"> |
| | |
| | | <div class="form-group mr-20"> |
| | | <button type="button" class="btn btn-my btn-sm" id="btn4" value="">全部</button> |
| | | <button type="button" class="btn btn-my btn-sm active" id="btn1" value="待预约">待预约</button> |
| | | <!-- <button type="button" class="btn btn-my btn-sm" id="btn2" value="预约成功待处理">待派单</button>--> |
| | | <!-- <button type="button" class="btn btn-my btn-sm" id="btn2" value="预约成功待处理">待派单</button>--> |
| | | <button type="button" class="btn btn-my btn-sm" id="btn3" value="需配料">待配料</button> |
| | | <button type="button" class="btn btn-my btn-sm" id="btn3" value="配料完成">待服务</button> |
| | | <button type="button" class="btn btn-my btn-sm" id="btn6" value="服务中">服务中</button> |
| | |
| | | <script type="text/javascript" th:src="@{/js/systools/MJsBase.js}"></script> |
| | | <script type="text/javascript"> |
| | | |
| | | $("#vipPhone").val($.query.get('vipPhone')); |
| | | var _initParam = {format : 'yyyy-mm-dd hh:ii', |
| | | todayBtn : true, |
| | | autoclose : true, |
| | | startView : 2, |
| | | maxView : 3, |
| | | minView : 0}; |
| | | MTools.ininDatetimepicker(_initParam); |
| | | //限制结束时间不小于开始时间 |
| | | var initParam = {format : 'yyyy-mm-dd hh:ii', |
| | | todayBtn : true, |
| | | autoclose : true, |
| | | startView : 2, |
| | | maxView : 3, |
| | | minView : 0}; |
| | | MTools.limitStartEndTime(initParam); |
| | | $("#vipPhone").val($.query.get('vipPhone')); |
| | | var _initParam = {format : 'yyyy-mm-dd hh:ii', |
| | | todayBtn : true, |
| | | autoclose : true, |
| | | startView : 2, |
| | | maxView : 3, |
| | | minView : 0}; |
| | | MTools.ininDatetimepicker(_initParam); |
| | | //限制结束时间不小于开始时间 |
| | | var initParam = {format : 'yyyy-mm-dd hh:ii', |
| | | todayBtn : true, |
| | | autoclose : true, |
| | | startView : 2, |
| | | maxView : 3, |
| | | minView : 0}; |
| | | MTools.limitStartEndTime(initParam); |
| | | |
| | | var myGrid; |
| | | $(function () { |
| | |
| | | |
| | | } |
| | | } |
| | | var btns=[]; |
| | | btns[0]="",btns[1]="",btns[2]="",btns[3]="",btns[4]="",btns[5]="",btns[6]=""; |
| | | function buidOperate(value, row, index) { |
| | | var btns=[]; |
| | | btns[0]="",btns[1]="",btns[2]="",btns[3]="",btns[4]="",btns[5]="",btns[6]=""; |
| | | function buidOperate(value, row, index) { |
| | | var status = row.state; |
| | | var html ='<a class="text-primary mr-5" onClick="selectFwz(' + value + ')" title="查看"><i class="fa fa-eye">查看</i></a> ' |
| | | switch (status) { |
| | |
| | | case '服务完成': |
| | | html +=btns[4].replace('VALUE',value); |
| | | html += btns[2].replace('VALUE',value); |
| | | break; |
| | | case '待确认': |
| | | html +=btns[7].replace('VALUE',value); |
| | | break; |
| | | } |
| | | html += btns[5].replace('VALUE',value); |
| | |
| | | |
| | | |
| | | |
| | | function removeOrder(id) { |
| | | var id=myGrid.getSelectItemId(); |
| | | layer.confirm('确定取消此订单?', { |
| | | btn: ['确认', '取消'] //可以无限个按钮 |
| | | }, function(index, layero){ |
| | | $.post(basePath+'/admin/projService/cancelOrder?id='+id, {}, function(data){ |
| | | parent.layer.msg(data.info,{icon: 1}); |
| | | layer.closeAll(); |
| | | myGrid.serchData(); |
| | | }); |
| | | //按钮【按钮一】的回调 |
| | | }, function(index){ |
| | | // alert("2 = "+index); |
| | | //按钮【按钮二】的回调 |
| | | }); |
| | | function removeOrder(id) { |
| | | var id=myGrid.getSelectItemId(); |
| | | layer.confirm('确定取消此订单?', { |
| | | btn: ['确认', '取消'] //可以无限个按钮 |
| | | }, function(index, layero){ |
| | | $.post(basePath+'/admin/projService/cancelOrder?id='+id, {}, function(data){ |
| | | parent.layer.msg(data.info,{icon: 1}); |
| | | layer.closeAll(); |
| | | myGrid.serchData(); |
| | | }); |
| | | //按钮【按钮一】的回调 |
| | | }, function(index){ |
| | | // alert("2 = "+index); |
| | | //按钮【按钮二】的回调 |
| | | }); |
| | | |
| | | } |
| | | } |
| | | |
| | | //打开查看界面 |
| | | function openEdit2() { |
| | | var id=myGrid.getSelectItemId(); |
| | | layer.open({ |
| | | type : 2, |
| | | title : "查看服务单详情", |
| | | area : MUI.SIZE_M, |
| | | maxmin : true, |
| | | content : [ basePath+'/admin/projService/serviceInfo?pageFlae=pc&id=' + id] |
| | | }); |
| | | } |
| | | function confirmServiceOrder(id) { |
| | | layer.confirm('确定确认订单吗?', { |
| | | btn: ['确认', '取消'] //可以无限个按钮 |
| | | }, function(index, layero){ |
| | | $.post(basePath+'/admin/projService/confirmServiceOrder?id='+id, {}, function(data){ |
| | | parent.layer.msg(data.info,{icon: 1}); |
| | | layer.closeAll(); |
| | | myGrid.serchData(); |
| | | }); |
| | | //按钮【按钮一】的回调 |
| | | }, function(index){ |
| | | // alert("2 = "+index); |
| | | //按钮【按钮二】的回调 |
| | | }); |
| | | |
| | | //导出 |
| | | //导出 |
| | | function exportExcel(){ |
| | | var param=MForm.toUrlParam("#serchform"); |
| | | window.location.href=basePath+"/admin/projService/exportExcel?"+param; |
| | | } |
| | | } |
| | | |
| | | |
| | | //打开查看界面 |
| | | function openEdit2() { |
| | | var id=myGrid.getSelectItemId(); |
| | | layer.open({ |
| | | type : 2, |
| | | title : "查看服务单详情", |
| | | area : MUI.SIZE_M, |
| | | maxmin : true, |
| | | content : [ basePath+'/admin/projService/serviceInfo?pageFlae=pc&id=' + id] |
| | | }); |
| | | } |
| | | |
| | | //导出 |
| | | //导出 |
| | | function exportExcel(){ |
| | | var param=MForm.toUrlParam("#serchform"); |
| | | window.location.href=basePath+"/admin/projService/exportExcel?"+param; |
| | | } |
| | | |
| | | </script> |
| | | |
| | |
| | | <script matrix:btn="serviceClub-edit"> |
| | | btns[6]='<a class="text-primary mr-5" onclick="updateTime(\'VALUE\')" title="修改时间"><i class="fa fa-edit">修改时间</i></a> ' |
| | | </script> |
| | | <script matrix:btn="serviceClub-edit"> |
| | | btns[7]='<a class="text-primary mr-5" onclick="confirmServiceOrder(\'VALUE\')" title="确认服务单"><i class="fa fa-edit">确认服务单</i></a> ' |
| | | </script> |
| | | |
| | | </html> |
| | |
| | | package com.matrix; |
| | | |
| | | import cn.hutool.json.JSONArray; |
| | | import cn.hutool.json.JSONObject; |
| | | import cn.hutool.json.JSONUtil; |
| | | import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; |
| | | import com.matrix.component.redis.RedisClient; |
| | | import com.matrix.system.common.bean.SysFunction; |
| | | import com.matrix.system.hive.bean.MoneyCardUse; |
| | | import com.matrix.system.hive.dao.MoneyCardUseDao; |
| | | import com.matrix.system.hive.service.imp.SysVipInfoServiceImpl; |
| | |
| | | import org.springframework.test.context.junit4.SpringRunner; |
| | | |
| | | import java.io.IOException; |
| | | import java.util.ArrayList; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 测试类示例 |
| | |
| | | @Autowired |
| | | SysVipInfoServiceImpl sysVipInfoService; |
| | | |
| | | @Autowired |
| | | RedisClient redisClient; |
| | | |
| | | |
| | | @Autowired |
| | |
| | | @Test |
| | | public void testRedis() { |
| | | |
| | | List<SysFunction> fnList = new ArrayList<>(); |
| | | /*List<SysFunction> fnList = new ArrayList<>(); |
| | | fnList.add(new SysFunction()); |
| | | |
| | | Map map = new HashMap(); |
| | | map.put("a", fnList); |
| | | redisClient.saveMapValue("map", map); |
| | | |
| | | */ |
| | | |
| | | } |
| | | |
| | | |
| | | @Test |
| | | public void testRedis2() { |
| | | /* |
| | | |
| | | String map = redisClient.getCachedValue("map"); |
| | | JSONObject json = JSONUtil.parseObj(map); |
| | |
| | | SysFunction sysFunction = jsonArray.get(i, SysFunction.class); |
| | | System.out.println(sysFunction.getHasThisFn()); |
| | | } |
| | | */ |
| | | |
| | | |
| | | |
New file |
| | |
| | | /** |
| | | * projectName: zq-erp |
| | | * fileName: LocalCacheTest.java |
| | | * packageName: com.matrix |
| | | * date: 2021-10-25 14:03 |
| | | * copyright(c) 2021 http://www.hydee.cn/ Inc. All rights reserved. |
| | | */ |
| | | package com.matrix; |
| | | |
| | | import com.matrix.system.common.init.LocalCache; |
| | | import org.junit.Assert; |
| | | import org.junit.Test; |
| | | |
| | | import java.io.IOException; |
| | | |
| | | /** |
| | | * @version: V1.0 |
| | | * @author: JiangYouYao |
| | | * @className: LocalCacheTest |
| | | * @packageName: com.matrix |
| | | * @description: LocalCache |
| | | * @data: 2021-10-25 14:03 |
| | | **/ |
| | | public class LocalCacheTest { |
| | | |
| | | @Test |
| | | public void testNoticeTask() throws IOException, InterruptedException { |
| | | LocalCache.save("name","jyy",1000*3); |
| | | System.out.println("放入对象"); |
| | | Assert.assertNotNull(LocalCache.get("name")); |
| | | Thread.sleep(1000*5); |
| | | Assert.assertNull(LocalCache.get("name")); |
| | | } |
| | | |
| | | } |
| | |
| | | package com.matrix; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.component.wechat.externalInterface.weixinUtil.WeixinServiceUtil; |
| | | import com.matrix.config.RabbitMqConfig; |
| | | import com.matrix.core.tools.StringUtils; |
| | | import com.matrix.system.fenxiao.dao.ShopSalesmanApplyDao; |
| | | import com.matrix.system.hive.bean.*; |
| | | import com.matrix.system.hive.dao.*; |
| | | import com.matrix.system.hive.service.CodeService; |
| | | import com.matrix.system.shopXcx.mqTask.MQTaskRouting; |
| | | import com.matrix.system.shopXcx.vo.SalesmanVo; |
| | | import org.junit.Test; |
| | | import org.junit.runner.RunWith; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @Autowired |
| | | private SysVipInfoDao vipInfoDao; |
| | | |
| | | @Autowired |
| | | RabiitMqTemplate rabiitMqTemplate; |
| | | @Autowired |
| | | WeixinServiceUtil weixinServiceUtil; |
| | | |
| | |
| | | */ |
| | | @Test |
| | | public void testTopic() throws InterruptedException { |
| | | rabiitMqTemplate.sendTopicMsg(RabbitMqConfig.MQ_EXCHANGE_TOPIC +"dev", MQTaskRouting.CREATE_ORDER+"dev", "123"); |
| | | // rabiitMqTemplate.sendTopicMsg(RabbitMqConfig.MQ_EXCHANGE_TOPIC +"dev", MQTaskRouting.CREATE_ORDER+"dev", "123"); |
| | | Thread.sleep(10000); |
| | | } |
| | | |