Merge branch 'dev' of http://192.168.2.240:7070/r/kidgrow-microservices-platform into dev
Conflicts:
kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/hospital_form_base.html
kidgrow-web/kidgrow-web-manager/src/main/resources/static/pages/opration/productdetail.html
31 files modified
1 files copied
13 files renamed
13 files added
| | |
| | | <groupId>org.springframework</groupId> |
| | | <artifactId>spring-web</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-usercenter-api</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | </project> |
| | |
| | | * @return ProductOrderDetail对象 |
| | | */ |
| | | List<GroupProductDetail> groupProductDetail(Page<GroupProductDetail> page, @Param("p") Map<String, Object> params); |
| | | |
| | | List<ProductOrderJoinDetail> getTypeByUser(Long id); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | ResultBody updateEnabled(Map<String, Object> params); |
| | | |
| | | ResultBody getTypeByUser(SysUser sysUser); |
| | | } |
| | | |
| | |
| | | package com.kidgrow.oprationcenter.service; |
| | | |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.model.SysUser; |
| | | import com.kidgrow.oprationcenter.model.SysFeedback; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.service.ISuperService; |
| | |
| | | * @return |
| | | */ |
| | | ResultBody updateEnabled(Map<String, Object> params); |
| | | |
| | | boolean saveOrUpdateStr(SysFeedback sysFeedback, SysUser sysUser); |
| | | } |
| | | |
| | |
| | | package com.kidgrow.oprationcenter.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.model.SysUser; |
| | | import com.kidgrow.common.model.*; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.common.utils.DateUtils; |
| | | import com.kidgrow.oprationcenter.feign.DiagnosticService; |
| | | import com.kidgrow.oprationcenter.feign.RoleOrganizationService; |
| | | import com.kidgrow.oprationcenter.mapper.ProductOrderDetailMapper; |
| | |
| | | import com.kidgrow.oprationcenter.vo.DiagnosisRecord; |
| | | import com.kidgrow.oprationcenter.vo.GroupProductDetail; |
| | | import com.kidgrow.oprationcenter.vo.ProductOrderJoinDetail; |
| | | import com.kidgrow.usercenter.feign.SysDoctorService; |
| | | import com.kidgrow.usercenter.feign.SysHospitalService; |
| | | import com.kidgrow.usercenter.model.SysHospital; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | |
| | | DiagnosticService diagnosticService; |
| | | @Autowired |
| | | private RoleOrganizationService roleOrganizationService; |
| | | @Autowired |
| | | private SysDoctorService sysDoctorService; |
| | | @Autowired |
| | | private SysHospitalService sysHospitalService; |
| | | /** |
| | | * 列表 |
| | | * @param params |
| | |
| | | int i = baseMapper.updateById(productOrder); |
| | | return i > 0 ? ResultBody.ok().data(productOrder).msg("更新成功") : ResultBody.failed("更新失败"); |
| | | } |
| | | |
| | | @Override |
| | | public ResultBody getTypeByUser(SysUser sysUser) { |
| | | List<SysOrganization> organizations = sysUser.getOrganizations(); |
| | | if(organizations.size()>0){ |
| | | SysOrganization sysOrganization = organizations.get(0); |
| | | List<ProductOrderJoinDetail> list=baseMapper.getTypeByUser(sysOrganization.getId()); |
| | | if (list.size()>0) { |
| | | ProductOrderJoinDetail productOrderJoinDetail = list.get(0); |
| | | //查询用户的真实姓名 |
| | | Map<String,Object> selectMap=new HashMap<>(); |
| | | selectMap.put("user_id",sysUser.getId()); |
| | | ResultBody listByMap = sysDoctorService.getListByMap(selectMap); |
| | | List<SysDoctor> sysDoctors = JSON.parseArray(JSON.toJSONString(listByMap.getData()), SysDoctor.class); |
| | | String str=""; |
| | | if(sysDoctors!=null&&sysDoctors.size()>0){ |
| | | str= sysDoctors.get(0).getDoctorName(); |
| | | } |
| | | //查询医院的 logo |
| | | Map<String,Object> map=new HashMap<>(); |
| | | map.put("id",sysOrganization.getId()); |
| | | ResultBody allByMap = sysHospitalService.findAllByMap(map); |
| | | List<SysHospital> hospitals = JSON.parseArray(JSON.toJSONString(allByMap.getData()), SysHospital.class); |
| | | String logo=""; |
| | | if(hospitals.size()>0){ |
| | | logo = hospitals.get(0).getHospitalLogo(); |
| | | } |
| | | Map<String,Object> mapVo=new HashMap<>(); |
| | | mapVo.put("type",productOrderJoinDetail.getProType()); |
| | | mapVo.put("realName",str); |
| | | //剩余时间 |
| | | Date proEndtime = productOrderJoinDetail.getProEndtime(); |
| | | Double surplusDay=DateUtils.getDays(proEndtime, new Date()); |
| | | int surplus = surplusDay.intValue(); |
| | | mapVo.put("surplus",surplus); |
| | | mapVo.put("logo",logo); |
| | | //获取 售后服务工程师********不能从sysOrganization获取,从department获取 |
| | | /* mapVo.put("saleUserName",sysOrganization.getSaleUserName()); |
| | | mapVo.put("saleUserTel",sysOrganization.getSaleUserTel());*/ |
| | | return ResultBody.ok().data(mapVo); |
| | | }else { |
| | | return ResultBody.failed("该用户套餐已经失效"); |
| | | } |
| | | }else { |
| | | return ResultBody.failed("该用户的组织已经失效"); |
| | | } |
| | | } |
| | | } |
| | |
| | | package com.kidgrow.oprationcenter.service.impl; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.model.*; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.oprationcenter.mapper.SysFeedbackMapper; |
| | | import com.kidgrow.oprationcenter.model.SysFeedback; |
| | | import com.kidgrow.oprationcenter.service.ISysFeedbackService; |
| | | import com.kidgrow.usercenter.feign.SysDoctorService; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.apache.commons.collections4.MapUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @version 1.0 |
| | | * @Description: <br> |
| | | * @Project: 用户中心<br> |
| | | * @CreateDate: Created in 2020-04-01 09:37:04 <br> |
| | | * @Author: <a href="4345453@kidgrow.com">liuke</a> |
| | | * @version 1.0 |
| | | */ |
| | | @Slf4j |
| | | @Service |
| | | public class SysFeedbackServiceImpl extends SuperServiceImpl<SysFeedbackMapper, SysFeedback> implements ISysFeedbackService { |
| | | @Autowired |
| | | SysDoctorService sysDoctorService; |
| | | |
| | | /** |
| | | * 列表 |
| | | * |
| | | * @param params |
| | | * @return |
| | | */ |
| | | @Override |
| | | public PageResult<SysFeedback> findList(Map<String, Object> params){ |
| | | public PageResult<SysFeedback> findList(Map<String, Object> params) { |
| | | Page<SysFeedback> page = new Page<>(MapUtils.getInteger(params, "page"), MapUtils.getInteger(params, "limit")); |
| | | List<SysFeedback> list = baseMapper.findList(page, params); |
| | | List<SysFeedback> list = baseMapper.findList(page, params); |
| | | return PageResult.<SysFeedback>builder().data(list).code(0).count(page.getTotal()).build(); |
| | | } |
| | | |
| | | /** |
| | | * 根据SysFeedback对象当做查询条件进行查询 |
| | | * @param sysFeedback |
| | | * @return SysFeedback |
| | | */ |
| | | * 根据SysFeedback对象当做查询条件进行查询 |
| | | * |
| | | * @param sysFeedback |
| | | * @return SysFeedback |
| | | */ |
| | | @Override |
| | | public SysFeedback findByObject(SysFeedback sysFeedback){ |
| | | public SysFeedback findByObject(SysFeedback sysFeedback) { |
| | | return baseMapper.findByObject(sysFeedback); |
| | | } |
| | | |
| | | /** |
| | | * 根据id和启用禁用值更新数据 |
| | | * |
| | | * @param params |
| | | * @return ResultBody |
| | | */ |
| | |
| | | int i = baseMapper.updateById(feedback); |
| | | return i > 0 ? ResultBody.ok().data(feedback).msg("更新成功") : ResultBody.failed("更新失败"); |
| | | } |
| | | |
| | | @Override |
| | | public boolean saveOrUpdateStr(SysFeedback sysFeedback, SysUser sysUser) { |
| | | if (sysFeedback.getId()==null) { |
| | | List<SysOrganization> organizations = sysUser.getOrganizations(); |
| | | if (organizations.size() > 0) { |
| | | sysFeedback.setDepartmentId(organizations.get(1).getId()); |
| | | sysFeedback.setDepartmentName(organizations.get(1).getOrgName()); |
| | | sysFeedback.setHospitalId(organizations.get(0).getId()); |
| | | sysFeedback.setHospitalName(organizations.get(0).getOrgName()); |
| | | Map map = new HashMap(); |
| | | map.put("user_id", sysUser.getId()); |
| | | ResultBody listByMap = sysDoctorService.getListByMap(map); |
| | | List<SysDoctor> sysDoctors = JSON.parseArray(JSON.toJSONString(listByMap.getData()), SysDoctor.class); |
| | | if (sysDoctors.size() > 0) { |
| | | sysFeedback.setDoctorId(sysDoctors.get(0).getId()); |
| | | sysFeedback.setDoctorName(sysDoctors.get(0).getDoctorName()); |
| | | sysFeedback.setDoctorTel(sysDoctors.get(0).getDoctorTel()); |
| | | } |
| | | int insert = baseMapper.insert(sysFeedback); |
| | | if (insert > 0) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | }else { |
| | | int i = baseMapper.updateById(sysFeedback); |
| | | if (i > 0) { |
| | | return true; |
| | | } else { |
| | | return false; |
| | | } |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | |
| | | <if test="p.createTime != null and p.createTime !='' and p.updateTime != null and p.updateTime !=''"> |
| | | and (DE.create_time between #{p.createTime} and #{p.updateTime}) |
| | | </if> |
| | | <if test="p.startTime!= null and p.startTime !=''"> |
| | | and DE.create_time >= #{p.startTime} |
| | | </if> |
| | | <if test="p.endTime!= null and p.endTime !=''"> |
| | | and DE.create_time <= #{p.endTime} |
| | | </if> |
| | | <include refid="com.kidgrow.oprationcenter.mapper.SysProductMapper.Role_Organization"></include> |
| | | </where> |
| | | </sql> |
| | |
| | | GROUP BY DE.pro_id |
| | | order by pro_count desc |
| | | </select> |
| | | <select id="getTypeByUser" resultType="com.kidgrow.oprationcenter.vo.ProductOrderJoinDetail" parameterType="long"> |
| | | SELECT |
| | | pod.* |
| | | FROM |
| | | `product_order` po |
| | | INNER JOIN product_order_detail pod ON po.id = pod.order_id |
| | | WHERE |
| | | po.hospital_id = #{id} |
| | | AND NOW() >= pod.pro_begintime |
| | | AND NOW() <=pod.pro_endtime |
| | | AND pod.enabled = 1 |
| | | AND pod.is_del = 0 |
| | | AND po.enabled = 1 |
| | | AND po.is_del = 0 |
| | | ORDER BY |
| | | pod.pro_type desc,pod.pro_endtime desc |
| | | </select> |
| | | </mapper> |
| | |
| | | package com.kidgrow.oprationcenter.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.kidgrow.common.controller.BaseController; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | |
| | | for (ObjectError error : bindingResult.getAllErrors()) { |
| | | errMsg.add(error.getDefaultMessage()); |
| | | } |
| | | ResultBody msg = ResultBody.failed().msg(errMsg.toString()); |
| | | DoctorServer doctorServer1 = JSON.toJavaObject(JSON.parseObject(msg.getData().toString()), DoctorServer.class); |
| | | return ResultBody.failed().msg(errMsg.toString()); |
| | | } else { |
| | | boolean v= doctorServerService.saveOrUpdate(doctorServer); |
| | |
| | | } |
| | | return resultBody; |
| | | } |
| | | |
| | | /** |
| | | * 获取 用户的状态 为试用状态还是 启用状态 |
| | | * |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "获取 用户的状态") |
| | | @GetMapping("/getTypeByUser") |
| | | public ResultBody getTypeByUser(@LoginUser SysUser sysUser) { |
| | | return productOrderDetailService.getTypeByUser(sysUser); |
| | | } |
| | | } |
| | |
| | | package com.kidgrow.oprationcenter.controller; |
| | | |
| | | import com.kidgrow.common.annotation.LoginUser; |
| | | import com.kidgrow.common.controller.BaseController; |
| | | import com.kidgrow.common.model.PageResult; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.model.SysUser; |
| | | import com.kidgrow.oprationcenter.model.SysFeedback; |
| | | import com.kidgrow.oprationcenter.service.ISysFeedbackService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * @Description: |
| | | * |
| | | * @Description: |
| | | * @Project: 运营中心 |
| | | * @CreateDate: Created in 2020-04-02 18:25:34 <br> |
| | | * @Author: <a href="4345453@kidgrow.com">liuke</a> |
| | |
| | | @RestController |
| | | @RequestMapping("/sysfeedback") |
| | | @Api(tags = "") |
| | | public class SysFeedbackController extends BaseController{ |
| | | public class SysFeedbackController extends BaseController { |
| | | @Autowired |
| | | private ISysFeedbackService sysFeedbackService; |
| | | |
| | |
| | | }) |
| | | @GetMapping |
| | | public PageResult list(@RequestParam Map<String, Object> params) { |
| | | if(params.size()==0){ |
| | | params.put("page",1); |
| | | params.put("limit",10); |
| | | if (params.size() == 0) { |
| | | params.put("page", 1); |
| | | params.put("limit", 10); |
| | | } |
| | | return sysFeedbackService.findList(params); |
| | | } |
| | |
| | | */ |
| | | @ApiOperation(value = "保存") |
| | | @PostMapping |
| | | public ResultBody save(@Valid @RequestBody SysFeedback sysFeedback, BindingResult bindingResult) { |
| | | List<String> errMsg= new ArrayList<>(); |
| | | public ResultBody save(@Valid @RequestBody SysFeedback sysFeedback, BindingResult bindingResult, @LoginUser SysUser sysUser) { |
| | | List<String> errMsg = new ArrayList<>(); |
| | | if (bindingResult.hasErrors()) { |
| | | for (ObjectError error : bindingResult.getAllErrors()) { |
| | | errMsg.add(error.getDefaultMessage()); |
| | | } |
| | | return ResultBody.failed().msg(errMsg.toString()); |
| | | } else { |
| | | boolean v= sysFeedbackService.saveOrUpdate(sysFeedback); |
| | | if(v) { |
| | | } else { |
| | | boolean v = sysFeedbackService.saveOrUpdateStr(sysFeedback, sysUser); |
| | | if (v) { |
| | | return ResultBody.ok().data(sysFeedback).msg("保存成功"); |
| | | } |
| | | else { |
| | | } else { |
| | | return ResultBody.failed().msg("保存失败"); |
| | | } |
| | | } |
| | |
| | | @ApiOperation(value = "删除") |
| | | @DeleteMapping("/{id}") |
| | | public ResultBody delete(@PathVariable Long id) { |
| | | boolean v= sysFeedbackService.removeById(id); |
| | | if(v) { |
| | | boolean v = sysFeedbackService.removeById(id); |
| | | if (v) { |
| | | return ResultBody.ok().msg("删除成功"); |
| | | } |
| | | else { |
| | | } else { |
| | | return ResultBody.failed().msg("删除失败"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 修改状态 |
| | | * |
| | |
| | | @ApiImplicitParam(name = "enabled", value = "是否启用", required = true, dataType = "Boolean") |
| | | }) |
| | | public ResultBody updateEnabled(@RequestParam Map<String, Object> params) { |
| | | if (params.size()==0) |
| | | { |
| | | if (params.size() == 0) { |
| | | return ResultBody.failed().msg("参数异常!"); |
| | | } |
| | | return sysFeedbackService.updateEnabled(params); |
New file |
| | |
| | | package com.kidgrow.usercenter.feign; |
| | | |
| | | import com.kidgrow.common.constant.ServiceNameConstants; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.usercenter.feign.fallback.SysDoctorServiceFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: <br> |
| | | * @Project: <br> |
| | | * @CreateDate: Created in 2020/2/22 14:33 <br> |
| | | * @Author: <a href="4345453@kidgrow.com">liuke</a> |
| | | */ |
| | | @FeignClient(name = ServiceNameConstants.USER_SERVICE, fallbackFactory = SysDoctorServiceFallbackFactory.class, decode404 = true) |
| | | public interface SysDoctorService { |
| | | /** |
| | | * 根据条件查询 |
| | | * @param map |
| | | */ |
| | | @PostMapping(value = "/sysdoctor/findByMap") |
| | | ResultBody getListByMap(@RequestBody Map<String, Object> map); |
| | | |
| | | /** |
| | | * 根据id查询数据 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | @GetMapping("sysdoctor/{id}") |
| | | ResultBody findById(@PathVariable(value="id") Long id); |
| | | } |
New file |
| | |
| | | package com.kidgrow.usercenter.feign; |
| | | |
| | | import com.kidgrow.common.constant.ServiceNameConstants; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.usercenter.feign.fallback.SysDoctorServiceFallbackFactory; |
| | | import com.kidgrow.usercenter.feign.fallback.SysHospitalServiceFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: <br> |
| | | * @Project: <br> |
| | | * @CreateDate: Created in 2020/2/22 14:33 <br> |
| | | * @Author: <a href="4345453@kidgrow.com">liuke</a> |
| | | */ |
| | | @FeignClient(name = ServiceNameConstants.USER_SERVICE, fallbackFactory = SysHospitalServiceFallbackFactory.class, decode404 = true) |
| | | public interface SysHospitalService { |
| | | /** |
| | | * 根据条件查询 |
| | | * @param map |
| | | */ |
| | | @PostMapping(value = "/syshospital/findAllByMap") |
| | | ResultBody findAllByMap(@RequestBody Map<String, Object> map); |
| | | } |
New file |
| | |
| | | package com.kidgrow.usercenter.feign.fallback; |
| | | |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.usercenter.feign.SysDoctorService; |
| | | import feign.hystrix.FallbackFactory; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: <br> |
| | | * @Project: <br> |
| | | * @CreateDate: Created in 2020/2/22 14:33 <br> |
| | | * @Author: <a href="4345453@kidgrow.com">liuke</a> |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class SysDoctorServiceFallbackFactory implements FallbackFactory<SysDoctorService> { |
| | | |
| | | @Override |
| | | public SysDoctorService create(Throwable throwable) { |
| | | return new SysDoctorService() { |
| | | @Override |
| | | public ResultBody getListByMap(Map<String, Object> map) { |
| | | return ResultBody.failed("获取医生失败"); |
| | | } |
| | | |
| | | @Override |
| | | public ResultBody findById(Long id) { |
| | | return ResultBody.failed("获取医生失败"); |
| | | } |
| | | }; |
| | | } |
| | | } |
New file |
| | |
| | | package com.kidgrow.usercenter.feign.fallback; |
| | | |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.usercenter.feign.SysDoctorService; |
| | | import com.kidgrow.usercenter.feign.SysHospitalService; |
| | | import feign.hystrix.FallbackFactory; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: <br> |
| | | * @Project: <br> |
| | | * @CreateDate: Created in 2020/2/22 14:33 <br> |
| | | * @Author: <a href="4345453@kidgrow.com">liuke</a> |
| | | */ |
| | | @Slf4j |
| | | @Component |
| | | public class SysHospitalServiceFallbackFactory implements FallbackFactory<SysHospitalService> { |
| | | |
| | | @Override |
| | | public SysHospitalService create(Throwable throwable) { |
| | | return new SysHospitalService() { |
| | | @Override |
| | | public ResultBody findAllByMap(Map<String, Object> map) { |
| | | return ResultBody.failed("查询失败"); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.fasterxml.jackson.databind.annotation.JsonSerialize; |
| | | import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; |
| | | import com.kidgrow.common.model.SuperModel; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | |
| | | /** |
| | | * 组织Id |
| | | */ |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long orgId; |
| | | /** |
| | | * 医院Id |
| | | */ |
| | | @NotNull(message = "医院Id不能为空") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long hospitalId; |
| | | /** |
| | | * 负责的销售代表 |
| | | */ |
| | | @NotNull(message = "负责的销售代表不能为空") |
| | | @NotNull(message = "服务代表不能为空") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long serverUserId; |
| | | /** |
| | | * 销售代表的名字 |
| | | */ |
| | | @NotEmpty(message = "销售代表的名字不能为空") |
| | | @NotEmpty(message = "服务代表的名字不能为空") |
| | | private String serverUserName; |
| | | /** |
| | | * 销售代表电话 |
| | | */ |
| | | private String serverUserTel; |
| | | /** |
| | | * 状态,1启用,0停用 |
| | | */ |
| | |
| | | */ |
| | | @TableLogic |
| | | private Boolean isDel; |
| | | |
| | | /** |
| | | * 负责的销售代表 |
| | | */ |
| | | @NotNull(message = "负责的销售代表不能为空") |
| | | @JsonSerialize(using = ToStringSerializer.class) |
| | | private Long saleUserId; |
| | | /** |
| | | * 销售代表的名字 |
| | | */ |
| | | @NotEmpty(message = "销售代表的名字不能为空") |
| | | private String saleUserName; |
| | | /** |
| | | * 销售代表电话 |
| | | */ |
| | | private String saleUserTel; |
| | | } |
| | |
| | | * 创建者的部门 |
| | | */ |
| | | private String createUserOrgCode; |
| | | |
| | | /** |
| | | * 帐号数量,默认6 |
| | | */ |
| | | private Integer accountsCount; |
| | | } |
| | |
| | | <groupId>eu.bitwalker</groupId> |
| | | <artifactId>UserAgentUtils</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-plugin-sms-api</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | </project> |
| | |
| | | List<SysUser> findList(Page<SysUser> page, @Param("u") Map<String, Object> params); |
| | | |
| | | Integer selectCountByMap(@Param("u")Map<String, Object> map); |
| | | |
| | | /** |
| | | * 查询指定角色用户 |
| | | * @param type:0销售,1运维 |
| | | * @return |
| | | */ |
| | | List<SysUser> findAppointUsers(@Param("type") Integer type); |
| | | } |
| | |
| | | import com.kidgrow.common.model.*; |
| | | import com.kidgrow.common.service.ISuperService; |
| | | import com.kidgrow.usercenter.model.SysUserExcel; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.util.List; |
| | |
| | | ResultBody getThisUserOrganizationUser(HttpServletRequest request); |
| | | |
| | | ResultBody findCountByMap(Map<String, Object> map); |
| | | |
| | | ResultBody passwordByPhone(Map<String, Object> map); |
| | | |
| | | ResultBody registerByPhone(Map<String, Object> map); |
| | | |
| | | ResultBody updatePhone(Map<String, Object> map,SysUser sysUser); |
| | | |
| | | /** |
| | | * 查询指定角色用户 |
| | | * @param type:0销售,1运维 |
| | | * @return |
| | | */ |
| | | ResultBody findAppointUsers(Integer type); |
| | | } |
| | |
| | | package com.kidgrow.usercenter.service.impl; |
| | | |
| | | import cn.hutool.core.util.StrUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.kidgrow.common.constant.CommonConstant; |
| | |
| | | import com.kidgrow.common.lock.DistributedLock; |
| | | import com.kidgrow.common.model.*; |
| | | import com.kidgrow.common.service.impl.SuperServiceImpl; |
| | | import com.kidgrow.common.utils.DateUtils; |
| | | import com.kidgrow.redis.util.RedisUtils; |
| | | import com.kidgrow.sms.feign.SmsChuangLanService; |
| | | import com.kidgrow.sms.model.ConstantSMS; |
| | | import com.kidgrow.usercenter.mapper.SysRoleMenuMapper; |
| | | import com.kidgrow.usercenter.mapper.SysUserMapper; |
| | | import com.kidgrow.usercenter.model.SysRoleUser; |
| | |
| | | import java.util.*; |
| | | import java.util.stream.Collectors; |
| | | |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | |
| | | @Slf4j |
| | | @Service |
| | | public class SysUserServiceImpl extends SuperServiceImpl<SysUserMapper, SysUser> implements ISysUserService { |
| | | private final static String LOCK_KEY_USERNAME = CommonConstant.LOCK_KEY_PREFIX+"username:"; |
| | | |
| | | private final static String LOCK_KEY_USERNAME = CommonConstant.LOCK_KEY_PREFIX + "username:"; |
| | | @Autowired |
| | | private PasswordEncoder passwordEncoder; |
| | | |
| | |
| | | private ISysOrganizationService organizationService; |
| | | @Autowired |
| | | private ISysUserOrgService iSysUserOrgService; |
| | | |
| | | |
| | | @Autowired |
| | | private RedisUtils redisUtils; |
| | | @Autowired |
| | | private SmsChuangLanService smsChuangLanService; |
| | | |
| | | @Autowired |
| | | private DistributedLock lock; |
| | | |
| | | |
| | | @Override |
| | | public LoginAppUser findByUsername(String username) { |
| | |
| | | |
| | | /** |
| | | * 根据用户名查询用户 |
| | | * |
| | | * @param username |
| | | * @return |
| | | */ |
| | |
| | | public SysUser selectByUsername(String username) { |
| | | String clientId = ClientContextHolder.getClient(); |
| | | List<SysUser> users = baseMapper.selectList( |
| | | new QueryWrapper<SysUser>().eq("username", username).eq("tenant_id",clientId) |
| | | new QueryWrapper<SysUser>().eq("username", username).eq("tenant_id", clientId) |
| | | ); |
| | | return getUser(users); |
| | | } |
| | | |
| | | /** |
| | | * 根据手机号查询用户 |
| | | * |
| | | * @param mobile |
| | | * @return |
| | | */ |
| | |
| | | |
| | | /** |
| | | * 根据openId查询用户 |
| | | * |
| | | * @param openId |
| | | * @return |
| | | */ |
| | |
| | | } |
| | | String username = sysUser.getUsername(); |
| | | boolean result = super.saveOrUpdateIdempotency(sysUser, lock |
| | | , LOCK_KEY_USERNAME+username, new QueryWrapper<SysUser>().eq("username", username) |
| | | , username+"已存在"); |
| | | , LOCK_KEY_USERNAME + username, new QueryWrapper<SysUser>().eq("username", username) |
| | | , username + "已存在"); |
| | | // boolean result=true; |
| | | //更新角色 |
| | | if (result && StrUtil.isNotEmpty(sysUser.getRoleId())) { |
| | |
| | | |
| | | /** |
| | | * 获取当前用的 组织下的所有人员 |
| | | * |
| | | * @param request |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultBody getThisUserOrganizationUser(HttpServletRequest request) { |
| | | String id = request.getHeader(SecurityConstants.USER_ID_HEADER); |
| | | List<SysUser> sysUsers=new ArrayList<>(); |
| | | if(StringUtils.isNotBlank(id)){ |
| | | QueryWrapper<SysUserOrg> queryWrapper=new QueryWrapper(); |
| | | queryWrapper.eq("user_id",id); |
| | | List<SysUser> sysUsers = new ArrayList<>(); |
| | | if (StringUtils.isNotBlank(id)) { |
| | | QueryWrapper<SysUserOrg> queryWrapper = new QueryWrapper(); |
| | | queryWrapper.eq("user_id", id); |
| | | List<SysUserOrg> list = iSysUserOrgService.list(queryWrapper); |
| | | if(list.size()>0){ |
| | | if (list.size() > 0) { |
| | | List<Long> collect = list.stream().map(e -> e.getOrgId()).collect(Collectors.toList()); |
| | | if (collect.size()>0) { |
| | | queryWrapper=new QueryWrapper<>(); |
| | | queryWrapper.in("org_id",collect); |
| | | if (collect.size() > 0) { |
| | | queryWrapper = new QueryWrapper<>(); |
| | | queryWrapper.in("org_id", collect); |
| | | List<SysUserOrg> sysUserOrgs = iSysUserOrgService.list(queryWrapper); |
| | | List<Long> userIds = sysUserOrgs.stream().map(e -> e.getUserId()).collect(Collectors.toList()); |
| | | QueryWrapper<SysUser> sysUserQueryWrapper=new QueryWrapper(); |
| | | sysUserQueryWrapper.in("id",userIds.stream().distinct().collect(Collectors.toList())); |
| | | sysUsers= baseMapper.selectList(sysUserQueryWrapper); |
| | | QueryWrapper<SysUser> sysUserQueryWrapper = new QueryWrapper(); |
| | | sysUserQueryWrapper.in("id", userIds.stream().distinct().collect(Collectors.toList())); |
| | | sysUsers = baseMapper.selectList(sysUserQueryWrapper); |
| | | } |
| | | } |
| | | }else { |
| | | } else { |
| | | return ResultBody.failed("暂无数据"); |
| | | } |
| | | return ResultBody.ok().data(sysUsers); |
| | |
| | | Integer integer = baseMapper.selectCountByMap(map); |
| | | return ResultBody.ok().data(integer); |
| | | } |
| | | |
| | | /** |
| | | * 通过手机号 修改密码 |
| | | * @param map |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultBody passwordByPhone(Map<String, Object> map) { |
| | | //手机号,type,验证码,新密码 |
| | | String phone = MapUtils.getString(map, "phone"); |
| | | if (phone == null || "".equals(phone.trim())) { |
| | | return ResultBody.failed("请输入手机号"); |
| | | } |
| | | String verificationCode = MapUtils.getString(map, "verificationCode"); |
| | | if (verificationCode == null || "".equals(verificationCode.trim())) { |
| | | return ResultBody.failed("请输入验证码"); |
| | | } |
| | | String newPass = MapUtils.getString(map, "newPass"); |
| | | if (newPass == null || "".equals(newPass.trim())) { |
| | | return ResultBody.failed("请输入正确的密码"); |
| | | } |
| | | Object hget = redisUtils.hget(ConstantSMS.PASSWORD_SMS, map.get("phone").toString()); |
| | | if (hget != null) { |
| | | JSONObject redisJson = JSON.parseObject(JSON.toJSONString(hget)); |
| | | Object verificationCodeObject = redisJson.get("verificationCode"); |
| | | if (verificationCode.equals(verificationCodeObject)) { |
| | | Object date = redisJson.get("endTime"); |
| | | long time = DateUtils.parseDate(date.toString()).getTime(); |
| | | Date dateNow = new Date(); |
| | | long timeNow = dateNow.getTime(); |
| | | if (timeNow <= time) { |
| | | //查询表 |
| | | Map<String, Object> selectMap = new HashMap<>(); |
| | | selectMap.put("mobile", phone); |
| | | List<SysUser> sysUsers = baseMapper.selectByMap(selectMap); |
| | | if (sysUsers.size() > 0) { |
| | | SysUser user = new SysUser(); |
| | | user.setId(sysUsers.get(0).getId()); |
| | | user.setPassword(passwordEncoder.encode(newPass)); |
| | | baseMapper.updateById(user); |
| | | //将Redis 清除 |
| | | redisUtils.hdel(ConstantSMS.PASSWORD_SMS, phone); |
| | | return ResultBody.ok(); |
| | | } else { |
| | | return ResultBody.failed("暂无该手机号信息"); |
| | | } |
| | | } else { |
| | | return ResultBody.failed("验证码超时"); |
| | | } |
| | | } else { |
| | | return ResultBody.failed("验证码错误"); |
| | | } |
| | | } else { |
| | | return ResultBody.failed("该手机号没有验证码"); |
| | | } |
| | | } |
| | | |
| | | /** |
| | | * 通过手机号 注册验证 |
| | | * @param map |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultBody registerByPhone(Map<String, Object> map) { |
| | | //手机号,type,验证码,新密码 |
| | | String phone = MapUtils.getString(map, "phone"); |
| | | if (phone == null || "".equals(phone.trim())) { |
| | | return ResultBody.failed("请输入手机号"); |
| | | } |
| | | Map<String, Object> selectMap = new HashMap<>(); |
| | | selectMap.put("mobile", phone); |
| | | List<SysUser> sysUsers = baseMapper.selectByMap(selectMap); |
| | | if(sysUsers.size()>0){ |
| | | return ResultBody.failed("该手机号已经注册"); |
| | | } |
| | | Map<String, Object> mapDto=new HashMap(); |
| | | mapDto.put("phone",phone); |
| | | mapDto.put("type",ConstantSMS.REGISTER_SMS); |
| | | return smsChuangLanService.sendVerificationCode(mapDto); |
| | | } |
| | | |
| | | /** |
| | | * 通过手机号修改 手机号 |
| | | * @param map |
| | | * @return |
| | | */ |
| | | @Override |
| | | public ResultBody updatePhone(Map<String, Object> map,SysUser sysUser) { |
| | | String password = MapUtils.getString(map, "password"); |
| | | if (StringUtils.isBlank(password)) { |
| | | return ResultBody.failed("请输入密码"); |
| | | } |
| | | String phone = MapUtils.getString(map, "phone"); |
| | | if (StringUtils.isBlank(phone)) { |
| | | return ResultBody.failed("请输入新手机号"); |
| | | } |
| | | String verificationCode = MapUtils.getString(map, "verificationCode"); |
| | | if (StringUtils.isBlank(verificationCode)) { |
| | | return ResultBody.failed("请输入验证码"); |
| | | } |
| | | if (!passwordEncoder.matches(sysUser.getPassword(),password)) { |
| | | return ResultBody.failed("密码错误"); |
| | | } |
| | | Object hget = redisUtils.hget(ConstantSMS.PHONE_SMS, map.get("phone").toString()); |
| | | if (hget != null) { |
| | | JSONObject redisJson = JSON.parseObject(JSON.toJSONString(hget)); |
| | | Object verificationCodeObject = redisJson.get("verificationCode"); |
| | | if (verificationCode.equals(verificationCodeObject)) { |
| | | Object date = redisJson.get("endTime"); |
| | | long time = DateUtils.parseDate(date.toString()).getTime(); |
| | | Date dateNow = new Date(); |
| | | long timeNow = dateNow.getTime(); |
| | | if (timeNow <= time) { |
| | | //查询表 |
| | | Map<String, Object> selectMap = new HashMap<>(); |
| | | selectMap.put("mobile", phone); |
| | | List<SysUser> sysUsers = baseMapper.selectByMap(selectMap); |
| | | if (sysUsers.size() > 0) { |
| | | return ResultBody.failed("该手机号已经注册"); |
| | | } else { |
| | | SysUser user = new SysUser(); |
| | | user.setId(sysUser.getId()); |
| | | user.setMobile(phone); |
| | | baseMapper.updateById(user); |
| | | //将Redis 清除 |
| | | redisUtils.hdel(ConstantSMS.PHONE_SMS, phone); |
| | | return ResultBody.ok(); |
| | | } |
| | | } else { |
| | | return ResultBody.failed("验证码超时"); |
| | | } |
| | | } else { |
| | | return ResultBody.failed("验证码错误"); |
| | | } |
| | | } else { |
| | | return ResultBody.failed("该手机号没有验证码"); |
| | | } |
| | | } |
| | | |
| | | @Override |
| | | public ResultBody findAppointUsers(Integer type) { |
| | | List<SysUser> list = baseMapper.findAppointUsers(type); |
| | | return ResultBody.ok().data(list); |
| | | } |
| | | } |
| | |
| | | <select id="selectCountByMap" parameterType="map" resultType="integer"> |
| | | select count(*) from sys_user t <include refid="where_map" /> |
| | | </select> |
| | | |
| | | <select id="findAppointUsers" parameterType="Integer" resultType="com.kidgrow.common.model.SysUser"> |
| | | SELECT |
| | | USERS.id, |
| | | USERS.nickname, |
| | | USERS.mobile |
| | | FROM |
| | | `sys_role_user` RU |
| | | LEFT JOIN sys_user USERS ON RU.user_id = USERS.id |
| | | LEFT JOIN sys_role ROLE ON RU.role_id = ROLE.id |
| | | WHERE |
| | | USERS.is_del = 0 |
| | | <if test="type == 0"> |
| | | AND ROLE.`code` IN ( |
| | | 'salemanager', |
| | | 'sale') |
| | | </if> |
| | | <if test="type == 1"> |
| | | AND ROLE.`code` IN ( |
| | | 'oprationmanager', |
| | | 'opration') |
| | | </if> |
| | | </select> |
| | | </mapper> |
| | |
| | | public class SysUserController { |
| | | private static final String ADMIN_CHANGE_MSG = "超级管理员不给予修改"; |
| | | |
| | | |
| | | /** |
| | | * 全文搜索逻辑删除Dto |
| | | */ |
| | |
| | | public ResultBody getThisUserOrganizationUser(HttpServletRequest request){ |
| | | return appUserService.getThisUserOrganizationUser(request); |
| | | } |
| | | /** |
| | | * 通过手机修改密码 |
| | | */ |
| | | @PutMapping(value = "/users/passwordByPhone") |
| | | public ResultBody passwordByPhone(@RequestBody Map<String,Object> map) { |
| | | return appUserService.passwordByPhone(map); |
| | | } |
| | | /** |
| | | * 通过手机号注册 新用户 |
| | | */ |
| | | @PutMapping(value = "/users/registerByPhone") |
| | | public ResultBody registerByPhone(@RequestBody Map<String,Object> map) { |
| | | return appUserService.registerByPhone(map); |
| | | } |
| | | /** |
| | | * 更换手机号 |
| | | */ |
| | | @PutMapping(value = "/users/updatePhone") |
| | | public ResultBody updatePhone(@RequestBody Map<String,Object> map, @LoginUser SysUser sysUser) { |
| | | return appUserService.updatePhone(map,sysUser); |
| | | } |
| | | |
| | | /** |
| | | * 获取指定用户信息(销售人员和服务人员) |
| | | */ |
| | | @GetMapping("users/getAppointUser") |
| | | public ResultBody getAppointUser(){ |
| | | String type = request.getParameter("type"); |
| | | |
| | | return appUserService.findAppointUsers(Integer.parseInt(type)); |
| | | } |
| | | } |
| | |
| | | - sys_role_organization |
| | | ignoreSqls: |
| | | - com.kidgrow.usercenter.mapper.SysRoleMapper.findAll |
| | | - com.kidgrow.usercenter.mapper.SysUserMapper.findAppointUsers |
| | | |
| | | |
| | |
| | | /** |
| | | * 商品Demo服务名 |
| | | */ |
| | | String DEMO_PRODUCT_SERVICE="demo-product-server"; |
| | | String DEMO_PRODUCT_SERVICE = "demo-product-server"; |
| | | |
| | | |
| | | /** |
| | | * 订单Demo服务名 |
| | | */ |
| | | String DEMO_ORDER_SERVICE="demo-order-server"; |
| | | String DEMO_ORDER_SERVICE = "demo-order-server"; |
| | | /** |
| | | * 诊断数据服务 |
| | | */ |
| | | String RECORD_CENTER_SERVICE="recordcenter-server"; |
| | | String RECORD_CENTER_SERVICE = "recordcenter-server"; |
| | | /** |
| | | * 短信服务名 |
| | | */ |
| | | String SMS_SERVICE_SERVER = "sms-service-server"; |
| | | } |
| | |
| | | package com.kidgrow.common.model; |
| | | |
| | | import com.kidgrow.common.model.SuperModel; |
| | | import com.baomidou.mybatisplus.annotation.FieldFill; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.baomidou.mybatisplus.extension.activerecord.Model; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | import lombok.NoArgsConstructor; |
| | | import org.hibernate.validator.constraints.*; |
| | | import org.hibernate.validator.constraints.NotBlank; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | |
| | | @Override |
| | | public void updateFill(MetaObject metaObject) { |
| | | //mybatis-plus版本2.0.9+ |
| | | setFieldValByName(UPDATE_TIME, new Date(), metaObject); |
| | | setFieldValByName(UPDATE_USER_ID, Long.valueOf(request.getHeader(SecurityConstants.USER_ID_HEADER).toString()), metaObject); |
| | | setFieldValByName(UPDATE_USER_NAME, request.getHeader(SecurityConstants.USER_HEADER), metaObject); |
| | | Object updateTime = getFieldValByName(UPDATE_TIME, metaObject); |
| | | Object updateUserId = getFieldValByName(UPDATE_USER_ID, metaObject); |
| | | Object updateUserName = getFieldValByName(UPDATE_USER_NAME, metaObject); |
| | | if (updateTime == null) { |
| | | setFieldValByName(UPDATE_TIME, new Date(), metaObject); |
| | | } |
| | | if ((updateUserId == null) && (request.getHeader(SecurityConstants.USER_ID_HEADER) != null)) { |
| | | setFieldValByName(UPDATE_USER_ID, Long.valueOf(request.getHeader(SecurityConstants.USER_ID_HEADER).toString()), metaObject); |
| | | } |
| | | if ((updateUserName == null) && (request.getHeader(SecurityConstants.USER_HEADER) != null)) { |
| | | setFieldValByName(UPDATE_USER_NAME, request.getHeader(SecurityConstants.USER_HEADER), metaObject); |
| | | } |
| | | } |
| | | } |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <parent> |
| | | <artifactId>kidgrow-plugin-sms</artifactId> |
| | | <groupId>com.kidgrow</groupId> |
| | | <version>1.0</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>kidgrow-plugin-sms-api</artifactId> |
| | | |
| | | |
| | | </project> |
New file |
| | |
| | | package com.kidgrow.sms.feign; |
| | | |
| | | import com.kidgrow.common.constant.ServiceNameConstants; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.sms.feign.fallback.SmsChuangLanServiceFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: <br> |
| | | * @Project: <br> |
| | | * @CreateDate: Created in 2020/2/27 22:04 <br> |
| | | * @Author: <a href="4345453@kidgrow.com">liuke</a> |
| | | */ |
| | | @FeignClient(value = ServiceNameConstants.SMS_SERVICE_SERVER, |
| | | fallbackFactory = SmsChuangLanServiceFallbackFactory.class, decode404 = true) |
| | | public interface SmsChuangLanService { |
| | | /** |
| | | * feign rpc访问远程 接口 |
| | | */ |
| | | @PostMapping(value = "/smsChangLan/send") |
| | | ResultBody sendVerificationCode(@RequestBody Map map); |
| | | |
| | | } |
New file |
| | |
| | | package com.kidgrow.sms.feign.fallback; |
| | | |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.sms.feign.SmsChuangLanService; |
| | | import feign.hystrix.FallbackFactory; |
| | | |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 石家庄喜高科技有限责任公司 版权所有 © Copyright 2020<br> |
| | | * |
| | | * @Description: <br> |
| | | * @Project: <br> |
| | | * @CreateDate: Created in 2020/2/27 22:05 <br> |
| | | * @Author: <a href="4345453@kidgrow.com">liuke</a> |
| | | */ |
| | | public class SmsChuangLanServiceFallbackFactory implements FallbackFactory<SmsChuangLanService> { |
| | | @Override |
| | | public SmsChuangLanService create(Throwable throwable) { |
| | | return new SmsChuangLanService() { |
| | | @Override |
| | | public ResultBody sendVerificationCode(Map ma) { |
| | | return ResultBody.failed("短息调用失败"); |
| | | } |
| | | }; |
| | | } |
| | | } |
New file |
| | |
| | | package com.kidgrow.sms.model; |
| | | |
| | | import com.kidgrow.common.constant.CommonConstant; |
| | | |
| | | public interface ConstantSMS { |
| | | String PASSWORD_SMS = "PASSWORD_SMS";//修改密码 短信验证的type值 |
| | | String REGISTER_SMS = "REGISTER_SMS";//注册 短信验证的type值 |
| | | String PHONE_SMS = "PHONE_SMS";//注册 短信验证的type值 |
| | | } |
File was renamed from kidgrow-plugin/kidgrow-plugin-sms/src/main/java/com/kidgrow/sms/aliyun/model/SmsModel.java |
| | |
| | | package com.kidgrow.sms.aliyun.model; |
| | | package com.kidgrow.sms.model; |
| | | |
| | | import io.swagger.annotations.ApiModel; |
| | | import lombok.Data; |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <parent> |
| | | <artifactId>kidgrow-plugin-sms</artifactId> |
| | | <groupId>com.kidgrow</groupId> |
| | | <version>1.0</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>kidgrow-plugin-sms-biz</artifactId> |
| | | |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>org.springframework</groupId> |
| | | <artifactId>spring-web</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-plugin-sms-api</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | </project> |
File was renamed from kidgrow-plugin/kidgrow-plugin-sms/src/main/java/com/kidgrow/sms/aliyun/client/SmsClient.java |
| | |
| | | package com.kidgrow.sms.aliyun.client; |
| | | package com.kidgrow.sms.client; |
| | | |
| | | import com.aliyuncs.CommonRequest; |
| | | import com.aliyuncs.CommonResponse; |
| | |
| | | import com.aliyuncs.profile.DefaultProfile; |
| | | import com.aliyuncs.profile.IClientProfile; |
| | | import com.google.gson.Gson; |
| | | import com.kidgrow.sms.aliyun.exception.SmsException; |
| | | import com.kidgrow.sms.aliyun.template.BatchSmsTemplate; |
| | | import com.kidgrow.sms.aliyun.template.SmsTemplate; |
| | | import com.kidgrow.sms.aliyun.util.AliyunSmsUtils; |
| | | import com.kidgrow.sms.exception.SmsException; |
| | | import com.kidgrow.sms.template.BatchSmsTemplate; |
| | | import com.kidgrow.sms.template.SmsTemplate; |
| | | import com.kidgrow.sms.util.AliyunSmsUtils; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.*; |
| | | |
File was renamed from kidgrow-plugin/kidgrow-plugin-sms/src/main/java/com/kidgrow/sms/aliyun/exception/SmsException.java |
| | |
| | | package com.kidgrow.sms.aliyun.exception; |
| | | package com.kidgrow.sms.exception; |
| | | |
| | | import com.kidgrow.common.exception.KidgrowException; |
| | | |
File was renamed from kidgrow-plugin/kidgrow-plugin-sms/src/main/java/com/kidgrow/sms/aliyun/service/AliyunSmsService.java |
| | |
| | | package com.kidgrow.sms.aliyun.service; |
| | | package com.kidgrow.sms.service; |
| | | |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.sms.aliyun.model.SmsModel; |
| | | import com.kidgrow.sms.model.SmsModel; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
File was renamed from kidgrow-plugin/kidgrow-plugin-sms/src/main/java/com/kidgrow/sms/aliyun/template/BatchSmsTemplate.java |
| | |
| | | package com.kidgrow.sms.aliyun.template; |
| | | package com.kidgrow.sms.template; |
| | | |
| | | import lombok.*; |
| | | |
File was renamed from kidgrow-plugin/kidgrow-plugin-sms/src/main/java/com/kidgrow/sms/aliyun/template/SmsTemplate.java |
| | |
| | | package com.kidgrow.sms.aliyun.template; |
| | | package com.kidgrow.sms.template; |
| | | |
| | | import lombok.*; |
| | | |
File was renamed from kidgrow-plugin/kidgrow-plugin-sms/src/main/java/com/kidgrow/sms/aliyun/util/AliyunSmsUtils.java |
| | |
| | | package com.kidgrow.sms.aliyun.util; |
| | | package com.kidgrow.sms.util; |
| | | |
| | | import com.aliyuncs.CommonResponse; |
| | | import com.google.gson.Gson; |
| | | import com.kidgrow.sms.aliyun.exception.SmsException; |
| | | import com.kidgrow.sms.aliyun.template.BatchSmsTemplate; |
| | | import com.kidgrow.sms.aliyun.template.SmsTemplate; |
| | | import com.kidgrow.sms.exception.SmsException; |
| | | import com.kidgrow.sms.template.BatchSmsTemplate; |
| | | import com.kidgrow.sms.template.SmsTemplate; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | |
| | | import java.util.Collection; |
New file |
| | |
| | | package com.kidgrow.sms.util; |
| | | |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import java.io.BufferedReader; |
| | | import java.io.InputStreamReader; |
| | | import java.io.OutputStream; |
| | | import java.net.HttpURLConnection; |
| | | import java.net.URL; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | |
| | | public class SmsChuangLanUtils { |
| | | public static void main(String[] args) { |
| | | //短信下发 |
| | | String sendUrl = "http://smssh1.253.com/msg/send/json"; |
| | | Map map = new HashMap(); |
| | | map.put("account","N2561124");//API账号 |
| | | map.put("password","Mguj6qlRWX7b5e");//API密码 |
| | | map.put("msg","123123");//短信内容 |
| | | map.put("phone","18600376209");//手机号 |
| | | map.put("report","false");//是否需要状态报告 |
| | | JSONObject js = (JSONObject) JSONObject.toJSON(map); |
| | | System.out.println(sendSmsByPost(sendUrl,js.toString())); |
| | | } |
| | | public static String send(Map map,String url){ |
| | | JSONObject js = (JSONObject) JSONObject.toJSON(map); |
| | | return sendSmsByPost(url,js.toString()); |
| | | |
| | | } |
| | | public static String sendSmsByPost(String path, String postContent) { |
| | | URL url = null; |
| | | try { |
| | | url = new URL(path); |
| | | HttpURLConnection httpURLConnection = (HttpURLConnection) url.openConnection(); |
| | | httpURLConnection.setRequestMethod("POST"); |
| | | httpURLConnection.setConnectTimeout(10000); |
| | | httpURLConnection.setReadTimeout(10000); |
| | | httpURLConnection.setDoOutput(true); |
| | | httpURLConnection.setDoInput(true); |
| | | httpURLConnection.setRequestProperty("Charset", "UTF-8"); |
| | | httpURLConnection.setRequestProperty("Content-Type", "application/json"); |
| | | httpURLConnection.connect(); |
| | | OutputStream os=httpURLConnection.getOutputStream(); |
| | | os.write(postContent.getBytes("UTF-8")); |
| | | os.flush(); |
| | | StringBuilder sb = new StringBuilder(); |
| | | int httpRspCode = httpURLConnection.getResponseCode(); |
| | | if (httpRspCode == HttpURLConnection.HTTP_OK) { |
| | | BufferedReader br = new BufferedReader( |
| | | new InputStreamReader(httpURLConnection.getInputStream(), "utf-8")); |
| | | String line = null; |
| | | while ((line = br.readLine()) != null) { |
| | | sb.append(line); |
| | | } |
| | | br.close(); |
| | | return sb.toString(); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | } |
copy from kidgrow-plugin/kidgrow-plugin-sms/Dockerfile
copy to kidgrow-plugin/kidgrow-plugin-sms/kidgrow-plugin-sms-center-server/Dockerfile
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <project xmlns="http://maven.apache.org/POM/4.0.0" |
| | | xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" |
| | | xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| | | <parent> |
| | | <artifactId>kidgrow-plugin-sms</artifactId> |
| | | <groupId>com.kidgrow</groupId> |
| | | <version>1.0</version> |
| | | <relativePath>../pom.xml</relativePath> |
| | | </parent> |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>kidgrow-plugin-sms-center-server</artifactId> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-config</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-plugin-sms-api</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-plugin-sms-biz</artifactId> |
| | | </dependency> |
| | | |
| | | </dependencies> |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-deploy-plugin</artifactId> |
| | | <configuration> |
| | | <skip>true</skip> |
| | | </configuration> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | <executions> |
| | | <execution> |
| | | <goals> |
| | | <goal>repackage</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>com.spotify</groupId> |
| | | <artifactId>dockerfile-maven-plugin</artifactId> |
| | | <configuration> |
| | | <!-- Dockerfile目录指定 --> |
| | | <dockerfile>Dockerfile</dockerfile> |
| | | <repository>${docker.repostory}/${docker.image.prefix}/${project.artifactId}</repository> |
| | | <!-- 生成镜像标签 如不指定 默认为latest --> |
| | | <tag>1.0.1</tag> |
| | | <!--<tag>${project.version}</tag>--> |
| | | <buildArgs> |
| | | <JAR_FILE>./target/${project.build.finalName}.jar</JAR_FILE> |
| | | </buildArgs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | </project> |
File was renamed from kidgrow-plugin/kidgrow-plugin-sms/src/main/java/com/kidgrow/sms/aliyun/config/SmsAutoConfiguration.java |
| | |
| | | package com.kidgrow.sms.aliyun.config; |
| | | |
| | | import com.kidgrow.sms.aliyun.client.SmsClient; |
| | | import com.kidgrow.sms.client.SmsClient; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnClass; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean; |
| | | import org.springframework.boot.context.properties.EnableConfigurationProperties; |
File was renamed from kidgrow-plugin/kidgrow-plugin-sms/src/main/java/com/kidgrow/sms/aliyun/config/SmsProperties.java |
| | |
| | | package com.kidgrow.sms.aliyun.config; |
| | | |
| | | import com.kidgrow.sms.aliyun.template.SmsTemplate; |
| | | import com.kidgrow.sms.template.SmsTemplate; |
| | | import lombok.Data; |
| | | import org.springframework.beans.factory.InitializingBean; |
| | | import org.springframework.boot.context.properties.ConfigurationProperties; |
File was renamed from kidgrow-plugin/kidgrow-plugin-sms/src/main/java/com/kidgrow/sms/aliyun/controller/SmsController.java |
| | |
| | | import com.kidgrow.common.base.ResponseCode; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.redis.template.RedisRepository; |
| | | import com.kidgrow.sms.aliyun.client.SmsClient; |
| | | import com.kidgrow.sms.aliyun.exception.SmsException; |
| | | import com.kidgrow.sms.aliyun.model.SmsModel; |
| | | import com.kidgrow.sms.aliyun.service.AliyunSmsService; |
| | | import com.kidgrow.sms.aliyun.util.AliyunSmsUtils; |
| | | import com.kidgrow.sms.client.SmsClient; |
| | | import com.kidgrow.sms.exception.SmsException; |
| | | import com.kidgrow.sms.service.AliyunSmsService; |
| | | import com.kidgrow.sms.model.SmsModel; |
| | | import com.kidgrow.sms.util.AliyunSmsUtils; |
| | | import org.apache.commons.lang3.StringUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
New file |
| | |
| | | package com.kidgrow.sms.lanchuang.controller; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.utils.DateUtils; |
| | | import com.kidgrow.redis.util.RedisUtils; |
| | | import com.kidgrow.sms.util.SmsChuangLanUtils; |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | 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.RestController; |
| | | |
| | | import java.util.*; |
| | | |
| | | @RestController |
| | | @RequestMapping("smsChangLan") |
| | | @Api(tags = "创蓝短信模块") |
| | | public class SmsChuangLanController { |
| | | @Value("${chuanglan.sms.sendUrl}") |
| | | private String CHUANGLAN_SMS_SENDURL; |
| | | @Value("${chuanglan.sms.account}") |
| | | private String CHUANGLAN_SMS_ACCOUNT; |
| | | @Value("${chuanglan.sms.password}") |
| | | private String CHUANGLAN_SMS_PASSWORD; |
| | | @Value("${chuanglan.sms.num}") |
| | | private Integer CHUANGLAN_SMS_NUM; |
| | | @Value("${chuanglan.sms.timeLimit}") |
| | | private Integer CHUANGLAN_SMS_TIMELIMIT; |
| | | @Autowired |
| | | private RedisUtils redisUtils; |
| | | |
| | | /** |
| | | * type 为类型, "type":"LOGIN_SMS" 为登录,"type":"PASSWORD_SMS" 为密码找回,"type":"REGISTER_SMS" 为 |
| | | * @param map |
| | | * @return |
| | | */ |
| | | @PostMapping("send") |
| | | public ResultBody sendVerificationCode(@RequestBody Map map) { |
| | | if(CHUANGLAN_SMS_NUM==null){ |
| | | CHUANGLAN_SMS_NUM=5; |
| | | } |
| | | Object phone = map.get("phone"); |
| | | if (map.get("phone")==null||"".equals(map.get("phone"))){ |
| | | return ResultBody.failed("请输入手机号"); |
| | | } |
| | | Object type = map.get("type"); |
| | | if (map.get("type")==null||"".equals(map.get("type"))){ |
| | | return ResultBody.failed("请输入保存的类型"); |
| | | } |
| | | String verificationCode=""; |
| | | Random random=new Random(); |
| | | for (int i = 0; i < 6; i++) { |
| | | int i1 = random.nextInt(9); |
| | | verificationCode+=i1; |
| | | } |
| | | try { |
| | | //组装发送消息的内容 |
| | | map.put("account", CHUANGLAN_SMS_ACCOUNT);//API账号 |
| | | map.put("password", CHUANGLAN_SMS_PASSWORD);//API密码 |
| | | map.put("report","false"); |
| | | map.put("msg","您好,您的验证码是"+verificationCode); |
| | | //在Redis中获取 |
| | | Object hget = redisUtils.hget(map.get("type").toString(), map.get("phone").toString()); |
| | | JSONObject jsonObject =new JSONObject(); |
| | | Map<String,Object> cunMap=new HashMap<>(); |
| | | cunMap.put("verificationCode",verificationCode); |
| | | cunMap.put("count",CHUANGLAN_SMS_NUM);//总共 |
| | | if(hget==null){ |
| | | String send = SmsChuangLanUtils.send(map, CHUANGLAN_SMS_SENDURL); |
| | | jsonObject=JSON.parseObject(send); |
| | | String s1 = DateUtils.formatCurrentDateTime(); |
| | | cunMap.put("date",s1); |
| | | cunMap.put("remnant",CHUANGLAN_SMS_NUM-1);//剩余 |
| | | Date date2 = DateUtils.addMilliseconds(DateUtils.parseDate(s1), CHUANGLAN_SMS_TIMELIMIT); |
| | | cunMap.put("endTime",DateUtils.formatDateTime(date2)); |
| | | }else { |
| | | JSONObject redisJson = JSON.parseObject(JSON.toJSONString(hget)); |
| | | Object remnantObject = redisJson.get("remnant"); |
| | | if(remnantObject instanceof Integer){ |
| | | Integer remnant=(Integer)remnantObject; |
| | | if(remnant>0){ |
| | | String send = SmsChuangLanUtils.send(map, CHUANGLAN_SMS_SENDURL); |
| | | jsonObject=JSON.parseObject(send); |
| | | String s1 = DateUtils.formatCurrentDateTime(); |
| | | cunMap.put("date",DateUtils.formatCurrentDateTime()); |
| | | cunMap.put("remnant",remnant-1);//剩余 |
| | | Date date2 = DateUtils.addMilliseconds(DateUtils.parseDate(s1), CHUANGLAN_SMS_TIMELIMIT); |
| | | cunMap.put("endTime",DateUtils.formatDateTime(date2)); |
| | | }else{ |
| | | return ResultBody.failed().data("每个手机号限用5次"); |
| | | } |
| | | }else { |
| | | return ResultBody.failed(); |
| | | } |
| | | } |
| | | if ("0".equals(jsonObject.get("code"))) { |
| | | redisUtils.hset(map.get("type").toString(), map.get("phone").toString(),cunMap,getSecondsNextEarlyMorning()); |
| | | return ResultBody.ok().data(verificationCode); |
| | | } else { |
| | | return ResultBody.failed(); |
| | | } |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | return ResultBody.failed(); |
| | | } |
| | | } |
| | | @PostMapping("verification") |
| | | public ResultBody verification(@RequestBody Map<String,Object> map){ |
| | | Object phone = map.get("phone"); |
| | | if (map.get("phone")==null||"".equals(map.get("phone"))){ |
| | | return ResultBody.failed("请输入手机号"); |
| | | } |
| | | Object verificationCode = map.get("verificationCode"); |
| | | if (map.get("verificationCode")==null||"".equals(map.get("verificationCode"))){ |
| | | return ResultBody.failed("请输入保存的类型"); |
| | | } |
| | | Object type = map.get("type"); |
| | | if (map.get("type")==null||"".equals(map.get("type"))){ |
| | | return ResultBody.failed("请输入保存的类型"); |
| | | } |
| | | Object hget = redisUtils.hget(map.get("type").toString(), map.get("phone").toString()); |
| | | if(hget!=null){ |
| | | JSONObject redisJson = JSON.parseObject(JSON.toJSONString(hget)); |
| | | Object verificationCodeObject = redisJson.get("verificationCode"); |
| | | if(verificationCode.equals(verificationCodeObject)){ |
| | | Object date = redisJson.get("date"); |
| | | long time = DateUtils.addMilliseconds(DateUtils.parseDate(date.toString()), CHUANGLAN_SMS_TIMELIMIT).getTime(); |
| | | Date dateNow=new Date(); |
| | | long timeNow = dateNow.getTime(); |
| | | if(timeNow<=time){ |
| | | return ResultBody.ok(); |
| | | }else { |
| | | return ResultBody.failed("验证码超时"); |
| | | } |
| | | }else { |
| | | return ResultBody.failed("验证码错误"); |
| | | } |
| | | }else { |
| | | return ResultBody.failed("该手机号没有验证码"); |
| | | } |
| | | } |
| | | //获取 存放 Redis的时间 |
| | | public Long getSecondsNextEarlyMorning() { |
| | | Calendar cal = Calendar.getInstance(); |
| | | cal.add(Calendar.DAY_OF_YEAR, 1); |
| | | // 改成这样就好了 |
| | | cal.set(Calendar.HOUR_OF_DAY, 0); |
| | | cal.set(Calendar.SECOND, 0); |
| | | cal.set(Calendar.MINUTE, 0); |
| | | cal.set(Calendar.MILLISECOND, 0); |
| | | return (cal.getTimeInMillis() - System.currentTimeMillis()) / 1000; |
| | | } |
| | | } |
File was renamed from kidgrow-plugin/kidgrow-plugin-sms/src/main/resources/application.yml |
| | |
| | | #创蓝 |
| | | chuanglan: |
| | | sms: |
| | | sendUrl: http://smssh1.253.com/msg/send/json |
| | | account: N2561124 |
| | | password: Mguj6qlRWX7b5e |
| | | num: 5 |
| | | timeLimit: 720000 |
| | | #阿里云相关 |
| | | aliyun: |
| | | sms: |
| | |
| | | port: 8008 |
| | | # context-path: / |
| | | |
| | | spring: |
| | | application: |
| | | name: sms-service |
| | | |
| | | |
| | | eureka: |
| | | instance: |
| | |
| | | prefer-ip-address: true |
| | | client: |
| | | serviceUrl: |
| | | defaultZone: ${kidgrow.eureka.client.serviceUrl.defaultZone} |
| | | defaultZone: ${kidgrow.eureka.client.serviceUrl.defaultZone} |
| | | spring: |
| | | application: |
| | | name: sms-service-server |
| | |
| | | <modelVersion>4.0.0</modelVersion> |
| | | |
| | | <artifactId>kidgrow-plugin-sms</artifactId> |
| | | |
| | | |
| | | <packaging>pom</packaging> |
| | | <modules> |
| | | <module>kidgrow-plugin-sms-api</module> |
| | | <module>kidgrow-plugin-sms-biz</module> |
| | | <module>kidgrow-plugin-sms-center-server</module> |
| | | </modules> |
| | | <dependencies> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-config</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-common-spring-boot-starter</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-redis-spring-boot-starter</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.aliyun</groupId> |
| | | <artifactId>aliyun-java-sdk-core</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | <build> |
| | | <plugins> |
| | | <plugin> |
| | | <groupId>org.apache.maven.plugins</groupId> |
| | | <artifactId>maven-deploy-plugin</artifactId> |
| | | <configuration> |
| | | <skip>true</skip> |
| | | </configuration> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-maven-plugin</artifactId> |
| | | <executions> |
| | | <execution> |
| | | <goals> |
| | | <goal>repackage</goal> |
| | | </goals> |
| | | </execution> |
| | | </executions> |
| | | </plugin> |
| | | <plugin> |
| | | <groupId>com.spotify</groupId> |
| | | <artifactId>dockerfile-maven-plugin</artifactId> |
| | | <configuration> |
| | | <!-- Dockerfile目录指定 --> |
| | | <dockerfile>Dockerfile</dockerfile> |
| | | <repository>${docker.repostory}/${docker.image.prefix}/${project.artifactId}</repository> |
| | | <!-- 生成镜像标签 如不指定 默认为latest --> |
| | | <tag>1.0.1</tag> |
| | | <!--<tag>${project.version}</tag>--> |
| | | <buildArgs> |
| | | <JAR_FILE>./target/${project.build.finalName}.jar</JAR_FILE> |
| | | </buildArgs> |
| | | </configuration> |
| | | </plugin> |
| | | </plugins> |
| | | </build> |
| | | </project> |
| | |
| | | <artifactId>kidgrow-springcloud-zuul</artifactId> |
| | | |
| | | <dependencies> |
| | | <!-- <dependency>--> |
| | | <!-- <groupId>com.kidgrow</groupId>--> |
| | | <!-- <artifactId>kidgrow-usercenter-api</artifactId>--> |
| | | <!-- </dependency>--> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-config</artifactId> |
| | |
| | | |
| | | import com.kidgrow.common.constant.ServiceNameConstants; |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.model.SysUserOrg; |
| | | import com.kidgrow.zuul.feign.fallback.SysDoctorServiceFallbackFactory; |
| | | import com.kidgrow.zuul.feign.fallback.SysUserOrgServiceFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | package com.kidgrow.zuul.feign.fallback; |
| | | |
| | | import com.kidgrow.common.model.ResultBody; |
| | | import com.kidgrow.common.model.SysUserOrg; |
| | | import com.kidgrow.zuul.feign.SysDoctorService; |
| | | import com.kidgrow.zuul.feign.SysOrganizationService; |
| | | import feign.hystrix.FallbackFactory; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | |
| | | package com.kidgrow.zuul.filter; |
| | | |
| | | import cn.hutool.core.collection.CollectionUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.kidgrow.common.constant.CommonConstant; |
| | | import com.kidgrow.common.constant.SecurityConstants; |
| | |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.net.URLEncoder; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | |
| | | @Component |
| | | public class UserInfoHeaderFilter extends ZuulFilter { |
| | | @Autowired |
| | | SysDoctorService sysDoctorService; |
| | | private SysDoctorService sysDoctorService; |
| | | @Override |
| | | public String filterType() { |
| | | return FilterConstants.PRE_TYPE; |
| | |
| | | butler: |
| | | auto-generate-from-zuul-routes: true |
| | | generate-routes: user,file,log,codegenerator,auth |
| | | apiDocsPath: v2/api-docs |
| | | |
| | | apiDocsPath: v2/api-docs |
New file |
| | |
| | | { |
| | | "liveServer.settings.port": 5501 |
| | | } |
| | |
| | | <label class="layui-form-label">科室名称</label> |
| | | <div class="layui-input-block"> |
| | | <input name="departmentName" id="departmentName" placeholder="科室名称" type="text" class="layui-input" |
| | | maxlength="50" lay-verify="required" required style="width: 150px;" /> |
| | | maxlength="50" lay-verify="required" required style="width: 175px;" /> |
| | |  </div> |
| | | </div> |
| | | <div class="layui-col-sm3"> |
| | |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-sm7"> |
| | | <div class="layui-col-sm4"> |
| | | <label class="layui-form-label">医院类型</label> |
| | | <div class="layui-input-block"> |
| | | <input name="hospitalTypeId" id="hospitalTypeId" type="hidden" value="" /> |
| | | <select name="hospitalTypeName" id="hospitalTypeName" lay-filter="hospitalTypeName" |
| | | style="width: 300px;"> |
| | | style="width: 50px;"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | | </div> |
| | |
| | | style="width: 300px;"> |
| | | <option value="">请选择</option> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm3"> |
| | | <label class="layui-form-label">帐号数量</label> |
| | | <div class="layui-input-block"> |
| | | <input id="accountsCount" name="accountsCount" type="text" value="6" class="layui-input" |
| | | maxlength="50" lay-verify="required|integer" style="width: 200px;" /> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-sm3"> |
| | | <div class="layui-col-sm4"> |
| | | <label class="layui-form-label">区号</label> |
| | | <div class="layui-input-block"> |
| | | <input name="areaCode" id="areaCode" lay-verify="required" required type="text" class="layui-input" |
| | | maxlength="10" /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm3"> |
| | | <div class="layui-col-sm4"> |
| | | <label class="layui-form-label">经度</label> |
| | | <div class="layui-input-block"> |
| | | <input name="longitude" id="longitude" type="text" class="layui-input" maxlength="20" /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm3"> |
| | | <div class="layui-col-sm4"> |
| | | <label class="layui-form-label">纬度</label> |
| | | <div class="layui-input-block"> |
| | | <input name="latitude" id="latitude" type="text" class="layui-input" maxlength="20" /> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm3"> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-row"> |
| | | <div class="layui-col-sm4"> |
| | | <label class="layui-form-label">服务人员</label> |
| | | <div class="layui-input-block"> |
| | | <input name="serverUserId" id="serverUserId" type="hidden" value="" /> |
| | | <select lay-verify="required" required name="serverUserName" id="serverUserName" |
| | | style="width: 150px;"> |
| | | style="width: 150px;" lay-filter="serverUserName"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="layui-col-sm6"> |
| | | <label class="layui-form-label">服务人电话</label> |
| | | <div class="layui-input-block"> |
| | | <input name="serverUserTel" id="serverUserTel" type="text" class="layui-input" maxlength="20" value=""/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <div class="layui-form-item"> |
| | | <div class="layui-col-sm4"> |
| | | <label class="layui-form-label">销售人员</label> |
| | | <div class="layui-input-block"> |
| | | <input name="saleUserId" id="saleUserId" type="hidden" value="" /> |
| | | <select lay-verify="required" required name="saleUserName" id="saleUserName" style="width: 150px;" lay-filter="saleUserName"> |
| | | </select> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="layui-col-sm6"> |
| | | <label class="layui-form-label">销售人电话</label> |
| | | <div class="layui-input-block"> |
| | | <input name="saleUserTel" id="saleUserTel" type="text" class="layui-input" maxlength="20" value=""/> |
| | | </div> |
| | | </div> |
| | | </div> |
| | |
| | | </div> |
| | | <div class="layui-form-item model-form-footer"> |
| | | <button class="layui-btn layui-btn-primary" ew-event="closeDialog" type="button">取消</button> |
| | | <button class="layui-btn permissions" permissions="hospital-save" lay-filter="hospital-form-submit" lay-submit>保存</button> |
| | | <button class="layui-btn" lay-filter="hospital-form-submit" lay-submit>保存</button> |
| | | </div> |
| | | <input type="hidden" name="departmentId" id="departmentId" value="" /> |
| | | <input type="hidden" name="orgId" id="orgId" value="" /> |
| | |
| | | </form> |
| | | |
| | | <script> |
| | | |
| | | |
| | | layui.use(['form', 'table', 'util', 'config', 'admin', 'area', 'dic', 'autocomplete'], function () { |
| | | var form = layui.form; |
| | | var table = layui.table; |
| | |
| | | var autocomplete = layui.autocomplete; |
| | | var $ = layui.jquery; |
| | | |
| | | permissionsInput(); |
| | | |
| | | //加载服务人员信息 |
| | | var loadServerUser = function (selectVal) { |
| | | admin.req('api-user/users/getAppointUser', { type: 1 }, function (data) { |
| | | layer.closeAll('loading'); |
| | | if (0 === data.code) { |
| | | if (data.data.length > 0) { |
| | | $.each(data.data, function (index, item) { |
| | | if (selectVal == item.id) { |
| | | $('#serverUserName').append(new Option(item.nickname, item.id, false, true)); |
| | | } |
| | | else { |
| | | //往下拉菜单里添加元素 |
| | | $('#serverUserName').append(new Option(item.nickname, item.id, false, false)); |
| | | } |
| | | }) |
| | | } |
| | | |
| | | if(hosIdForEdit == ""){ |
| | | $("#serverUserTel").val(data.data[0].mobile); |
| | | form.render(); |
| | | } |
| | | } else { |
| | | layer.msg(data.msg, { icon: 2, time: 500 }); |
| | | } |
| | | |
| | | }, 'get'); |
| | | } |
| | | |
| | | //加载销售人员信息 |
| | | var loadSaleUser = function (selectVal) { |
| | | admin.req('api-user/users/getAppointUser', { type: 0 }, function (data) { |
| | | layer.closeAll('loading'); |
| | | if (0 === data.code) { |
| | | if (data.data.length > 0) { |
| | | $.each(data.data, function (index, item) { |
| | | //往下拉菜单里添加元素 |
| | | if (selectVal == item.id) { |
| | | $('#saleUserName').append(new Option(item.nickname, item.id, false, true)); |
| | | } else { |
| | | $('#saleUserName').append(new Option(item.nickname, item.id, false, false)); |
| | | } |
| | | }); |
| | | |
| | | if(hosIdForEdit == ""){ |
| | | $("#saleUserTel").val(data.data[0].mobile); |
| | | form.render(); |
| | | } |
| | | } |
| | | } else { |
| | | layer.msg(data.msg, { icon: 2, time: 500 }); |
| | | } |
| | | |
| | | }, 'get'); |
| | | } |
| | | |
| | | |
| | | //医院资质数据 |
| | | dic.dicData("#hospitalQualifiedName", "HOSPITAL_QUALIFIED", ""); |
| | | //医院类型数据 |
| | |
| | | var departmentData = { |
| | | serverUserId: $("#serverUserName").val(), |
| | | serverUserName: $("#serverUserName option:selected").text(), |
| | | serverUserTel: $("#serverUserTel").val(), |
| | | departmentName: $("#departmentName").val(), |
| | | id: $("#departmentId").val(), |
| | | orgId: $("#departmentOrgId").val(), |
| | | updateUserId: data.data.orgId, |
| | | hospitalId: data.data.id |
| | | hospitalId: data.data.id, |
| | | saleUserId: $("#saleUserName").val(), |
| | | saleUserName: $("#saleUserName option:selected").text(), |
| | | saleUserTel: $("#saleUserTel").val() |
| | | }; |
| | | admin.req('api-user/sysdepartment', JSON.stringify(departmentData), function (data) { |
| | | layer.closeAll('loading'); |
| | |
| | | } |
| | | }); |
| | | //加载当前所在部门的在职员工 |
| | | admin.req('api-user/users/getThisUserOrganizationUser', {}, function (data) { |
| | | /*admin.req('api-user/users/getThisUserOrganizationUser', {}, function (data) { |
| | | layer.closeAll('loading'); |
| | | if (0 === data.code) { |
| | | if (data.data.length > 0) { |
| | |
| | | } else { |
| | | layer.msg(data.msg, { icon: 2, time: 500 }); |
| | | } |
| | | }, 'get'); |
| | | }, 'get');*/ |
| | | |
| | | |
| | | |
| | | //检查科室名是否存在 |
| | | $("#departmentName").blur(function () { |
| | | debugger |
| | | if (edithospitalData != null) { |
| | | if (edithospitalData.departmentName == $("#departmentName").val()) { |
| | | return false; |
| | |
| | | if (departData.length > 1) { |
| | | layer.msg("该医院下有多个科室,默认显示第一个", { icon: 1, time: 2000 }); |
| | | } |
| | | |
| | | $("#serverUserId").val(departData[0].serverUserId); |
| | | $("#serverUserName").val(departData[0].serverUserId); |
| | | loadServerUser(departData[0].serverUserId); |
| | | |
| | | $("#departmentName").val(departData[0].departmentName); |
| | | $("#departmentId").val(departData[0].id); |
| | | $("#departmentOrgId").val(departData[0].orgId); |
| | | $("#saleUserId").val(departData[0].saleUserId); |
| | | loadSaleUser(departData[0].saleUserId); |
| | | |
| | | if(hosIdForEdit != ""){ |
| | | $("#serverUserTel").val(departData[0].serverUserTel); |
| | | $("#saleUserTel").val(departData[0].saleUserTel); |
| | | } |
| | | form.render(); |
| | | } |
| | | } |
| | |
| | | var hosIdForEdit = ""; |
| | | if (edithospitalData != null) { |
| | | hosIdForEdit = edithospitalData.hospitalId; |
| | | if (!strUtil.isEmpty(hosIdForEdit)) |
| | | if (!strUtil.isEmpty(hosIdForEdit)){} |
| | | loadDatas(hosIdForEdit); |
| | | } |
| | | |
| | | layui.use('form', function () { |
| | | var $ = layui.$ |
| | | , layer = layui.layer |
| | | , form = layui.form |
| | | |
| | | form.verify({ |
| | | integer: [ |
| | | /^[1-9]\d*$/ |
| | | , '只能输入正整数' |
| | | ] |
| | | }); |
| | | }); |
| | | |
| | | form.on("select(serverUserName)", function (data) { |
| | | loadUserMobile('serverUserTel',data.value); |
| | | }); |
| | | |
| | | form.on("select(saleUserName)", function (data) { |
| | | loadUserMobile('saleUserTel',data.value); |
| | | }); |
| | | |
| | | var loadUserMobile = function(id,userId){ |
| | | admin.req('api-user/users/' + userId, { }, function (data) { |
| | | if (data != null) { |
| | | $("#" + id).val(data.mobile); |
| | | }else { |
| | | layer.msg(data.msg, { icon: 2, time: 500 }); |
| | | } |
| | | }, 'get') |
| | | } |
| | | }); |
| | | </script> |
| | |
| | | </div> |
| | | <div class="layui-card-body"> |
| | | <div class="layui-form toolbar">  |
| | | <input id="product-search-value" class="layui-input search-input" type="text" placeholder="按产品名" />  |
| | | <input id="hospital-search-value" class="layui-input search-input" type="text" placeholder="按医院名" />  |
| | | <button id="product-btn-search" class="layui-btn icon-btn permissions" permissions="productorderdetail-get"><i class="layui-icon"></i>搜索</button> |
| | | <div class="layui-col-sm10"> |
| | | <div class="layui-col-sm4"> |
| | | <input type="text" class="layui-input search-input" id="startTime" placeholder="yyyy-MM-dd"> 至 <input type="text" |
| | | class="layui-input search-input" id="endTime" placeholder="yyyy-MM-dd">   |
| | | </div> |
| | | <div class="layui-col-sm2"> |
| | | <input id="product-search-value" class="layui-input search-input" type="text" placeholder="按产品名" />  |
| | | </div> |
| | | <div class="layui-col-sm2"> |
| | | <input id="hospital-search-value" class="layui-input search-input" type="text" placeholder="按医院名" style="width: 100%;" /> |
| | | </div> |
| | | <div class="layui-col-sm2"> |
| | |  <button id="product-btn-search" class="layui-btn icon-btn"><i class="layui-icon"></i>搜索</button> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | <table class="layui-table" id="product-table" lay-filter="product-table"></table> |
| | | </div> |
| | | </div> |
| | | <!-- 表格操作列 --> |
| | | <script type="text/html" id="product-table-bar"> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs permissions" permissions="productorderdetail-del" lay-event="del">删除</a> |
| | | <a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">删除</a> |
| | | </script> |
| | | <!-- 表格状态列 --> |
| | | <script type="text/html" id="product-tpl-state"> |
| | |
| | | </script> |
| | | |
| | | <script> |
| | | layui.use(['table', 'util', 'admin', 'config', 'form'], function () { |
| | | layui.use(['table', 'util', 'admin', 'config', 'form', 'laydate', 'autocomplete'], function () { |
| | | let table = layui.table; |
| | | let util = layui.util; |
| | | let admin = layui.admin; |
| | | let form = layui.form; |
| | | let config = layui.config; |
| | | var autocomplete = layui.autocomplete; |
| | | var laydate = layui.laydate; |
| | | |
| | | //执行一个laydate实例 |
| | | laydate.render({ |
| | | elem: '#startTime' //指定元素 |
| | | }); |
| | | laydate.render({ |
| | | elem: '#endTime' //指定元素 |
| | | }); |
| | | |
| | | // 渲染表格 |
| | | var renderTable = function () { |
| | |
| | | { field: 'proEndtime', width: 120, title: '结束时间',templet:function(d){ |
| | | return new Date(d.proEndtime).dateFormat("yyyy/MM/dd"); |
| | | } }, |
| | | { field: 'createTime', width: 160, sort: true, title: '创建时间',templet:function(d){ |
| | | return new Date(d.createTime).dateFormat("yyyy-MM-dd hh:mm"); |
| | | } }, |
| | | // { field: 'createTime', width: 160, sort: true, title: '创建时间',templet:function(d){ |
| | | // return new Date(d.createTime).dateFormat("yyyy/MM/dd hh:mm:ss"); |
| | | // } }, |
| | | { field: 'createTime', width: 250, sort: true, title: '创建时间', templet: "<div>{{layui.util.toDateString(d.createTime, 'yyyy/MM/dd HH:mm')}}</div>" }, |
| | | { align: 'center', width: 100, toolbar: '#product-table-bar', title: '操作' } |
| | | ]], |
| | | done:function(){ |
| | | permissionsInput(); |
| | | } |
| | | ]] |
| | | }); |
| | | } |
| | | renderTable(); |
| | |
| | | |
| | | // 搜索按钮点击事件 |
| | | $('#product-btn-search').click(function () { |
| | | var startTime = $('#startTime').val(); |
| | | var endTime = $('#endTime').val(); |
| | | if (startTime != null && endTime != null) { |
| | | var flag = compareDate(startTime, endTime); |
| | | if (!flag) { |
| | | layer.msg('结束时间不得小于开始时间'); |
| | | return; |
| | | } |
| | | } |
| | | var proName = $('#product-search-value').val(); |
| | | var hospitalName = $('#hospital-search-value').val(); |
| | | table.reload('product-table', { where: { proName: proName,hospitalName: hospitalName } }); |
| | | table.reload('product-table', { where: { proName: proName,hospitalName: hospitalName,startTime: startTime, endTime: endTime } }); |
| | | }); |
| | | |
| | | //比较日期大小 |
| | | function compareDate(logintime, logouttime) { |
| | | var arys1 = new Array(); |
| | | var arys2 = new Array(); |
| | | if (logintime != null && logouttime != null) { |
| | | arys1 = logintime.split('-'); |
| | | var logindate = new Date(arys1[0], parseInt(arys1[1] - 1), arys1[2]); |
| | | arys2 = logouttime.split('-'); |
| | | var logoutdate = new Date(arys2[0], parseInt(arys2[1] - 1), arys2[2]); |
| | | if (logindate > logoutdate) { |
| | | return false; |
| | | } else { |
| | | return true; |
| | | } |
| | | } |
| | | } |
| | | |
| | | //自动完成-医院名称 |
| | | autocomplete.render({ |
| | | elem: $('#hospital-search-value'), |
| | | keywordsName: 'hospitalName',//查询关键字名称 |
| | | url: config.base_server + 'api-user/syshospital/findByName', |
| | | template_val: '{{d.hospitalName}}',//选择后文本框显示的数据字段 |
| | | template_txt: "<div class='layui-table-cell'>{{d.hospitalName}}</div>",//下拉列表模板 |
| | | }); |
| | | }); |
| | | </script> |
| | |
| | | <swagger.mg.ui.version>1.0.6</swagger.mg.ui.version> |
| | | <swagger.butler.version>2.0.1</swagger.butler.version> |
| | | <commons-collections4.version>4.4</commons-collections4.version> |
| | | <fastjson.version>1.2.62</fastjson.version> |
| | | <fastjson.version>1.2.70</fastjson.version> |
| | | <httpclient.version>4.5.6</httpclient.version> |
| | | <modle-mapper.version>2.3.4</modle-mapper.version> |
| | | <security-oauth2.version>2.4.0.RELEASE</security-oauth2.version> |
| | |
| | | <!-- 自定义 starter --> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-plugin-sms-center-server</artifactId> |
| | | <version>${project.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-plugin-sms-biz</artifactId> |
| | | <version>${project.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-plugin-sms-api</artifactId> |
| | | <version>${project.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-plugin-sms</artifactId> |
| | | <version>${project.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.kidgrow</groupId> |
| | | <artifactId>kidgrow-config</artifactId> |
| | | <version>${project.version}</version> |
| | | </dependency> |