| | |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-data-redis</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.lettuce</groupId> |
| | | <artifactId>lettuce-core</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.commons</groupId> |
| | | <artifactId>commons-pool2</artifactId> |
| | | </dependency> |
| | | |
| | | <!--spring boot依赖--> |
| | | <dependency> |
| | |
| | | <dependency> |
| | | <groupId>com.ibeetl</groupId> |
| | | <artifactId>beetl</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger2</artifactId> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger-ui</artifactId> |
| | | </dependency> |
| | | |
| | | <dependency> |
| | |
| | | <scope>system</scope> |
| | | <systemPath>${pom.basedir}/lib/javabase64-1.3.1.jar</systemPath> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ncoss</groupId> |
| | | <artifactId>ncoss-java-sdk</artifactId> |
| | | <version>1.0.5</version> |
| | | <scope>system</scope> |
| | | <systemPath>${pom.basedir}/lib/ncoss-java-sdk-1.0.5.jar</systemPath> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.springframework.boot</groupId> |
| | | <artifactId>spring-boot-starter-data-mongodb</artifactId> |
| | | </dependency> |
| | | </dependencies> |
| | | |
| | | |
| | |
| | | import org.apache.http.config.SocketConfig; |
| | | import org.apache.http.impl.client.HttpClientBuilder; |
| | | import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; |
| | | import org.mybatis.spring.annotation.MapperScan; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.boot.SpringApplication; |
| | |
| | | private final static Logger logger = LoggerFactory.getLogger(GunsApplication.class); |
| | | |
| | | public static void main(String[] args) { |
| | | try{ |
| | | SpringApplication.run(GunsApplication.class, args); |
| | | logger.info("GunsApplication is success!"); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | } |
| | | |
| | | @Bean //通过ip地址调用 |
| | |
| | | registrationBean.setOrder(2); |
| | | |
| | | registrationBean.addInitParameter("oncon.com.security.urls", "/**"); |
| | | registrationBean.addInitParameter("erp.si-tech.com.cn.noCheckUrl", "/index.html,/static/**"); |
| | | registrationBean.addInitParameter("erp.si-tech.com.cn.noCheckUrl", "/index.html,/static/**,/upload/**"); |
| | | registrationBean.addInitParameter("erp.si-tech.com.cn.nologinstatus", "/*"); |
| | | registrationBean.addInitParameter("erp.si-tech.com.cn.loginstatus", "/*"); |
| | | registrationBean.addInitParameter("com.oncon.sso.urlparams.nologin", "code,code2"); |
| | |
| | | registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.loginUrl", "https://testsso1.teamshub.com/login"); |
| | | registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.validateUrl", "https://testsso1.teamshub.com/serviceValidate"); |
| | | registrationBean.addInitParameter("com.oncon.md.loginUrl", "https://testsso1.teamshub.com/sso-session/login"); |
| | | registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.serverName", "127.0.0.1:8010"); |
| | | registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.serverName", "https://traffic.qytzt.cn:443"); |
| | | // registrationBean.addInitParameter("edu.yale.its.tp.cas.client.filter.serverName", "http://127.0.0.1:8010"); |
| | | |
| | | return registrationBean; |
| | | } |
| | |
| | | import com.stylefeng.guns.generator.action.model.GenQo; |
| | | import com.stylefeng.guns.modular.code.factory.DefaultTemplateFactory; |
| | | import com.stylefeng.guns.modular.code.service.TableService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | |
| | | /** |
| | | * 生成代码 |
| | | */ |
| | | @ApiOperation("生成代码") |
| | | @RequestMapping(value = "/generate", method = RequestMethod.POST) |
| | | @ResponseBody |
| | | public Object generate(GenQo genQo) { |
| | |
| | | package com.stylefeng.guns.modular.system.controller.general; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | |
| | | import org.springframework.web.bind.annotation.RequestMethod; |
| | | import org.springframework.web.bind.annotation.ResponseBody; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.math.BigDecimal; |
| | | import java.math.RoundingMode; |
| | | import java.util.*; |
| | |
| | | @Autowired |
| | | private ITTaxiCardService taxiCardService; |
| | | |
| | | @Autowired |
| | | private RedisTemplate redisTemplate; |
| | | @Resource |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | @Autowired |
| | | private IUserService userService; |
| | |
| | | List<TDriver> tDrivers = tDriverService.selectList(ne); |
| | | Map<String, Object> map = new HashMap<>(); |
| | | List<Object> list = new ArrayList<>(); |
| | | System.out.println(tDrivers.toString()); |
| | | for(TDriver tDriver : tDrivers){ |
| | | Map<String, Object> d = new HashMap<>(); |
| | | String value = (String)redisTemplate.opsForValue().get("DRIVER" + tDriver.getId()); |
| | | System.out.println(value); |
| | | if(ToolUtil.isEmpty(value)){ |
| | | continue; |
| | | } |
| | |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.log.LogObjectHolder; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.model.*; |
| | | import com.stylefeng.guns.modular.system.model.MerchantActivity; |
| | | import com.stylefeng.guns.modular.system.model.MerchantActivitySlave; |
| | | import com.stylefeng.guns.modular.system.model.User; |
| | | import com.stylefeng.guns.modular.system.model.UserMerchantCoupon; |
| | | import com.stylefeng.guns.modular.system.response.MerchantActivityVo; |
| | | import com.stylefeng.guns.modular.system.service.*; |
| | | import io.swagger.models.auth.In; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | //调用中台接口创建企业 |
| | | CheckEnterExist checkEnterExist = EnterpriseUtil.checkEnterNameExist(tCompany.getName()); |
| | | if (null != checkEnterExist && "1".equals(checkEnterExist.getIsReg())) { |
| | | |
| | | EnterpriseUtil.delEnterprise(checkEnterExist.getEnterCode(), tCompany.getPrincipalPhone()); |
| | | } |
| | | |
| | | tCompany.setFlag("3"); |
| | |
| | | @Resource |
| | | private DriverPunishMapper driverPunishMapper; |
| | | |
| | | @Autowired |
| | | private RedisTemplate redisTemplate; |
| | | @Resource |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | |
| | | request.setLoginNo(tDriver.getPhone()); |
| | | request.setEmpSex(tDriver.getSex() == 1 ? "男" : "女"); |
| | | request.setMphone(tDriver.getPhone()); |
| | | request.setEmail("qyt@qyt.com"); |
| | | request.setEmail(tDriver.getPhone() + "@qyt.com"); |
| | | request.setDeptId(0); |
| | | request.setPositionId(1); |
| | | request.setSuperLevel(0); |
| | |
| | | request.setLoginNo(tDriver.getPhone()); |
| | | request.setEmpSex(tDriver.getSex() == 1 ? "男" : "女"); |
| | | request.setMphone(tDriver.getPhone()); |
| | | request.setEmail("qyt@qyt.com"); |
| | | request.setEmail(tDriver.getPhone() + "@qyt.com"); |
| | | request.setDeptId(0); |
| | | request.setPositionId(1); |
| | | request.setSuperLevel(0); |
| | |
| | | request.setLoginNo(tDriver.getPhone()); |
| | | request.setEmpSex(tDriver.getSex() == 1 ? "男" : "女"); |
| | | request.setMphone(tDriver.getPhone()); |
| | | request.setEmail("qyt@qyt.com"); |
| | | request.setEmail(tDriver.getPhone() + "@qyt.com"); |
| | | request.setDeptId(0); |
| | | request.setPositionId(1); |
| | | request.setSuperLevel(0); |
| | |
| | | saveStaffNodeRequest.setLoginNo(driver.getPhone()); |
| | | saveStaffNodeRequest.setEmpSex(driver.getSex() == 1 ? "男" : "女"); |
| | | saveStaffNodeRequest.setMphone(driver.getPhone()); |
| | | saveStaffNodeRequest.setEmail("qyt@qyt.com"); |
| | | saveStaffNodeRequest.setEmail(driver.getPhone() + "@qyt.com"); |
| | | saveStaffNodeRequest.setDeptId(0); |
| | | saveStaffNodeRequest.setPositionId(1); |
| | | saveStaffNodeRequest.setSuperLevel(0); |
| | |
| | | |
| | | //拼车设置 |
| | | SpellOrderRule spellOrderRule = spellOrderRuleService.selectOne(new EntityWrapper<SpellOrderRule>().eq("companyId", ShiroExtUtil.getUser().getObjectId())); |
| | | model.addAttribute("spellOrderRule", JSONObject.parseObject(spellOrderRule.getContent())); |
| | | model.addAttribute("spellOrderRule", null == spellOrderRule ? "" : JSONObject.parseObject(spellOrderRule.getContent())); |
| | | |
| | | //报警电话 |
| | | TPhone phone1 = tPhoneService.selectOne(new EntityWrapper<TPhone>().eq("companyId", ShiroExtUtil.getUser().getObjectId()).eq("type", 1)); |
| | |
| | | |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.heredata.hos.model.bucket.Bucket; |
| | | import com.stylefeng.guns.config.properties.GunsProperties; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | |
| | | import com.stylefeng.guns.modular.system.model.TVersionManagement; |
| | | import com.stylefeng.guns.modular.system.service.ITVersionManagementService; |
| | | import com.stylefeng.guns.modular.system.util.PushMinistryOfTransportUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.NCOSSUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.QianYunTongProperties; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.stereotype.Controller; |
| | |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.File; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | |
| | | Map<String, Object> m = new HashMap<>(); |
| | | try { |
| | | String pictureName = UUID.randomUUID().toString() + "." + ToolUtil.getFileSuffix(myfile.getOriginalFilename()); |
| | | try { |
| | | String fileSavePath = gunsProperties.getFileUploadPath() + "apk\\"; |
| | | myfile.transferTo(new File(fileSavePath + pictureName)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | String bucketName = QianYunTongProperties.bucketName; |
| | | Bucket grjyTest = NCOSSUtil.getBucketInfo(bucketName); |
| | | if (null == grjyTest) { |
| | | //创建桶 |
| | | Boolean bucket = NCOSSUtil.createBucket(bucketName); |
| | | if (!bucket) { |
| | | throw new RuntimeException("创建存储桶失败"); |
| | | } |
| | | m.put("imgUrl", gunsProperties.getPictureServerAddress() + "apk/" + pictureName); |
| | | //设置桶策略 |
| | | String policyText = "{\"Version\":\"2025-06-23\",\"Statement\":[{\"Sid\":\"Stmt20250623\",\"Action\":[\"GetObject\"],\"Effect\":\"Allow\",\"Resource\":\"" + bucketName + "/*\",\"Principal\":\"*\"}]}"; |
| | | Boolean bucketPolicy = NCOSSUtil.setBucketPolicy(bucketName, policyText); |
| | | if (!bucketPolicy) { |
| | | throw new RuntimeException("设置桶策略失败"); |
| | | } |
| | | } |
| | | //上传对象 |
| | | String key = "apk/" + pictureName; |
| | | String object = NCOSSUtil.putObject(bucketName, key, myfile.getInputStream()); |
| | | if (null == object) { |
| | | throw new RuntimeException("上传图片失败"); |
| | | } |
| | | m.put("imgUrl", "https://traffic.qytzt.cn/v1/AUTH_" + QianYunTongProperties.account + "/" + bucketName + "/" + key); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.controller.specialTrain; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.shiro.ShiroUser; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | |
| | | import org.apache.commons.lang.time.DateFormatUtils; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.BufferedReader; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStreamReader; |
| | | import java.math.BigDecimal; |
| | | import java.util.*; |
| | | import java.util.Date; |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | |
| | | /** |
| | | * 跨城出行订单控制器 |
| | |
| | | @Autowired |
| | | private ITUserService userService; |
| | | |
| | | @Value("${filePath}") |
| | | private String filePath; |
| | | @Resource |
| | | private MongoTemplate mongoTemplate; |
| | | |
| | | |
| | | /** |
| | | * 跳转到跨城出行订单首页 |
| | |
| | | public ResultUtil getOrderTrack(String orderDetailId){ |
| | | if(ToolUtil.isNotEmpty(orderDetailId)){ |
| | | try { |
| | | //将数据存储到文件中 |
| | | File file = new File(filePath + orderDetailId + "_3.txt"); |
| | | if(!file.exists()){ |
| | | return ResultUtil.success(new ArrayList<>()); |
| | | } |
| | | //读取文件(字符流) |
| | | BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8")); |
| | | //循环取出数据 |
| | | String str = null; |
| | | StringBuffer sb = new StringBuffer(); |
| | | while ((str = in.readLine()) != null) { |
| | | sb.append(str); |
| | | } |
| | | List<TOrderPosition> list = JSONArray.parseArray(sb.toString(), TOrderPosition.class); |
| | | // List<TOrderPosition> list = tOrderPositionService.selectList(new EntityWrapper<TOrderPosition>().eq("orderType", 3).eq("orderId", orderDetailId).orderBy("insertTime")); |
| | | /*if(list.size() == 0){ |
| | | return ResultUtil.error("该订单没有运行轨迹"); |
| | | }*/ |
| | | resultUtil = ResultUtil.success(list); |
| | | Query query = new Query() |
| | | .addCriteria(Criteria.where("orderId").is(orderDetailId).and("orderType").is(3)) |
| | | .with(new Sort(Sort.Direction.ASC, "insertTime")); |
| | | List<TOrderPosition> positions = mongoTemplate.find(query, TOrderPosition.class); |
| | | resultUtil = ResultUtil.success(positions); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | resultUtil = ResultUtil.runErr(); |
| | |
| | | package com.stylefeng.guns.modular.system.controller.specialTrain; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.mapper.Wrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.beetl.ShiroExtUtil; |
| | | import com.stylefeng.guns.core.common.constant.factory.PageFactory; |
| | | import com.stylefeng.guns.core.shiro.ShiroKit; |
| | | import com.stylefeng.guns.core.util.DateUtil; |
| | | import com.stylefeng.guns.core.util.SinataUtil; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.BufferedReader; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStreamReader; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | @Value("${pushMinistryOfTransport}") |
| | | private boolean pushMinistryOfTransport; |
| | | |
| | | @Value("${filePath}") |
| | | private String filePath; |
| | | |
| | | |
| | | @Resource |
| | | private MongoTemplate mongoTemplate; |
| | | |
| | | |
| | | /** |
| | |
| | | public ResultUtil getOrderTrack(String orderDetailId){ |
| | | if(ToolUtil.isNotEmpty(orderDetailId)){ |
| | | try { |
| | | // List<TOrderPosition> list = tOrderPositionService.selectList(new EntityWrapper<TOrderPosition>().eq("orderType", 1).eq("orderId", orderDetailId).orderBy("insertTime")); |
| | | /*if(list.size() == 0){ |
| | | return ResultUtil.error("该订单没有运行轨迹"); |
| | | }*/ |
| | | //将数据存储到文件中 |
| | | File file = new File(filePath + orderDetailId + "_1.txt"); |
| | | if(!file.exists()){ |
| | | return ResultUtil.success(new ArrayList<>()); |
| | | } |
| | | //读取文件(字符流) |
| | | BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file),"UTF-8")); |
| | | //循环取出数据 |
| | | String str = null; |
| | | StringBuffer sb = new StringBuffer(); |
| | | while ((str = in.readLine()) != null) { |
| | | sb.append(str); |
| | | } |
| | | List<TOrderPosition> list = JSONArray.parseArray(sb.toString(), TOrderPosition.class); |
| | | resultUtil = ResultUtil.success(list); |
| | | Query query = new Query() |
| | | .addCriteria(Criteria.where("orderId").is(orderDetailId).and("orderType").is(1)) |
| | | .with(new Sort(Sort.Direction.ASC, "insertTime")); |
| | | List<TOrderPosition> positions = mongoTemplate.find(query, TOrderPosition.class); |
| | | resultUtil = ResultUtil.success(positions); |
| | | }catch (Exception e){ |
| | | e.printStackTrace(); |
| | | resultUtil = ResultUtil.runErr(); |
| | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.concurrent.TimeUnit; |
| | | import java.util.stream.Collectors; |
| | | |
| | | import static com.stylefeng.guns.core.support.HttpKit.getIp; |
| | |
| | | @Autowired |
| | | private IUserService userService; |
| | | |
| | | @Autowired |
| | | private RedisTemplate redisTemplate; |
| | | @Resource |
| | | private RedisTemplate<String, Object> redisTemplate; |
| | | |
| | | @Autowired |
| | | private IShiro shiro; |
| | |
| | | */ |
| | | @RequestMapping(value = "/logout", method = RequestMethod.GET) |
| | | public String logOut() { |
| | | // redisTemplate.delete(""); |
| | | HttpUtil.get("https://testsso1.teamshub.com/logout?logouturl=https%3A%2F%2Fsso.teamshub.com%2Flogout%3F%0Alogoutat%3Dhttp%253A%252F%252F127.0.0.1%253A8010%252F"); |
| | | return REDIRECT + "/"; |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.controller.system; |
| | | |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.heredata.hos.model.bucket.Bucket; |
| | | import com.stylefeng.guns.config.properties.GunsProperties; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.NCOSSUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.QianYunTongProperties; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.io.File; |
| | | import java.util.UUID; |
| | | |
| | | @Controller |
| | |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | MultipartFile picture = multipartRequest.getFile("upfile"); |
| | | String callback = request.getParameter("callback"); |
| | | String pictureName = ""; |
| | | try { |
| | | |
| | | String fileName = UUID.randomUUID().toString() + "." + ToolUtil.getFileSuffix(picture.getOriginalFilename()); |
| | | try { |
| | | String fileSavePath = gunsProperties.getFileUploadPath() + "img\\"; |
| | | picture.transferTo(new File(fileSavePath + fileName)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | String pictureName = UUID.randomUUID().toString() + "." + ToolUtil.getFileSuffix(picture.getOriginalFilename()); |
| | | String bucketName = QianYunTongProperties.bucketName; |
| | | Bucket grjyTest = NCOSSUtil.getBucketInfo(bucketName); |
| | | if (null == grjyTest) { |
| | | //创建桶 |
| | | Boolean bucket = NCOSSUtil.createBucket(bucketName); |
| | | if (!bucket) { |
| | | throw new RuntimeException("创建存储桶失败"); |
| | | } |
| | | pictureName = gunsProperties.getPictureServerAddress() + "img/" + fileName; |
| | | //设置桶策略 |
| | | String policyText = "{\"Version\":\"2025-06-23\",\"Statement\":[{\"Sid\":\"Stmt20250623\",\"Action\":[\"GetObject\"],\"Effect\":\"Allow\",\"Resource\":\"" + bucketName + "/*\",\"Principal\":\"*\"}]}"; |
| | | Boolean bucketPolicy = NCOSSUtil.setBucketPolicy(bucketName, policyText); |
| | | if (!bucketPolicy) { |
| | | throw new RuntimeException("设置桶策略失败"); |
| | | } |
| | | } |
| | | //上传对象 |
| | | String key = "imgs/management/" + pictureName; |
| | | String object = NCOSSUtil.putObject(bucketName, key, picture.getInputStream()); |
| | | if (null == object) { |
| | | throw new RuntimeException("上传图片失败"); |
| | | } |
| | | |
| | | pictureName = "https://traffic.qytzt.cn/v1/AUTH_" + QianYunTongProperties.account + "/" + bucketName + "/" + key; |
| | | |
| | | |
| | | //文件上传,具体根据实际替换 |
| | |
| | | request1.setLoginNo(user.getAccount()); |
| | | request1.setEmpSex(user.getSex() == 1 ? "男" : "女"); |
| | | request1.setMphone(user.getPhone()); |
| | | request1.setEmail("qyt@qyt.com"); |
| | | request1.setEmail(user.getPhone() + "@qyt.com"); |
| | | request1.setDeptId(0); |
| | | request1.setPositionId(1); |
| | | request1.setSuperLevel(0); |
| | |
| | | TCompany tCompany = companyService.selectById(user2.getObjectId()); |
| | | //调用中台接口 |
| | | GetStaffNodeRequest request = new GetStaffNodeRequest(); |
| | | request.setEmpId(oldUser.getEnterId()); |
| | | request.setEmpId(oldUser.getEmpId()); |
| | | request.setMobile(user2.getPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | StaffNodeInfo staffNode = EmployeeUtil.getStaffNode(request); |
| | |
| | | request1.setLoginNo(user.getAccount()); |
| | | request1.setEmpSex(user.getSex() == 1 ? "男" : "女"); |
| | | request1.setMphone(user.getPhone()); |
| | | request1.setEmail("qyt@qyt.com"); |
| | | request1.setEmail(user.getPhone() + "@qyt.com"); |
| | | request1.setDeptId(0); |
| | | request1.setPositionId(1); |
| | | request1.setSuperLevel(0); |
| | |
| | | request1.setLoginNo(user.getAccount()); |
| | | request1.setEmpSex(user.getSex() == 1 ? "男" : "女"); |
| | | request1.setMphone(user.getPhone()); |
| | | request1.setEmail("qyt@qyt.com"); |
| | | request1.setEmail(user.getPhone() + "@qyt.com"); |
| | | request1.setDeptId(0); |
| | | request1.setPositionId(1); |
| | | request1.setSuperLevel(0); |
| | |
| | | TCompany tCompany = companyService.selectById(user2.getObjectId()); |
| | | //调用中台接口 |
| | | GetStaffNodeRequest request = new GetStaffNodeRequest(); |
| | | request.setEmpId(user.getEnterId()); |
| | | request.setEmpId(user.getEmpId()); |
| | | request.setMobile(user2.getPhone()); |
| | | request.setEntercode(tCompany.getEnterCode()); |
| | | StaffNodeInfo staffNode = EmployeeUtil.getStaffNode(request); |
| | |
| | | package com.stylefeng.guns.modular.system.controller.taxi; |
| | | |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.baomidou.mybatisplus.mapper.EntityWrapper; |
| | | import com.baomidou.mybatisplus.plugins.Page; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | |
| | | import com.stylefeng.guns.modular.system.util.ResultUtil; |
| | | import org.apache.commons.collections.CollectionUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.data.domain.Sort; |
| | | import org.springframework.data.mongodb.core.MongoTemplate; |
| | | import org.springframework.data.mongodb.core.query.Criteria; |
| | | import org.springframework.data.mongodb.core.query.Query; |
| | | import org.springframework.stereotype.Controller; |
| | | import org.springframework.ui.Model; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.io.BufferedReader; |
| | | import java.io.File; |
| | | import java.io.FileInputStream; |
| | | import java.io.InputStreamReader; |
| | | import javax.annotation.Resource; |
| | | import java.util.*; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private ITUserService userService; |
| | | |
| | | @Value("${filePath}") |
| | | private String filePath; |
| | | @Resource |
| | | private MongoTemplate mongoTemplate; |
| | | |
| | | |
| | | /** |
| | | * 跳转到出租车订单首页 |
| | |
| | | public ResultUtil getOrderTrack(String orderDetailId) { |
| | | if (ToolUtil.isNotEmpty(orderDetailId)) { |
| | | try { |
| | | // List<TOrderPosition> list = tOrderPositionService.selectList(new EntityWrapper<TOrderPosition>().eq("orderType", 2).eq("orderId", orderDetailId).orderBy("insertTime")); |
| | | /*if(list.size() == 0){ |
| | | return ResultUtil.error("该订单没有运行轨迹"); |
| | | }*/ |
| | | //将数据存储到文件中 |
| | | File file = new File(filePath + orderDetailId + "_2.txt"); |
| | | if (!file.exists()) { |
| | | return ResultUtil.success(new ArrayList<>()); |
| | | } |
| | | //读取文件(字符流) |
| | | BufferedReader in = new BufferedReader(new InputStreamReader(new FileInputStream(file), "UTF-8")); |
| | | //循环取出数据 |
| | | String str = null; |
| | | StringBuffer sb = new StringBuffer(); |
| | | while ((str = in.readLine()) != null) { |
| | | sb.append(str); |
| | | } |
| | | List<TOrderPosition> list = JSONArray.parseArray(sb.toString(), TOrderPosition.class); |
| | | resultUtil = ResultUtil.success(list); |
| | | Query query = new Query() |
| | | .addCriteria(Criteria.where("orderId").is(orderDetailId).and("orderType").is(2)) |
| | | .with(new Sort(Sort.Direction.ASC, "insertTime")); |
| | | List<TOrderPosition> positions = mongoTemplate.find(query, TOrderPosition.class); |
| | | resultUtil = ResultUtil.success(positions); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | resultUtil = ResultUtil.runErr(); |
| | |
| | | package com.stylefeng.guns.modular.system.controller.util; |
| | | |
| | | import com.heredata.hos.model.bucket.Bucket; |
| | | import com.stylefeng.guns.config.properties.GunsProperties; |
| | | import com.stylefeng.guns.core.base.controller.BaseController; |
| | | import com.stylefeng.guns.core.common.exception.BizExceptionEnum; |
| | | import com.stylefeng.guns.core.exception.GunsException; |
| | | import com.stylefeng.guns.core.util.ToolUtil; |
| | | import com.stylefeng.guns.modular.system.service.ITImgMidService; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.NCOSSUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.QianYunTongProperties; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import java.io.File; |
| | | import java.util.HashMap; |
| | | import java.util.Map; |
| | | import java.util.UUID; |
| | |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | MultipartFile file = (MultipartFile) multipartRequest.getFile("myfile"); |
| | | if (file.getSize() != 0) { |
| | | String fileName = UUID.randomUUID().toString() + "." + ToolUtil.getFileSuffix(file.getOriginalFilename()); |
| | | try { |
| | | String fileSavePath = gunsProperties.getFileUploadPath() + "img\\"; |
| | | file.transferTo(new File(fileSavePath + fileName)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | String pictureName = UUID.randomUUID().toString() + "." + ToolUtil.getFileSuffix(file.getOriginalFilename()); |
| | | String bucketName = QianYunTongProperties.bucketName; |
| | | Bucket grjyTest = NCOSSUtil.getBucketInfo(bucketName); |
| | | if (null == grjyTest) { |
| | | //创建桶 |
| | | Boolean bucket = NCOSSUtil.createBucket(bucketName); |
| | | if (!bucket) { |
| | | throw new RuntimeException("创建存储桶失败"); |
| | | } |
| | | ossUpload = gunsProperties.getPictureServerAddress() + "img/" + fileName; |
| | | //设置桶策略 |
| | | String policyText = "{\"Version\":\"2025-06-23\",\"Statement\":[{\"Sid\":\"Stmt20250623\",\"Action\":[\"GetObject\"],\"Effect\":\"Allow\",\"Resource\":\"" + bucketName + "/*\",\"Principal\":\"*\"}]}"; |
| | | Boolean bucketPolicy = NCOSSUtil.setBucketPolicy(bucketName, policyText); |
| | | if (!bucketPolicy) { |
| | | throw new RuntimeException("设置桶策略失败"); |
| | | } |
| | | } |
| | | //上传对象 |
| | | String key = "imgs/management/" + pictureName; |
| | | String object = NCOSSUtil.putObject(bucketName, key, file.getInputStream()); |
| | | if (null == object) { |
| | | throw new RuntimeException("上传图片失败"); |
| | | } |
| | | |
| | | ossUpload = "https://traffic.qytzt.cn/v1/AUTH_" + QianYunTongProperties.account + "/" + bucketName + "/" + key; |
| | | |
| | | |
| | | // ossUpload = OssUploadUtil.ossUpload(request, file); |
| | |
| | | private ITImgMidService itImgMidService; |
| | | |
| | | |
| | | @RequestMapping("/image1") |
| | | @RequestMapping("/image") |
| | | @ResponseBody |
| | | public String image1(@RequestPart("file") MultipartFile picture, HttpServletRequest request) { |
| | | try { |
| | | MultipartHttpServletRequest multipartRequest = (MultipartHttpServletRequest) request; |
| | | MultipartFile file = (MultipartFile) picture; |
| | | |
| | | String fileName = UUID.randomUUID().toString() + "." + ToolUtil.getFileSuffix(file.getOriginalFilename()); |
| | | try { |
| | | String fileSavePath = gunsProperties.getFileUploadPath() + "img\\"; |
| | | file.transferTo(new File(fileSavePath + fileName)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | String pictureName = UUID.randomUUID().toString() + "." + ToolUtil.getFileSuffix(file.getOriginalFilename()); |
| | | String bucketName = QianYunTongProperties.bucketName; |
| | | Bucket grjyTest = NCOSSUtil.getBucketInfo(bucketName); |
| | | if (null == grjyTest) { |
| | | //创建桶 |
| | | Boolean bucket = NCOSSUtil.createBucket(bucketName); |
| | | if (!bucket) { |
| | | throw new RuntimeException("创建存储桶失败"); |
| | | } |
| | | String pictureName = gunsProperties.getPictureServerAddress() + "img/" + fileName; |
| | | //设置桶策略 |
| | | String policyText = "{\"Version\":\"2025-06-23\",\"Statement\":[{\"Sid\":\"Stmt20250623\",\"Action\":[\"GetObject\"],\"Effect\":\"Allow\",\"Resource\":\"" + bucketName + "/*\",\"Principal\":\"*\"}]}"; |
| | | Boolean bucketPolicy = NCOSSUtil.setBucketPolicy(bucketName, policyText); |
| | | if (!bucketPolicy) { |
| | | throw new RuntimeException("设置桶策略失败"); |
| | | } |
| | | } |
| | | //上传对象 |
| | | String key = "imgs/management/" + pictureName; |
| | | String object = NCOSSUtil.putObject(bucketName, key, file.getInputStream()); |
| | | if (null == object) { |
| | | throw new RuntimeException("上传图片失败"); |
| | | } |
| | | |
| | | pictureName = "https://traffic.qytzt.cn/v1/AUTH_" + QianYunTongProperties.account + "/" + bucketName + "/" + key; |
| | | |
| | | // String pictureName = OssUploadUtil.ossUpload(request, file); |
| | | System.out.println("mediaResp"); |
| | |
| | | String suffix = picture.getOriginalFilename().substring(picture.getOriginalFilename().lastIndexOf(".")); |
| | | String pictureName = UUID.randomUUID().toString() + suffix; |
| | | try { |
| | | // 文件目录路径 |
| | | String fileSavePath = gunsProperties.getFileUploadPath(); |
| | | File file = new File(fileSavePath + pictureName); |
| | | picture.transferTo(file); |
| | | String bucketName = QianYunTongProperties.bucketName; |
| | | Bucket grjyTest = NCOSSUtil.getBucketInfo(bucketName); |
| | | if (null == grjyTest) { |
| | | //创建桶 |
| | | Boolean bucket = NCOSSUtil.createBucket(bucketName); |
| | | if (!bucket) { |
| | | throw new RuntimeException("创建存储桶失败"); |
| | | } |
| | | //设置桶策略 |
| | | String policyText = "{\"Version\":\"2025-06-23\",\"Statement\":[{\"Sid\":\"Stmt20250623\",\"Action\":[\"GetObject\"],\"Effect\":\"Allow\",\"Resource\":\"" + bucketName + "/*\",\"Principal\":\"*\"}]}"; |
| | | Boolean bucketPolicy = NCOSSUtil.setBucketPolicy(bucketName, policyText); |
| | | if (!bucketPolicy) { |
| | | throw new RuntimeException("设置桶策略失败"); |
| | | } |
| | | } |
| | | //上传对象 |
| | | String key = "file/management/" + pictureName; |
| | | String object = NCOSSUtil.putObject(bucketName, key, picture.getInputStream()); |
| | | if (null == object) { |
| | | throw new RuntimeException("上传图片失败"); |
| | | } |
| | | |
| | | pictureName = "https://traffic.qytzt.cn/v1/AUTH_" + QianYunTongProperties.account + "/" + bucketName + "/" + key; |
| | | } catch (Exception e) { |
| | | log.error(e.getMessage(), e); |
| | | throw new GunsException(BizExceptionEnum.UPLOAD_ERROR); |
| | |
| | | String callback = request.getParameter("callback"); |
| | | try { |
| | | // 上传文件目录 |
| | | String fileName = UUID.randomUUID().toString() + "." + ToolUtil.getFileSuffix(picture.getOriginalFilename()); |
| | | try { |
| | | String fileSavePath = gunsProperties.getFileUploadPath() + "img\\"; |
| | | picture.transferTo(new File(fileSavePath + fileName)); |
| | | } catch (Exception e) { |
| | | e.printStackTrace(); |
| | | String pictureName = UUID.randomUUID().toString() + "." + ToolUtil.getFileSuffix(picture.getOriginalFilename()); |
| | | String bucketName = QianYunTongProperties.bucketName; |
| | | Bucket grjyTest = NCOSSUtil.getBucketInfo(bucketName); |
| | | if (null == grjyTest) { |
| | | //创建桶 |
| | | Boolean bucket = NCOSSUtil.createBucket(bucketName); |
| | | if (!bucket) { |
| | | throw new RuntimeException("创建存储桶失败"); |
| | | } |
| | | String pictureName = gunsProperties.getPictureServerAddress() + "img/" + fileName; |
| | | //设置桶策略 |
| | | String policyText = "{\"Version\":\"2025-06-23\",\"Statement\":[{\"Sid\":\"Stmt20250623\",\"Action\":[\"GetObject\"],\"Effect\":\"Allow\",\"Resource\":\"" + bucketName + "/*\",\"Principal\":\"*\"}]}"; |
| | | Boolean bucketPolicy = NCOSSUtil.setBucketPolicy(bucketName, policyText); |
| | | if (!bucketPolicy) { |
| | | throw new RuntimeException("设置桶策略失败"); |
| | | } |
| | | } |
| | | //上传对象 |
| | | String key = "imgs/management/" + pictureName; |
| | | String object = NCOSSUtil.putObject(bucketName, key, picture.getInputStream()); |
| | | if (null == object) { |
| | | throw new RuntimeException("上传图片失败"); |
| | | } |
| | | |
| | | pictureName = "https://traffic.qytzt.cn/v1/AUTH_" + QianYunTongProperties.account + "/" + bucketName + "/" + key; |
| | | // pictureName = OssUploadUtil.ossUpload(super.getHttpServletRequest(), picture); |
| | | |
| | | String result = "{'original': '" + picture.getOriginalFilename() + "', 'state': 'SUCCESS', 'url': '" + pictureName + "'}"; |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableField; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import io.swagger.models.auth.In; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import lombok.Data; |
| | | |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | package com.stylefeng.guns.modular.system.model; |
| | | |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | | import org.springframework.data.mongodb.core.mapping.Document; |
| | | |
| | | import java.util.Date; |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.activerecord.Model; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import java.io.Serializable; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author 吕雪 |
| | | * @since 2020-06-08 |
| | | */ |
| | | @TableName("t_order_position") |
| | | public class TOrderPosition extends Model<TOrderPosition> { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | @Data |
| | | @Document(collection = "order_position") |
| | | public class TOrderPosition { |
| | | /** |
| | | * 订单类型(1=快车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车) |
| | | * 订单类型(1=专车,2=出租车,3=城际,4=小件物流-同城,5=小件物流-跨城,6=包车) |
| | | */ |
| | | private Integer orderType; |
| | | /** |
| | |
| | | */ |
| | | private String lat; |
| | | /** |
| | | * 方向角 |
| | | */ |
| | | private String directionAngle; |
| | | /** |
| | | * 海拔 |
| | | */ |
| | | private String altitude; |
| | | /** |
| | | * 添加时间 |
| | | */ |
| | | @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") |
| | | private Date insertTime; |
| | | |
| | | |
| | | public Integer getId() { |
| | | return id; |
| | | } |
| | | |
| | | public void setId(Integer id) { |
| | | this.id = id; |
| | | } |
| | | |
| | | public Integer getOrderType() { |
| | | return orderType; |
| | | } |
| | | |
| | | public void setOrderType(Integer orderType) { |
| | | this.orderType = orderType; |
| | | } |
| | | |
| | | public Integer getOrderId() { |
| | | return orderId; |
| | | } |
| | | |
| | | public void setOrderId(Integer orderId) { |
| | | this.orderId = orderId; |
| | | } |
| | | |
| | | public Integer getDriverId() { |
| | | return driverId; |
| | | } |
| | | |
| | | public void setDriverId(Integer driverId) { |
| | | this.driverId = driverId; |
| | | } |
| | | |
| | | public String getLon() { |
| | | return lon; |
| | | } |
| | | |
| | | public void setLon(String lon) { |
| | | this.lon = lon; |
| | | } |
| | | |
| | | public String getLat() { |
| | | return lat; |
| | | } |
| | | |
| | | public void setLat(String lat) { |
| | | this.lat = lat; |
| | | } |
| | | |
| | | public Date getInsertTime() { |
| | | return insertTime; |
| | | } |
| | | |
| | | public void setInsertTime(Date insertTime) { |
| | | this.insertTime = insertTime; |
| | | } |
| | | |
| | | @Override |
| | | protected Serializable pkVal() { |
| | | return this.id; |
| | | } |
| | | |
| | | @Override |
| | | public String toString() { |
| | | return "TOrderPosition{" + |
| | | "id=" + id + |
| | | ", orderType=" + orderType + |
| | | ", orderId=" + orderId + |
| | | ", driverId=" + driverId + |
| | | ", lon=" + lon + |
| | | ", lat=" + lat + |
| | | ", insertTime=" + insertTime + |
| | | "}"; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableId; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.ToString; |
| | | |
| | |
| | | |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | @TableField("id") |
| | | @ApiModelProperty(value = "用户ID") |
| | | private Integer id; |
| | | |
| | | @TableField("userId") |
| | | @ApiModelProperty(value = "用户ID") |
| | | private Integer userId; |
| | | |
| | | @TableField("userType") |
| | | @ApiModelProperty(value = "用户类型 1用户 2司机") |
| | | private Integer userType; |
| | | |
| | | @TableField("bankName") |
| | | @ApiModelProperty(value = "银行名称(选择银行)") |
| | | private String bankName; |
| | | |
| | | @TableField("bankCardCode") |
| | | @ApiModelProperty(value = "银行卡号") |
| | | private String bankCardCode; |
| | | |
| | | @TableField("bankCode") |
| | | @ApiModelProperty(value = "开户银行编码") |
| | | private String bankCode; |
| | | |
| | | @TableField("bankBranchCode") |
| | | @ApiModelProperty(value = "开户银行联行号") |
| | | private String bankBranchCode; |
| | | |
| | | @TableField("openAccountName") |
| | | @ApiModelProperty(value = "开户名称") |
| | | private String openAccountName; |
| | | |
| | | @TableField("phone") |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @TableField("status") |
| | | @ApiModelProperty(value = "状态 1未删除 0已删除") |
| | | private Boolean status; |
| | | |
| | | @TableField("createTime") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private String createTime; |
| | | |
| | | @TableField("verifyStatus") |
| | | @ApiModelProperty(value = "账户验证状态 processing: 验证中 succeeded: 验证成功 failed: 验证失败 needless: 无需验证 blocked: 验证锁定中") |
| | | private String verifyStatus; |
| | | |
| | | @TableField("bankAcctType") |
| | | @ApiModelProperty(value = "1 - 对私银行卡 2 - 对公银行账户") |
| | | private String bankAcctType; |
| | | |
| | | @TableField("settleAcctId") |
| | | @ApiModelProperty(value = "绑定账户编号") |
| | | private String settleAcctId; |
| | | |
| | | @TableField("outRequestNo") |
| | | @ApiModelProperty(value = "平台订单号") |
| | | private String outRequestNo; |
| | | |
| | | @TableField("acctValidationFinishedAt") |
| | | @ApiModelProperty(value = "账户验证的成功或失败时间") |
| | | private String acctValidationFinishedAt; |
| | | |
| | | @TableField("acctValidationFailureMsg") |
| | | @ApiModelProperty(value = "账户验证失败原因") |
| | | private String acctValidationFailureMsg; |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotations.TableLogic; |
| | | import com.baomidou.mybatisplus.annotations.TableName; |
| | | import com.baomidou.mybatisplus.enums.IdType; |
| | | import com.stylefeng.guns.core.support.DateTime; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.ToString; |
| | | |
| | |
| | | private Integer id; |
| | | |
| | | @TableField("userId") |
| | | @ApiModelProperty(value = "用户ID") |
| | | private Integer userId; |
| | | |
| | | @TableField("userType") |
| | | @ApiModelProperty(value = "用户类型 1用户 2司机") |
| | | private Integer userType; |
| | | |
| | | @TableField("certificateName") |
| | | @ApiModelProperty(value = "证件姓名") |
| | | private String certificateName; |
| | | |
| | | @TableField("certificateType") |
| | | @ApiModelProperty(value = "证件类型 1中国大陆居民-身份证、2其他国家或地区居民-护照、3-中国香港居民–来往内地通行证、4中国澳门居民– 来往内地通行证、5中国台湾居民– 来往大陆通行证") |
| | | private Integer certificateType; |
| | | |
| | | @TableField("certificateCode") |
| | | @ApiModelProperty(value = "证件号码") |
| | | private String certificateCode; |
| | | |
| | | @TableField("certificateExpireTime") |
| | | @ApiModelProperty(value = "证件有效期") |
| | | private String certificateExpireTime; |
| | | |
| | | @TableField("licenceIssuingAuthority") |
| | | @ApiModelProperty(value = "发证机关") |
| | | private String licenceIssuingAuthority; |
| | | |
| | | @TableField("bankName") |
| | | @ApiModelProperty(value = "银行名称(选择银行)") |
| | | private String bankName; |
| | | |
| | | @TableField("bankCardCode") |
| | | @ApiModelProperty(value = "银行卡号") |
| | | private String bankCardCode; |
| | | |
| | | @TableField("openAccountName") |
| | | @ApiModelProperty(value = "开户名称") |
| | | private String openAccountName; |
| | | |
| | | @TableField("transactionAuthorizationCode") |
| | | @ApiModelProperty(value = "交易授权码") |
| | | private String transactionAuthorizationCode; |
| | | |
| | | @TableField("phone") |
| | | @ApiModelProperty(value = "手机号") |
| | | private String phone; |
| | | |
| | | @TableField("idCardFrontPicture") |
| | | @ApiModelProperty(value = "法人身份证照片正面") |
| | | private String idCardFrontPicture; |
| | | |
| | | @TableField("idCardReversePicture") |
| | | @ApiModelProperty(value = "法人身份证照片反面") |
| | | private String idCardReversePicture; |
| | | |
| | | /*@TableField("isAudit") |
| | | @ApiModelProperty(value = "是否审核通过 1待审核 2审核通过 3审核失败 暂时不使用") |
| | | private Integer isAudit;*/ |
| | | |
| | | @TableField("applicationStatus") |
| | | @ApiModelProperty(value = "进件状态") |
| | | private String applicationStatus; |
| | | |
| | | @TableField("cusId") |
| | | @ApiModelProperty(value = "个人用户id") |
| | | private String cusId; |
| | | |
| | | @TableField("succeededAt") |
| | | @ApiModelProperty(value = "申请通过时间") |
| | | private Date succeededAt; |
| | | |
| | | @TableField("failureMsgsReason") |
| | | @ApiModelProperty(value = "申请失败原因") |
| | | private String failureMsgsReason; |
| | | |
| | | @TableField("relAcctNo") |
| | | @ApiModelProperty(value = "电子账簿账簿号") |
| | | private String relAcctNo; |
| | | |
| | | @TableField("bindAcctName") |
| | | @ApiModelProperty(value = "银行生成的户名") |
| | | private String bindAcctName; |
| | | |
| | | @TableField("balanceAcctId") |
| | | @ApiModelProperty(value = "电子账簿 ID") |
| | | private String balanceAcctId; |
| | | |
| | | @TableField("settleAcctId") |
| | | @ApiModelProperty(value = "绑定账户 ID") |
| | | private String settleAcctId; |
| | | |
| | | @TableField("outRequestNo") |
| | | @ApiModelProperty(value = "平台订单号") |
| | | private String outRequestNo; |
| | | |
| | | @TableField("cusApplicationId") |
| | | @ApiModelProperty(value = "系统订单号") |
| | | private String cusApplicationId; |
| | | |
| | | @TableField("status") |
| | | @TableLogic |
| | | @ApiModelProperty(value = "法人身份证照片反面") |
| | | private Boolean status; |
| | | |
| | | @TableField("createTime") |
| | | @ApiModelProperty(value = "创建时间") |
| | | private Date createTime; |
| | | |
| | | /* |
| | | @TableField("companyId") |
| | | @ApiModelProperty(value = "分公司ID") |
| | | private Integer companyId; |
| | | |
| | | @TableField("enterpriseType") |
| | | @ApiModelProperty(value = "企业类型 1企业 2个体工商户") |
| | | private Integer enterpriseType; |
| | | |
| | | @TableField("merchantAbbreviation") |
| | | @ApiModelProperty(value = "商户简称") |
| | | private String merchantAbbreviation; |
| | | |
| | | @TableField("businessLicense") |
| | | @ApiModelProperty(value = "营业执照") |
| | | private String businessLicense; |
| | | |
| | | @TableField("businessLicenseCode") |
| | | @ApiModelProperty(value = "营业执照注册号") |
| | | private String businessLicenseCode; |
| | | |
| | | @TableField("businessLicenseCompanyName") |
| | | @ApiModelProperty(value = "营业执照公司名称") |
| | | private String businessLicenseCompanyName; |
| | | |
| | | @TableField("businessLicenseAddress") |
| | | @ApiModelProperty(value = "营业执照注册地址") |
| | | private String businessLicenseAddress; |
| | | |
| | | @TableField("businessExpireTime") |
| | |
| | | package com.stylefeng.guns.modular.system.util; |
| | | |
| | | public class PushURL { |
| | | public static String zull_user_url = "https://zhentonggongsi.com:443"; |
| | | public static String zull_user_url = "https://traffic.qytzt.cn"; |
| | | public static String order_push_url = zull_user_url + "/driver/base/order/pushOrderState"; |
| | | public static String driver_auth_url = zull_user_url + "/driver/base/driver/sendsms"; |
| | | public static String withdraw_auth_url = zull_user_url + "/driver/base/withdrawal/withdrawalAudit"; |
| | |
| | | log.error("【企业增加员工】失败:" + object.toJSONString()); |
| | | throw new RuntimeException("【企业增加员工】失败:" + object.toJSONString()); |
| | | } |
| | | SaveStaffNode saveStaffNode = jsonObject.getObject("object", SaveStaffNode.class); |
| | | SaveStaffNode saveStaffNode = jsonObject.getObject("data", SaveStaffNode.class); |
| | | return saveStaffNode; |
| | | } |
| | | |
| | |
| | | String retCode = jsonObject.getString("retCode"); |
| | | if (!"0".equals(retCode)) { |
| | | log.error("【根据员工ID获取人员信息】请求失败:" + result); |
| | | throw new RuntimeException("【根据员工ID获取人员信息】请求失败:" + result); |
| | | return null; |
| | | } |
| | | JSONObject object = jsonObject.getJSONObject("object"); |
| | | String status = object.getString("status"); |
| | | if (!"0".equals(status)) { |
| | | log.error("【根据员工ID获取人员信息】失败:" + object.toJSONString()); |
| | | throw new RuntimeException("【根据员工ID获取人员信息】失败:" + object.toJSONString()); |
| | | return null; |
| | | } |
| | | StaffNodeInfo staffNodeInfo = object.getObject("data", StaffNodeInfo.class); |
| | | return staffNodeInfo; |
| | |
| | | String retCode = jsonObject.getString("retCode"); |
| | | if (!"0".equals(retCode)) { |
| | | log.error("【根据社会信用代码判断企业是否已存在】请求失败:" + result); |
| | | throw new RuntimeException("【根据社会信用代码判断企业是否已存在】请求失败:" + result); |
| | | return null; |
| | | } |
| | | JSONObject object = jsonObject.getJSONObject("object"); |
| | | String status = object.getString("status"); |
| | | if (!"0".equals(status)) { |
| | | log.error("【根据社会信用代码判断企业是否已存在】失败:" + object.toJSONString()); |
| | | throw new RuntimeException("【根据社会信用代码判断企业是否已存在】失败:" + object.toJSONString()); |
| | | return null; |
| | | } |
| | | return jsonObject.getObject("object", CheckEnterExist.class); |
| | | } |
| | |
| | | String retCode = jsonObject.getString("retCode"); |
| | | if (!"0".equals(retCode)) { |
| | | log.error("【根据企业名称判断企业是否已存在】请求失败:" + result); |
| | | throw new RuntimeException("【根据企业名称判断企业是否已存在】请求失败:" + result); |
| | | return null; |
| | | } |
| | | JSONObject object = jsonObject.getJSONObject("object"); |
| | | String status = object.getString("status"); |
| | | if (!"0".equals(status)) { |
| | | log.error("【根据企业名称判断企业是否已存在】失败:" + object.toJSONString()); |
| | | throw new RuntimeException("【根据企业名称判断企业是否已存在】失败:" + object.toJSONString()); |
| | | return null; |
| | | } |
| | | return jsonObject.getObject("object", CheckEnterExist.class); |
| | | } |
| | |
| | | String retCode = jsonObject.getString("retCode"); |
| | | if (!"0".equals(retCode)) { |
| | | log.error("【查询企业详情】请求失败:" + result); |
| | | throw new RuntimeException("【查询企业详情】请求失败:" + result); |
| | | return null; |
| | | } |
| | | JSONObject object = jsonObject.getJSONObject("object"); |
| | | String status = object.getString("status"); |
| | | if (!"0".equals(status)) { |
| | | log.error("【查询企业详情】失败:" + object.toJSONString()); |
| | | throw new RuntimeException("【查询企业详情】失败:" + object.toJSONString()); |
| | | return null; |
| | | } |
| | | EnterpriseInfo enterpriseInfo = jsonObject.getObject("object", EnterpriseInfo.class); |
| | | return enterpriseInfo; |
| | |
| | | String result = OpenApiClient.sendCommonHttpRequst(url, headers, "GET", skprivateKeyFile, timeStamp, map); |
| | | log.info("【修改企业基本信息】请求结果:" + result); |
| | | JSONObject jsonObject = JSON.parseObject(result); |
| | | String status = jsonObject.getString("status"); |
| | | String status = jsonObject.getString("retCode"); |
| | | if (!"0".equals(status)) { |
| | | log.error("【修改企业基本信息】请求失败:" + result); |
| | | return false; |
| | | throw new RuntimeException("【修改企业基本信息】请求失败:" + result); |
| | | } |
| | | return true; |
| | | } |
| | |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | String content = "";//业务参数 |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | |
| | | String retCode = jsonObject.getString("retCode"); |
| | | if (!"0".equals(retCode)) { |
| | | log.error("【创建企业】请求失败:" + result); |
| | | return null; |
| | | throw new RuntimeException("【创建企业】请求失败:" + result); |
| | | } |
| | | JSONObject object = jsonObject.getJSONObject("object"); |
| | | String status = object.getString("status"); |
| | | if (!"0".equals(status)) { |
| | | log.error("【创建企业】请求失败:" + result); |
| | | return null; |
| | | log.error("【创建企业】请求失败:" + object.toJSONString()); |
| | | throw new RuntimeException("【创建企业】请求失败:" + object.toJSONString()); |
| | | } |
| | | return object.getObject("data", CreateEnterprise.class); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除企业信息 |
| | | * |
| | | * @param enterNum 企业编号 |
| | | * @param operator 管理员手机号码 |
| | | * @return |
| | | */ |
| | | public static boolean delEnterprise(String enterNum, String operator) { |
| | | //请求路径 |
| | | String url = QianYunTongProperties.apiUrl + "/openapi/rest/1.0/delCompany"; |
| | | //私钥文件 |
| | | String skprivateKeyFile = QianYunTongProperties.privateKeyPath; |
| | | //注意:私钥文件需要开发者手动新建.pem文件,将委办局提供的私钥串复制进文件里用于sign加密 |
| | | String appKey = QianYunTongProperties.appkey;//appkey |
| | | Map<String, String> headers = new HashMap<>(); |
| | | headers.put("Content-Type", "application/json"); |
| | | Map<String, Object> map = new HashMap<String, Object>(); |
| | | Date nowdate = new Date(); |
| | | SimpleDateFormat date = new SimpleDateFormat("yyyyMMddHHmmss"); |
| | | |
| | | String timeStamp = date.format(nowdate); |
| | | String messageId = UUID.randomUUID().toString().replaceAll("-", ""); |
| | | map.put(SystemParameterNames.getAppKey(), appKey); |
| | | map.put(SystemParameterNames.getMessage_id(), messageId); |
| | | map.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | map.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | map.put("content", "{\"enterNum\":\"" + enterNum + "\",\"operator\":\"" + operator + "\"}"); |
| | | |
| | | log.info("【删除企业信息】请求地址:" + url); |
| | | log.info("【删除企业信息】请求参数:" + JSON.toJSONString(map)); |
| | | String result = OpenApiClient.sendCommonHttpRequst(url, headers, "POST", skprivateKeyFile, timeStamp, map); |
| | | log.info("【删除企业信息】请求结果:" + result); |
| | | JSONObject jsonObject = JSON.parseObject(result); |
| | | String retCode = jsonObject.getString("retCode"); |
| | | if (!"0".equals(retCode)) { |
| | | log.error("【删除企业信息】请求失败:" + result); |
| | | throw new RuntimeException("【删除企业信息】请求失败:" + result); |
| | | } |
| | | JSONObject object = jsonObject.getJSONObject("object"); |
| | | String status = object.getString("status"); |
| | | if (!"0".equals(status)) { |
| | | log.error("【删除企业信息】请求失败:" + object.toJSONString()); |
| | | throw new RuntimeException("【删除企业信息】请求失败:" + object.toJSONString()); |
| | | } |
| | | return true; |
| | | } |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.qianyuntong; |
| | | |
| | | import com.heredata.hos.HOS; |
| | | import com.heredata.hos.HOSClientBuilder; |
| | | import com.heredata.hos.model.CreateBucketRequest; |
| | | import com.heredata.hos.model.HOSObject; |
| | | import com.heredata.hos.model.PutObjectRequest; |
| | | import com.heredata.hos.model.PutObjectResult; |
| | | import com.heredata.hos.model.bucket.Bucket; |
| | | import com.heredata.model.VoidResult; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | | import java.io.InputStream; |
| | | |
| | | /** |
| | | * OSS 工具类 |
| | | * @author zhibing.pu |
| | | * @Date 2025/6/23 17:50 |
| | | */ |
| | | @Slf4j |
| | | public class NCOSSUtil { |
| | | |
| | | /** |
| | | * 创建桶 |
| | | * @param bucketName |
| | | * @return |
| | | */ |
| | | public static Boolean createBucket(String bucketName) { |
| | | /** |
| | | * endPoint:HOS的基础路径(公共前缀) |
| | | * account:账户的ID |
| | | * accessKey:向UAAS服务请求到的access_key |
| | | * secretKey:向UAAS服务请求到的secret_key |
| | | */ |
| | | HOS hos = new HOSClientBuilder().build(QianYunTongProperties.endPoint, QianYunTongProperties.account, QianYunTongProperties.accessKey, QianYunTongProperties.secretKey); |
| | | try { |
| | | // 创建请求对象,并且设置创建桶名为"example"的桶 |
| | | CreateBucketRequest createBucketRequest = new CreateBucketRequest(bucketName); |
| | | VoidResult result = hos.createBucket(createBucketRequest); |
| | | if (result.getResponse().isSuccessful()) { |
| | | log.info("创建桶成功:" + bucketName); |
| | | return true; |
| | | } |
| | | } catch (Exception e){ |
| | | log.info("创建桶失败:" + bucketName); |
| | | e.printStackTrace(); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询桶详情 |
| | | * @param bucketName |
| | | * @return |
| | | */ |
| | | public static Bucket getBucketInfo(String bucketName) { |
| | | /** |
| | | * endPoint:HOS的基础路径(公共前缀) |
| | | * account:账户的ID |
| | | * accessKey:向UAAS服务请求到的access_key |
| | | * secretKey:向UAAS服务请求到的secret_key |
| | | */ |
| | | HOS hos = new HOSClientBuilder().build(QianYunTongProperties.endPoint, QianYunTongProperties.account, QianYunTongProperties.accessKey, QianYunTongProperties.secretKey); |
| | | try { |
| | | // 查询桶名为"example"的详情 |
| | | Bucket bucket = hos.getBucketInfo(bucketName); |
| | | return bucket; |
| | | } catch (Exception e){ |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除桶 |
| | | * @param bucketName |
| | | * @return |
| | | */ |
| | | public static Boolean deleteBucket(String bucketName) { |
| | | /** |
| | | * endPoint:HOS的基础路径(公共前缀) |
| | | * account:账户的ID |
| | | * accessKey:向UAAS服务请求到的access_key |
| | | * secretKey:向UAAS服务请求到的secret_key |
| | | */ |
| | | HOS hos = new HOSClientBuilder().build(QianYunTongProperties.endPoint, QianYunTongProperties.account, QianYunTongProperties.accessKey, QianYunTongProperties.secretKey); |
| | | try { |
| | | VoidResult result = hos.deleteBucket(bucketName); |
| | | if (result.getResponse().isSuccessful()) { |
| | | log.info("删除桶成功:" + bucketName); |
| | | return true; |
| | | } |
| | | } catch (Exception e){ |
| | | log.info("删除桶成功:" + bucketName); |
| | | e.printStackTrace(); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 设置桶策略 |
| | | * @param bucketName 桶名 |
| | | * @param policyText 策略规则字符串 |
| | | * { |
| | | * // 策略配置的版本号,由用户定义 |
| | | * "Version": "2012-10-17", |
| | | * // 策略规则配置,可指定多条策略规则 |
| | | * "Statement": [{ |
| | | * // 策略规则ID,可用户指定,如不指定则服务自动生成一条 |
| | | * "Sid": "sid", |
| | | * // 策略规则指定的HOS API接口标识,可参照下表填写 |
| | | * "Action": [ |
| | | * "action" |
| | | * ], |
| | | * // 策略规则效果,具体表现为允许或拒绝,有效值为Allow(允许),Deny(拒绝); |
| | | * "Effect": "Allow", |
| | | * // 策略规则指定的资源参照下面resource配置 |
| | | * "Resource": "resource", |
| | | * // 策略规则指定的授权人 参照下面Principal配置 |
| | | * "Principal": { |
| | | * "HWS": [ |
| | | * "account_id:root" |
| | | * ] |
| | | * } |
| | | * } |
| | | * ] |
| | | * } |
| | | * @return |
| | | */ |
| | | public static Boolean setBucketPolicy(String bucketName, String policyText) { |
| | | /** |
| | | * endPoint:HOS的基础路径(公共前缀) |
| | | * account:账户的ID |
| | | * accessKey:向UAAS服务请求到的access_key |
| | | * secretKey:向UAAS服务请求到的secret_key |
| | | */ |
| | | HOS hos = new HOSClientBuilder().build(QianYunTongProperties.endPoint, QianYunTongProperties.account, QianYunTongProperties.accessKey, QianYunTongProperties.secretKey); |
| | | // 桶策略字符串 |
| | | try { |
| | | VoidResult result = hos.setBucketPolicy(bucketName, policyText); |
| | | if (result.getResponse().isSuccessful()) { |
| | | log.info("设置桶策略成功:" + bucketName); |
| | | return true; |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("设置桶策略失败:" + bucketName); |
| | | e.printStackTrace(); |
| | | } |
| | | return false; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 上传对象 |
| | | * @param bucketName 桶名称 |
| | | * @param key 存储文件名 |
| | | * @param inputStream 上传文件流 |
| | | * @return 对象唯一标识 |
| | | */ |
| | | public static String putObject(String bucketName, String key, InputStream inputStream) { |
| | | /** |
| | | * endPoint:HOS的基础路径(公共前缀) |
| | | * account:账户的ID |
| | | * accessKey:向UAAS服务请求到的access_key |
| | | * secretKey:向UAAS服务请求到的secret_key |
| | | */ |
| | | HOS hos = new HOSClientBuilder().build(QianYunTongProperties.endPoint, QianYunTongProperties.account, QianYunTongProperties.accessKey, QianYunTongProperties.secretKey); |
| | | try { |
| | | PutObjectRequest putObjectRequest = new PutObjectRequest(bucketName, key , inputStream); |
| | | PutObjectResult example = hos.putObject(putObjectRequest); |
| | | if (example.getResponse().isSuccessful()) { |
| | | log.info("上传对象成功:" + bucketName + "--->" + key); |
| | | return example.getETag(); |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("上传对象成功:" + bucketName); |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 查询对象 |
| | | * @param bucketName 桶名称 |
| | | * @param key 存储文件名 |
| | | * @return |
| | | */ |
| | | public static HOSObject getObject(String bucketName, String key) { |
| | | /** |
| | | * endPoint:HOS的基础路径(公共前缀) |
| | | * account:账户的ID |
| | | * accessKey:向UAAS服务请求到的access_key |
| | | * secretKey:向UAAS服务请求到的secret_key |
| | | */ |
| | | HOS hos = new HOSClientBuilder().build(QianYunTongProperties.endPoint, QianYunTongProperties.account, QianYunTongProperties.accessKey, QianYunTongProperties.secretKey); |
| | | try { |
| | | HOSObject example = hos.getObject(bucketName, key); |
| | | if (example.getResponse().isSuccessful()) { |
| | | log.info("查询对象成功:" + bucketName + "--->" + key); |
| | | return example; |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("查询对象失败:" + bucketName); |
| | | e.printStackTrace(); |
| | | } |
| | | return null; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 删除对象 |
| | | * @param bucketName 桶名称 |
| | | * @param key 存储文件名 |
| | | * @return |
| | | */ |
| | | public static Boolean deleteObject(String bucketName, String key) { |
| | | /** |
| | | * endPoint:HOS的基础路径(公共前缀) |
| | | * account:账户的ID |
| | | * accessKey:向UAAS服务请求到的access_key |
| | | * secretKey:向UAAS服务请求到的secret_key |
| | | */ |
| | | HOS hos = new HOSClientBuilder().build(QianYunTongProperties.endPoint, QianYunTongProperties.account, QianYunTongProperties.accessKey, QianYunTongProperties.secretKey); |
| | | try { |
| | | VoidResult example = hos.deleteObject(bucketName, key); |
| | | if (example.getResponse().isSuccessful()) { |
| | | log.info("删除对象成功:" + bucketName + "--->" + key); |
| | | return true; |
| | | } |
| | | } catch (Exception e) { |
| | | log.info("删除对象失败:" + bucketName + "--->" + key); |
| | | e.printStackTrace(); |
| | | } |
| | | return false; |
| | | } |
| | | } |
| | |
| | | |
| | | /** |
| | | * 黔云通配置 |
| | | * |
| | | * @author zhibing.pu |
| | | * @Date 2025/6/6 15:03 |
| | | */ |
| | | public interface QianYunTongProperties { |
| | | /** |
| | | * 小程序appId |
| | | */ |
| | | String appId = "wxcc3c9058e2b294db"; |
| | | /** |
| | | * appkey |
| | | */ |
| | |
| | | /** |
| | | * 私钥地址 |
| | | */ |
| | | String privateKeyPath = "E:\\IDEA Workspaces\\QianYunTong\\private_key_test.pem"; |
| | | String privateKeyPath = "/root/server/app/key/private_key_test.pem"; |
| | | /** |
| | | * 消费者账号 |
| | | */ |
| | |
| | | * API地址 |
| | | */ |
| | | String apiUrl = "https://test-zhongtai.stqcloud.com:10070"; |
| | | /** |
| | | * 桶名 |
| | | */ |
| | | String bucketName = "bucuTest0625"; |
| | | /** |
| | | * HOS的基础路径(公共前缀) |
| | | */ |
| | | String endPoint = "http://119.4.112.68:27741/v1"; |
| | | /** |
| | | * 账户的ID |
| | | */ |
| | | String account = "d8bef0a04db511f0b79d01a3e2b7587e"; |
| | | /** |
| | | * 向UAAS服务请求到的access_key |
| | | */ |
| | | String accessKey = "TYMFTFD5SIIT15DCCUD7"; |
| | | /** |
| | | * 向UAAS服务请求到的secret_key |
| | | */ |
| | | String secretKey = "AoI1dkH3yoAvXoaQlREO3ed9mwQJFluLTliS9T1z"; |
| | | } |
| | |
| | | package com.stylefeng.guns.modular.system.util.qianyuntong; |
| | | |
| | | import cn.hutool.http.HttpRequest; |
| | | import cn.hutool.http.HttpResponse; |
| | | import cn.hutool.http.HttpUtil; |
| | | import com.alibaba.fastjson.JSON; |
| | | import com.alibaba.fastjson.JSONArray; |
| | | import com.alibaba.fastjson.JSONObject; |
| | | import com.google.gson.Gson; |
| | | import com.open.common.util.OpenApiClient; |
| | | import com.open.common.util.SystemParameterNames; |
| | | import com.stylefeng.guns.modular.system.util.UUIDUtil; |
| | | import com.stylefeng.guns.modular.system.util.qianyuntong.model.*; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | |
| | |
| | | contentMap.put(SystemParameterNames.getMessage_id(), messageId); |
| | | contentMap.put(SystemParameterNames.getUserName(), QianYunTongProperties.userName); |
| | | contentMap.put(SystemParameterNames.getStatus(), QianYunTongProperties.status); |
| | | contentMap.put("content", "{\"mobile\":\"" + mobile + "\",\"enterNum\":\"" + enterNum + "\"}"); |
| | | log.info("【根据手机号和企业编号查询用户信息】请求地址:" + url); |
| | | log.info("【根据手机号和企业编号查询用户信息】请求参数:" + JSON.toJSONString(contentMap)); |
| | | Map<String, String> map = new HashMap<>(); |
| | | map.put("mobile", mobile); |
| | | if (null != enterNum) { |
| | | map.put("enterNum", enterNum); |
| | | } |
| | | contentMap.put("content", JSON.toJSONString(map)); |
| | | log.info("【根据手机号码获取人员信息】请求地址:" + url); |
| | | log.info("【根据手机号码获取人员信息】请求参数:" + JSON.toJSONString(contentMap)); |
| | | String result = OpenApiClient.sendCommonHttpRequst(url, headers, "GET", skprivateKeyFile, timeStamp, contentMap); |
| | | log.info("【根据手机号和企业编号查询用户信息】请求结果:" + result); |
| | | log.info("【根据手机号码获取人员信息】请求结果:" + result); |
| | | JSONObject jsonObject = JSON.parseObject(result); |
| | | String retCode = jsonObject.getString("retCode"); |
| | | if (!"0".equals(retCode)) { |
| | | log.error("【根据手机号和企业编号查询用户信息】请求失败:" + result); |
| | | throw new RuntimeException("【根据手机号和企业编号查询用户信息】请求失败:" + result); |
| | | log.error("【根据手机号码获取人员信息】请求失败:" + result); |
| | | return null; |
| | | } |
| | | JSONObject object = jsonObject.getJSONObject("object"); |
| | | String status = object.getString("status"); |
| | | if (!"0".equals(status)) { |
| | | log.error("【根据手机号和企业编号查询用户信息】失败:" + object.toJSONString()); |
| | | throw new RuntimeException("【根据手机号和企业编号查询用户信息】失败:" + object.toJSONString()); |
| | | log.error("【根据手机号码获取人员信息】失败:" + object.toJSONString()); |
| | | return null; |
| | | } |
| | | JSONArray data = object.getJSONArray("data"); |
| | | List<QYTUserInfo> list = new ArrayList<>(); |
| | |
| | | } |
| | | return true; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 微信小程序登录 |
| | | * |
| | | * @param code |
| | | * @return |
| | | */ |
| | | public static LoginWeChatXiao loginWeChatXiao(String code) { |
| | | HttpRequest post = HttpUtil.createPost("https://casme.teamshub.com/webapp-backstage/ajax/loginWeChatXiao/v1.0"); |
| | | post.header("Content-Type", "text/plain;charset=UTF-8"); |
| | | post.header("Accept-encodeing", "UTF-8"); |
| | | JSONObject body = new JSONObject(); |
| | | body.put("version", "1.0"); |
| | | try { |
| | | body.put("id", UUIDUtil.getRandomCode(6)); |
| | | } catch (Exception e) { |
| | | throw new RuntimeException(e); |
| | | } |
| | | body.put("type", "loginWeChatXiao"); |
| | | body.put("action", "request"); |
| | | body.put("code", code); |
| | | body.put("appId", QianYunTongProperties.appId); |
| | | post.body(body.toJSONString()); |
| | | HttpResponse execute = post.execute(); |
| | | if (200 != execute.getStatus()) { |
| | | log.error("微信登录失败"); |
| | | return null; |
| | | } |
| | | JSONObject jsonObject = JSON.parseObject(execute.body()); |
| | | Integer status = jsonObject.getInteger("status"); |
| | | if (0 != status) { |
| | | log.error("微信登录失败:" + jsonObject.getString("desc")); |
| | | return null; |
| | | } |
| | | LoginWeChatXiao loginWeChatXiao = jsonObject.getObject("data", LoginWeChatXiao.class); |
| | | return loginWeChatXiao; |
| | | } |
| | | |
| | | } |
New file |
| | |
| | | package com.stylefeng.guns.modular.system.util.qianyuntong.model; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zhibing.pu |
| | | * @Date 2025/6/16 23:50 |
| | | */ |
| | | @Data |
| | | public class LoginWeChatXiao { |
| | | /** |
| | | * token |
| | | */ |
| | | private String token; |
| | | /** |
| | | * 用户UUID |
| | | */ |
| | | private String userUUID; |
| | | /** |
| | | * 用户手机号 |
| | | */ |
| | | private String mobile; |
| | | /** |
| | | * 企业名称,无企业时为空 |
| | | */ |
| | | private String enterName; |
| | | /** |
| | | * 企业编码 |
| | | */ |
| | | private String enterCode; |
| | | /** |
| | | * 企业认证状态 |
| | | */ |
| | | private String enterAuth; |
| | | /** |
| | | * 是否是管理员,是:1;否:0 |
| | | */ |
| | | private String isAdmin; |
| | | } |
| | |
| | | /** |
| | | * 人员ID |
| | | */ |
| | | private Long empId; |
| | | private Integer empId; |
| | | /** |
| | | * 主要号码 |
| | | */ |
| | |
| | | spring: |
| | | profiles: |
| | | active: dev |
| | | # active: produce |
| | | # active: prod |
| | | mvc: |
| | | static-path-pattern: /static/** |
| | | view: |
| | |
| | | max-request-size: 500MB |
| | | max-file-size: 500MB |
| | | redis: |
| | | password: 123456 |
| | | host: 127.0.0.1 |
| | | port: 6379 |
| | | host: 172.21.35.151 |
| | | port: 6512 |
| | | password: SC_cache@20#25 |
| | | database: 0 |
| | | timeout: 1000 |
| | | cluster: |
| | | nodes: 172.21.35.151:6512,172.21.35.152:6512,172.21.35.153:6512,172.21.35.151:6513,172.21.35.152:6513,172.21.35.153:6513 |
| | | |
| | | mybatis-plus: |
| | | type-aliases-package: com.stylefeng.guns.modular.system.model |
| | |
| | | --- |
| | | spring: |
| | | datasource: |
| | | url: jdbc:mysql://127.0.0.1:3306/qyttravel?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: root |
| | | password: 123456 |
| | | db-name: guns #用来搜集数据库的所有表 |
| | | url: jdbc:mysql://172.21.35.140:8066/traffic_scdb?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&useSSL=false&serverTimezone=Asia/Shanghai |
| | | username: traffic_scusr |
| | | password: QYT_sc@20#25 |
| | | db-name: traffic_scdb #用来搜集数据库的所有表 |
| | | filters: wall,mergeStat |
| | | |
| | | |
| | | --- |
| | | spring: |
| | | data: |
| | | mongodb: |
| | | uri: mongodb://qyt_jtcx:qyt_jtcx2025@172.21.35.195:27017,172.21.35.196:27017/traveling_track |
| | | |
| | | |
| | | --- |
| | | wx: |
| | | grantType: authorization_code #填authorization_code |
| | | appid: 1111 #应用唯一标识,在微信开放平台提交应用审核通过后获得 |
| | |
| | | |
| | | #支付回调地址 |
| | | #正式环境 |
| | | callbackPath: https://0ifzoxq2516g.guyubao.com |
| | | |
| | | |
| | | filePath: C:/orderPostionFile/ #存储订单轨迹文件路径 |
| | | |
| | | callbackPath: https://traffic.qytzt.cn |
| | | |
| | | #交通部推送数据功能开关 |
| | | pushMinistryOfTransport: false |
New file |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!-- 日志级别从低到高分为TRACE < DEBUG < INFO < WARN < ERROR < FATAL,比如: 如果设置为WARN,则低于WARN的信息都不会输出 --> |
| | | <!-- scan:当此属性设置为true时,配置文档如果发生改变,将会被重新加载,默认值为true --> |
| | | <!-- scanPeriod:设置监测配置文档是否有修改的时间间隔,如果没有给出时间单位,默认单位是毫秒。当scan为true时,此属性生效。默认的时间间隔为1分钟。 --> |
| | | <!-- debug:当此属性设置为true时,将打印出logback内部日志信息,实时查看logback运行状态。默认值为false。 --> |
| | | <configuration scan="true" scanPeriod="10 seconds"> |
| | | <contextName>logback</contextName> |
| | | |
| | | <!-- name的值是变量的名称,value的值时变量定义的值。通过定义的值会被插入到logger上下文中。定义后,可以使“${}”来使用变量。 --> |
| | | <property name="log.path" value="/data/app/logs/management"/> |
| | | |
| | | <!--0. 日志格式和颜色渲染 --> |
| | | <!-- 彩色日志依赖的渲染类 --> |
| | | <conversionRule conversionWord="clr" converterClass="org.springframework.boot.logging.logback.ColorConverter" /> |
| | | <conversionRule conversionWord="wex" converterClass="org.springframework.boot.logging.logback.WhitespaceThrowableProxyConverter" /> |
| | | <conversionRule conversionWord="wEx" converterClass="org.springframework.boot.logging.logback.ExtendedWhitespaceThrowableProxyConverter" /> |
| | | <!-- 彩色日志格式 --> |
| | | <property name="CONSOLE_LOG_PATTERN" value="${CONSOLE_LOG_PATTERN:-%clr(%d{yyyy-MM-dd HH:mm:ss.SSS}){faint} %clr(${LOG_LEVEL_PATTERN:-%5p}) %clr(${PID:- }){magenta} %clr(---){faint} %clr([%15.15t]){faint} %clr(%-40.40logger{39}){cyan} %clr(:){faint} %m%n${LOG_EXCEPTION_CONVERSION_WORD:-%wEx}}"/> |
| | | |
| | | <!--1. 输出到控制台--> |
| | | <appender name="CONSOLE" class="ch.qos.logback.core.ConsoleAppender"> |
| | | <!--此日志appender是为开发使用,只配置最底级别,控制台输出的日志级别是大于或等于此级别的日志信息--> |
| | | <filter class="ch.qos.logback.classic.filter.ThresholdFilter"> |
| | | <level>debug</level> |
| | | </filter> |
| | | <encoder> |
| | | <Pattern>${CONSOLE_LOG_PATTERN}</Pattern> |
| | | <!-- 设置字符集 --> |
| | | <charset>UTF-8</charset> |
| | | </encoder> |
| | | </appender> |
| | | |
| | | <!--2. 输出到文档--> |
| | | <!-- 2.1 level为 DEBUG 日志,时间滚动输出 --> |
| | | <appender name="DEBUG_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <!-- 正在记录的日志文档的路径及文档名 --> |
| | | <file>${log.path}/debug.log</file> |
| | | <!--日志文档输出格式--> |
| | | <encoder> |
| | | <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
| | | <charset>UTF-8</charset> <!-- 设置字符集 --> |
| | | </encoder> |
| | | <!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <!-- 日志归档 --> |
| | | <fileNamePattern>${log.path}/%d{yyyy-MM-dd}/debug-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
| | | <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
| | | <maxFileSize>100MB</maxFileSize> |
| | | </timeBasedFileNamingAndTriggeringPolicy> |
| | | <!--日志文档保留天数--> |
| | | <maxHistory>15</maxHistory> |
| | | </rollingPolicy> |
| | | <!-- 此日志文档只记录debug级别的 --> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>debug</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | <!-- 2.2 level为 INFO 日志,时间滚动输出 --> |
| | | <appender name="INFO_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <!-- 正在记录的日志文档的路径及文档名 --> |
| | | <file>${log.path}/info.log</file> |
| | | <!--日志文档输出格式--> |
| | | <encoder> |
| | | <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
| | | <charset>UTF-8</charset> |
| | | </encoder> |
| | | <!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <!-- 每天日志归档路径以及格式 --> |
| | | <fileNamePattern>${log.path}/%d{yyyy-MM-dd}/info-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
| | | <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
| | | <maxFileSize>100MB</maxFileSize> |
| | | </timeBasedFileNamingAndTriggeringPolicy> |
| | | <!--日志文档保留天数--> |
| | | <maxHistory>15</maxHistory> |
| | | </rollingPolicy> |
| | | <!-- 此日志文档只记录info级别的 --> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>info</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | <!-- 2.3 level为 WARN 日志,时间滚动输出 --> |
| | | <appender name="WARN_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <!-- 正在记录的日志文档的路径及文档名 --> |
| | | <file>${log.path}/warn.log</file> |
| | | <!--日志文档输出格式--> |
| | | <encoder> |
| | | <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
| | | <charset>UTF-8</charset> <!-- 此处设置字符集 --> |
| | | </encoder> |
| | | <!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.path}/%d{yyyy-MM-dd}/warn-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
| | | <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
| | | <maxFileSize>100MB</maxFileSize> |
| | | </timeBasedFileNamingAndTriggeringPolicy> |
| | | <!--日志文档保留天数--> |
| | | <maxHistory>15</maxHistory> |
| | | </rollingPolicy> |
| | | <!-- 此日志文档只记录warn级别的 --> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>warn</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | <!-- 2.4 level为 ERROR 日志,时间滚动输出 --> |
| | | <appender name="ERROR_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <!-- 正在记录的日志文档的路径及文档名 --> |
| | | <file>${log.path}/error.log</file> |
| | | <!--日志文档输出格式--> |
| | | <encoder> |
| | | <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
| | | <charset>UTF-8</charset> <!-- 此处设置字符集 --> |
| | | </encoder> |
| | | <!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.path}/%d{yyyy-MM-dd}/error-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
| | | <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
| | | <maxFileSize>100MB</maxFileSize> |
| | | </timeBasedFileNamingAndTriggeringPolicy> |
| | | <!--日志文档保留天数--> |
| | | <maxHistory>15</maxHistory> |
| | | </rollingPolicy> |
| | | <!-- 此日志文档只记录ERROR级别的 --> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>ERROR</level> |
| | | <onMatch>ACCEPT</onMatch> |
| | | <onMismatch>DENY</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | <!-- 2.5 所有 除了DEBUG级别的其它高于DEBUG的 日志,记录到一个文件 --> |
| | | <appender name="ALL_FILE" class="ch.qos.logback.core.rolling.RollingFileAppender"> |
| | | <!-- 正在记录的日志文档的路径及文档名 --> |
| | | <file>${log.path}/all.log</file> |
| | | <!--日志文档输出格式--> |
| | | <encoder> |
| | | <pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{50} - %msg%n</pattern> |
| | | <charset>UTF-8</charset> <!-- 此处设置字符集 --> |
| | | </encoder> |
| | | <!-- 日志记录器的滚动策略,按日期,按大小记录 --> |
| | | <rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy"> |
| | | <fileNamePattern>${log.path}/%d{yyyy-MM-dd}/all-%d{yyyy-MM-dd}.%i.log</fileNamePattern> |
| | | <timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP"> |
| | | <maxFileSize>100MB</maxFileSize> |
| | | </timeBasedFileNamingAndTriggeringPolicy> |
| | | <!--日志文档保留天数--> |
| | | <maxHistory>15</maxHistory> |
| | | </rollingPolicy> |
| | | <!-- 此日志文档记录除了DEBUG级别的其它高于DEBUG的 --> |
| | | <filter class="ch.qos.logback.classic.filter.LevelFilter"> |
| | | <level>DEBUG</level> |
| | | <onMatch>DENY</onMatch> |
| | | <onMismatch>ACCEPT</onMismatch> |
| | | </filter> |
| | | </appender> |
| | | |
| | | <!-- |
| | | <logger>用来设置某一个包或者具体的某一个类的日志打印级别、 |
| | | 以及指定<appender>。<logger>仅有一个name属性, |
| | | 一个可选的level和一个可选的addtivity属性。 |
| | | name:用来指定受此logger约束的某一个包或者具体的某一个类。 |
| | | level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF, |
| | | 还有一个特殊值INHERITED或者同义词NULL,代表强制执行上级的级别。 |
| | | 如果未设置此属性,那么当前logger将会继承上级的级别。 |
| | | addtivity:是否向上级logger传递打印信息。默认是true。 |
| | | <logger name="org.springframework.web" level="info"/> |
| | | <logger name="org.springframework.scheduling.annotation.ScheduledAnnotationBeanPostProcessor" level="INFO"/> |
| | | --> |
| | | |
| | | <!-- |
| | | root节点是必选节点,用来指定最基础的日志输出级别,只有一个level属性 |
| | | level:用来设置打印级别,大小写无关:TRACE, DEBUG, INFO, WARN, ERROR, ALL 和 OFF, |
| | | 不能设置为INHERITED或者同义词NULL。默认是DEBUG |
| | | 可以包含零个或多个元素,标识这个appender将会添加到这个logger。 |
| | | --> |
| | | |
| | | <!-- 4 最终的策略: |
| | | 基本策略(root级) + 根据profile在启动时, logger标签中定制化package日志级别(优先级高于上面的root级)--> |
| | | <springProfile name="dev"> |
| | | <root level="info"> |
| | | <appender-ref ref="CONSOLE" /> |
| | | <appender-ref ref="DEBUG_FILE" /> |
| | | <appender-ref ref="INFO_FILE" /> |
| | | <appender-ref ref="WARN_FILE" /> |
| | | <appender-ref ref="ERROR_FILE" /> |
| | | <appender-ref ref="ALL_FILE" /> |
| | | </root> |
| | | <logger name="com.stylefeng.guns.modular.system.dao" level="debug"/> |
| | | </springProfile> |
| | | |
| | | <springProfile name="test"> |
| | | <root level="info"> |
| | | <appender-ref ref="CONSOLE" /> |
| | | <appender-ref ref="DEBUG_FILE" /> |
| | | <appender-ref ref="INFO_FILE" /> |
| | | <appender-ref ref="WARN_FILE" /> |
| | | <appender-ref ref="ERROR_FILE" /> |
| | | <appender-ref ref="ALL_FILE" /> |
| | | </root> |
| | | </springProfile> |
| | | |
| | | <springProfile name="prod"> |
| | | <root level="info"> |
| | | <!-- 生产环境最好不配置console写文件 --> |
| | | <appender-ref ref="DEBUG_FILE" /> |
| | | <appender-ref ref="INFO_FILE" /> |
| | | <appender-ref ref="WARN_FILE" /> |
| | | <appender-ref ref="ERROR_FILE" /> |
| | | <appender-ref ref="ALL_FILE" /> |
| | | </root> |
| | | </springProfile> |
| | | |
| | | </configuration> |
| | |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | <!-- <div class="form-group" style="display: none;" id="zcModelDiv">--> |
| | | <!-- <label class="col-sm-3 control-label">快车车型:</label>--> |
| | | <!-- <div class="col-sm-9">--> |
| | | <!-- <select class="form-control" id="zcModel" name="zcModel">--> |
| | | <!-- <option value="">选择车型</option>--> |
| | | <!-- @for(obj in zcModelList){--> |
| | | <!-- <option value="${obj.id}">${obj.name}</option>--> |
| | | <!-- @}--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="form-group" style="display: none;" id="kcModelDiv">--> |
| | | <!-- <label class="col-sm-3 control-label">跨城出行车型:</label>--> |
| | | <!-- <div class="col-sm-9">--> |
| | | <!-- <select class="form-control" id="kcModel" name="kcModel">--> |
| | | <!-- <option value="">选择车型</option>--> |
| | | <!-- @for(obj in kcModelList){--> |
| | | <!-- <option value="${obj.id}">${obj.name}</option>--> |
| | | <!-- @}--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | |
| | | <!-- |
| | | <div class="form-group" style="display: none;" id="zcModelDiv"> |
| | | <label class="col-sm-3 control-label">快车车型:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="zcModel" name="zcModel"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in zcModelList){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" style="display: none;" id="kcModelDiv"> |
| | | <label class="col-sm-3 control-label">跨城出行车型:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="kcModel" name="kcModel"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in kcModelList){ |
| | | <option value="${obj.id}">${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <#select id="carBrandId" name="车辆品牌:" onchange="TCarInfoDlg.brandChange(this)"> |
| | | <option value="">选择车辆品牌</option> |
| | | @for(obj in brandList){ |
| | |
| | | </div> |
| | | </fieldset> |
| | | </div> |
| | | <!-- <div class="form-group" id="zcModelDiv">--> |
| | | <!-- <label class="col-sm-3 control-label">快车车型:</label>--> |
| | | <!-- <div class="col-sm-9">--> |
| | | <!-- <select class="form-control" id="zcModel" name="zcModel">--> |
| | | <!-- <option value="">选择车型</option>--> |
| | | <!-- @for(obj in zcModelList){--> |
| | | <!-- <option value="${obj.id}" ${obj.id == zcModel ? 'selected=selected' : ''}>${obj.name}</option>--> |
| | | <!-- @}--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- <div class="form-group" id="kcModelDiv">--> |
| | | <!-- <label class="col-sm-3 control-label">跨城出行车型:</label>--> |
| | | <!-- <div class="col-sm-9">--> |
| | | <!-- <select class="form-control" id="kcModel" name="kcModel">--> |
| | | <!-- <option value="">选择车型</option>--> |
| | | <!-- @for(obj in kcModelList){--> |
| | | <!-- <option value="${obj.id}" ${obj.id == kcModel ? 'selected=selected' : ''}>${obj.name}</option>--> |
| | | <!-- @}--> |
| | | <!-- </select>--> |
| | | <!-- </div>--> |
| | | <!-- </div>--> |
| | | <!-- |
| | | <div class="form-group" id="zcModelDiv"> |
| | | <label class="col-sm-3 control-label">快车车型:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="zcModel" name="zcModel"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in zcModelList){ |
| | | <option value="${obj.id}" ${obj.id == zcModel ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | <div class="form-group" id="kcModelDiv"> |
| | | <label class="col-sm-3 control-label">跨城出行车型:</label> |
| | | <div class="col-sm-9"> |
| | | <select class="form-control" id="kcModel" name="kcModel"> |
| | | <option value="">选择车型</option> |
| | | @for(obj in kcModelList){ |
| | | <option value="${obj.id}" ${obj.id == kcModel ? 'selected=selected' : ''}>${obj.name}</option> |
| | | @} |
| | | </select> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <#select id="carBrandId" name="车辆品牌:" onchange="TCarInfoDlg.brandChange(this)"> |
| | | <option value="">选择车辆品牌</option> |
| | | @for(obj in brandList){ |
| | |
| | | </div> |
| | | <div style="float: left;width: 1200px;margin-left: 50px;"> |
| | | <div class="pushOrderSettings"> |
| | | <!--<div class="form-group">--> |
| | | <!--<label class="col-sm-2 control-label">快车推单:</label>--> |
| | | <!--<div class="col-sm-10">--> |
| | | <!--第一轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)"--> |
| | | <!--@if(isNotEmpty(zcOne)){--> |
| | | <!--value="${zcOne.pushDistance}"--> |
| | | <!--@}else{--> |
| | | <!--value=""--> |
| | | <!--@}--> |
| | | <!--name="zc1" id="zc1" class="form-control newWidth" /> 公里,--> |
| | | <!--推单时间为 <input type="text" oninput="checkIsInt(this)"--> |
| | | <!--@if(isNotEmpty(zcOne)){--> |
| | | <!--value="${zcOne.pushTime}"--> |
| | | <!--@}else{--> |
| | | <!--value=""--> |
| | | <!--@}--> |
| | | <!--name="zc2" id="zc2" class="form-control newWidth" /> 秒钟;--> |
| | | <!--每次推所有司机的 <input type="text" oninput="checkIsDouble(this)"--> |
| | | <!--@if(isNotEmpty(zcOne)){--> |
| | | <!--value="${zcOne.driverProportion}"--> |
| | | <!--@}else{--> |
| | | <!--value=""--> |
| | | <!--@}--> |
| | | <!--name="zc3" id="zc3" class="form-control newWidth" /> %--> |
| | | <!--<br/>--> |
| | | <!--<br/>--> |
| | | <!--第二轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)"--> |
| | | <!--@if(isNotEmpty(zcTwo)){--> |
| | | <!--value="${zcTwo.pushDistance}"--> |
| | | <!--@}else{--> |
| | | <!--value=""--> |
| | | <!--@}--> |
| | | <!--name="zc4" id="zc4" class="form-control newWidth" /> 公里,--> |
| | | <!--推单时间为 <input type="text" oninput="checkIsInt(this)"--> |
| | | <!--@if(isNotEmpty(zcTwo)){--> |
| | | <!--value="${zcTwo.pushTime}"--> |
| | | <!--@}else{--> |
| | | <!--value=""--> |
| | | <!--@}--> |
| | | <!--name="zc5" id="zc5" class="form-control newWidth" /> 秒钟;--> |
| | | <!--每次推所有司机的 <input type="text" oninput="checkIsDouble(this)"--> |
| | | <!--@if(isNotEmpty(zcTwo)){--> |
| | | <!--value="${zcTwo.driverProportion}"--> |
| | | <!--@}else{--> |
| | | <!--value=""--> |
| | | <!--@}--> |
| | | <!--name="zc6" id="zc6" class="form-control newWidth" /> %--> |
| | | <!--<br/>--> |
| | | <!--<br/>--> |
| | | <!--第三轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)"--> |
| | | <!--@if(isNotEmpty(zcThree)){--> |
| | | <!--value="${zcThree.pushDistance}"--> |
| | | <!--@}else{--> |
| | | <!--value=""--> |
| | | <!--@}--> |
| | | <!--name="zc7" id="zc7" class="form-control newWidth" /> 公里,--> |
| | | <!--推单时间为 <input type="text" oninput="checkIsInt(this)"--> |
| | | <!--@if(isNotEmpty(zcThree)){--> |
| | | <!--value="${zcThree.pushTime}"--> |
| | | <!--@}else{--> |
| | | <!--value=""--> |
| | | <!--@}--> |
| | | <!--name="zc8" id="zc8" class="form-control newWidth" /> 秒钟;--> |
| | | <!--每次推所有司机的 <input type="text" oninput="checkIsDouble(this)"--> |
| | | <!--@if(isNotEmpty(zcThree)){--> |
| | | <!--value="${zcThree.driverProportion}"--> |
| | | <!--@}else{--> |
| | | <!--value=""--> |
| | | <!--@}--> |
| | | <!--name="zc9" id="zc9" class="form-control newWidth" /> %--> |
| | | <!--<br/>--> |
| | | <!--</div>--> |
| | | <!--</div>--> |
| | | <!-- |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">快车推单:</label> |
| | | <div class="col-sm-10"> |
| | | 第一轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(zcOne)){ |
| | | value="${zcOne.pushDistance}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc1" id="zc1" class="form-control newWidth" /> 公里, |
| | | 推单时间为 <input type="text" oninput="checkIsInt(this)" |
| | | @if(isNotEmpty(zcOne)){ |
| | | value="${zcOne.pushTime}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc2" id="zc2" class="form-control newWidth" /> 秒钟; |
| | | 每次推所有司机的 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(zcOne)){ |
| | | value="${zcOne.driverProportion}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc3" id="zc3" class="form-control newWidth" /> % |
| | | <br/> |
| | | <br/> |
| | | 第二轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(zcTwo)){ |
| | | value="${zcTwo.pushDistance}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc4" id="zc4" class="form-control newWidth" /> 公里, |
| | | 推单时间为 <input type="text" oninput="checkIsInt(this)" |
| | | @if(isNotEmpty(zcTwo)){ |
| | | value="${zcTwo.pushTime}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc5" id="zc5" class="form-control newWidth" /> 秒钟; |
| | | 每次推所有司机的 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(zcTwo)){ |
| | | value="${zcTwo.driverProportion}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc6" id="zc6" class="form-control newWidth" /> % |
| | | <br/> |
| | | <br/> |
| | | 第三轮推单:推单距离为 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(zcThree)){ |
| | | value="${zcThree.pushDistance}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc7" id="zc7" class="form-control newWidth" /> 公里, |
| | | 推单时间为 <input type="text" oninput="checkIsInt(this)" |
| | | @if(isNotEmpty(zcThree)){ |
| | | value="${zcThree.pushTime}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc8" id="zc8" class="form-control newWidth" /> 秒钟; |
| | | 每次推所有司机的 <input type="text" oninput="checkIsDouble(this)" |
| | | @if(isNotEmpty(zcThree)){ |
| | | value="${zcThree.driverProportion}" |
| | | @}else{ |
| | | value="" |
| | | @} |
| | | name="zc9" id="zc9" class="form-control newWidth" /> % |
| | | <br/> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">出租车推单:</label> |
| | | <div class="col-sm-10"> |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">取消设置:</label> |
| | | <div class="col-sm-10"> |
| | | <!-- |
| | | 快车订单取消规则:快车订单在司机接单 <input type="text" oninput="checkIsInt(this)" |
| | | @if(isNotEmpty(ptCancel1)){ |
| | | value="${ptCancel1.minuteNum}" |
| | |
| | | @} |
| | | name="ptCancel2" id="ptCancel2" class="form-control newWidth" /> 元取消费用; |
| | | <br/> |
| | | --> |
| | | <br/> |
| | | 出租车订单取消规则:出租车订单在司机接单 <input type="text" oninput="checkIsInt(this)" |
| | | @if(isNotEmpty(ptCancel2)){ |
| | |
| | | @} |
| | | name="ptCancel4" id="ptCancel4" class="form-control newWidth" /> 元取消费用; |
| | | <br/> |
| | | <!-- |
| | | <br/> |
| | | 跨城出行取消规则:跨城订单在司机接单 <input type="text" oninput="checkIsInt(this)" |
| | | @if(isNotEmpty(ptCancel3)){ |
| | |
| | | @} |
| | | name="ptCancel6" id="ptCancel6" class="form-control newWidth" /> 元取消费用; |
| | | <br/> |
| | | --> |
| | | </div> |
| | | </div> |
| | | |
| | |
| | | <div class="form-group"> |
| | | <label class="col-sm-2 control-label">预约单取消设置:</label> |
| | | <div class="col-sm-10"> |
| | | <!-- |
| | | 快车订单取消规则:快车订单在司机接单 <input type="text" oninput="checkIsInt(this)" |
| | | @if(isNotEmpty(yyCancel1)){ |
| | | value="${yyCancel1.minuteNum}" |
| | |
| | | @} |
| | | name="yyCancel2" id="yyCancel2" class="form-control newWidth" /> 元取消费用; |
| | | <br/> |
| | | --> |
| | | <br/> |
| | | 出租车订单取消规则:出租车订单在司机接单 <input type="text" oninput="checkIsInt(this)" |
| | | @if(isNotEmpty(yyCancel2)){ |
| | |
| | | @} |
| | | name="one" id="one" class="form-control newWidth" /> 元;<br/> |
| | | </div> |
| | | <!-- |
| | | <div class="col-sm-3"> |
| | | <label class="col-sm-5 control-label">快车改派:</label> |
| | | <div class="col-sm-7"> |
| | |
| | | </div> |
| | | </div> |
| | | </div> |
| | | --> |
| | | <div class="col-sm-3"> |
| | | <label class="col-sm-5 control-label">出租车改派:</label> |
| | | <div class="col-sm-7"> |
| | |
| | | @} |
| | | name="phone2" id="phone2" class="form-control newWidth" /> |
| | | <br/> |
| | | <!-- |
| | | <br/> |
| | | 包车调度电话: <input type="text" |
| | | @if(isNotEmpty(phone3)){ |
| | |
| | | @} |
| | | name="phone3" id="phone3" class="form-control newWidth" /> |
| | | <br/> |
| | | --> |
| | | <br/> |
| | | 招聘电话: <input type="text" |
| | | @if(isNotEmpty(phone5)){ |
| | |
| | | <zxing.version>3.2.1</zxing.version> |
| | | <druid.version>1.1.10</druid.version> |
| | | <beetl.version>2.8.5</beetl.version> |
| | | <swagger.version>2.9.2</swagger.version> |
| | | <commons-lang3.version>3.7</commons-lang3.version> |
| | | <ehcache.core.version>2.6.11</ehcache.core.version> |
| | | <mysql-connector-java.version>8.0.11</mysql-connector-java.version> |
| | |
| | | <groupId>com.ibeetl</groupId> |
| | | <artifactId>beetl</artifactId> |
| | | <version>${beetl.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger2</artifactId> |
| | | <version>${swagger.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>io.springfox</groupId> |
| | | <artifactId>springfox-swagger-ui</artifactId> |
| | | <version>${swagger.version}</version> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>org.apache.commons</groupId> |