| | |
| | | image: zd-after-app |
| | | container_name: zd-after # 容å¨åç§° |
| | | ports: |
| | | - 7016:7016 # æå®å®¿ä¸»æºç«¯å£ä¸å®¹å¨ç«¯å£æ å°å
³ç³»ï¼å®¿ä¸»æºï¼å®¹å¨ |
| | | - 8088:8088 # æå®å®¿ä¸»æºç«¯å£ä¸å®¹å¨ç«¯å£æ å°å
³ç³»ï¼å®¿ä¸»æºï¼å®¹å¨ |
| | | restart: always # 容å¨å¼æºèªå¯ |
| | | privileged: true # è·å宿主æºrootæé |
| | | |
| | |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.business.entity.CarbonCubes; |
| | | import com.ruoyi.business.service.CarbonCubesService; |
| | | import com.ruoyi.common.annotation.Anonymous; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import lombok.AllArgsConstructor; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | import org.springframework.web.bind.annotation.RequestBody; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | @RestController |
| | | @AllArgsConstructor |
| | |
| | | return carbonCubesService.remove(new QueryWrapper<CarbonCubes>() |
| | | .lambda().eq(CarbonCubes::getBillNumber,carbonCubes.getBillNumber()))? R.ok() : R.fail(); |
| | | } |
| | | |
| | | @GetMapping("/page") |
| | | public R page(CarbonCubes carbonCubes, Page<CarbonCubes> page) { |
| | | return R.ok(carbonCubesService.pageCarbonCubes(page, carbonCubes)); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.business.entity; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.IdType; |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import lombok.Data; |
| | |
| | | @DateTimeFormat(pattern = "yyyy-MM-dd") |
| | | private LocalDate createTime; |
| | | |
| | | |
| | | //è¿è´¹ |
| | | private BigDecimal freightPrice; |
| | | |
| | | |
| | | } |
| | |
| | | package com.ruoyi.business.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.business.entity.CarbonCubes; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | @Mapper |
| | | public interface CarbonCubesMapper extends BaseMapper<CarbonCubes> { |
| | | IPage<CarbonCubes> pageCarbonCubes(Page<CarbonCubes> page, @Param("ew") CarbonCubes carbonCubes); |
| | | } |
| | |
| | | package com.ruoyi.business.service; |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.business.entity.CarbonCubes; |
| | | import com.ruoyi.common.core.domain.R; |
| | | |
| | | public interface CarbonCubesService extends IService<CarbonCubes> { |
| | | R addCarbonCubes(CarbonCubes carbonCubes); |
| | | |
| | | IPage<CarbonCubes> pageCarbonCubes(Page<CarbonCubes> page, CarbonCubes carbonCubes); |
| | | } |
| | |
| | | package com.ruoyi.business.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.core.toolkit.ObjectUtils; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.basic.entity.CoalInfo; |
| | | import com.ruoyi.basic.mapper.CoalInfoMapper; |
| | |
| | | public class CarbonCubesServiceImpl extends ServiceImpl<CarbonCubesMapper, CarbonCubes> implements CarbonCubesService { |
| | | @Autowired |
| | | private final CoalInfoMapper coalInfoMapper; |
| | | |
| | | @Autowired |
| | | private CarbonCubesMapper carbonCubesMapper; |
| | | |
| | | |
| | | @Override |
| | |
| | | } |
| | | return R.ok(); |
| | | } |
| | | |
| | | @Override |
| | | public IPage<CarbonCubes> pageCarbonCubes(Page<CarbonCubes> page, CarbonCubes carbonCubes) { |
| | | return carbonCubesMapper.pageCarbonCubes(page, carbonCubes); |
| | | } |
| | | } |
| ¶Ô±ÈÐÂÎļþ |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ruoyi.business.mapper.CarbonCubesMapper"> |
| | | |
| | | |
| | | <select id="pageCarbonCubes" resultType="com.ruoyi.business.entity.CarbonCubes"> |
| | | select * from carbon_cubes |
| | | <where> |
| | | <if test="ew.coal != null and ew.coal != null "> |
| | | and coal like concat('%',#{ew.coal},'%') |
| | | </if> |
| | | <if test="ew.orderType != null and ew.orderType != ''"> |
| | | and order_type = #{ew.orderType} |
| | | </if> |
| | | </where> |
| | | </select> |
| | | </mapper> |
| | |
| | | package com.ruoyi; |
| | | |
| | | import eu.bitwalker.useragentutils.Application; |
| | | import org.springframework.boot.SpringApplication; |
| | | import org.springframework.boot.autoconfigure.SpringBootApplication; |
| | | import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
| | | import org.springframework.context.ConfigurableApplicationContext; |
| | | import org.springframework.core.env.Environment; |
| | | import org.springframework.scheduling.annotation.EnableScheduling; |
| | | |
| | | /** |
| | |
| | | public static void main(String[] args) |
| | | { |
| | | // System.setProperty("spring.devtools.restart.enabled", "false"); |
| | | SpringApplication.run(RuoYiApplication.class, args); |
| | | ConfigurableApplicationContext run = SpringApplication.run(RuoYiApplication.class, args); |
| | | System.out.println("(â¥â â¿â )ï¾ï¾ è¥ä¾å¯å¨æå á(´ڡ`á)ï¾"); |
| | | |
| | | |
| | | // è·åEnvironmentå®ä¾ |
| | | Environment env = run.getEnvironment(); |
| | | |
| | | // è·å端å£å·åä¸ä¸æè·¯å¾ |
| | | String serverPort = env.getProperty("server.port"); |
| | | String contextPath = env.getProperty("server.servlet.context-path", ""); |
| | | |
| | | // æå°å¯å¨ä¿¡æ¯ |
| | | System.out.println("\n\n===========> ç³»ç»å¯å¨æåï¼åå°å°åï¼http://localhost:" + serverPort + contextPath); |
| | | |
| | | } |
| | | } |
| | |
| | | # url: jdbc:mysql://124.220.0.228:3300/ruoyi-java?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=convertToNull&useSSL=true&serverTimezone=GMT%2B8 |
| | | # pg |
| | | # url: jdbc:postgresql://localhost:5433/ruoyi-zd |
| | | url: jdbc:postgresql://localhost:5433/zd-02 |
| | | url: jdbc:postgresql://172.17.0.1:5432/zd_production |
| | | username: postgres |
| | | password: 123456 |
| | | password: bYD#nM+-BiLb |
| | | # ä»åºæ°æ®æº |
| | | slave: |
| | | # 仿°æ®æºå¼å
³/é»è®¤å
³é |
| | |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: 127.0.0.1 |
| | | host: 172.17.0.1 |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | # password: root2022! |
| | | # password: 123456 |
| | | password: 123456 |
| | | password: root2022! |
| | | # password: 123456 |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | |
| | | # å¼åç¯å¢é
ç½® |
| | | server: |
| | | # æå¡å¨çHTTP端å£ï¼é»è®¤ä¸º8080 |
| | | port: 8081 |
| | | port: 8088 |
| | | servlet: |
| | | # åºç¨ç访é®è·¯å¾ |
| | | context-path: / |
| | |
| | | restart: |
| | | # çé¨ç½²å¼å
³ |
| | | enabled: false |
| | | data: |
| | | # redis é
ç½® |
| | | redis: |
| | | # å°å |
| | | host: localhost |
| | | # 端å£ï¼é»è®¤ä¸º6379 |
| | | port: 6379 |
| | | # æ°æ®åºç´¢å¼ |
| | | database: 0 |
| | | # å¯ç |
| | | password: |
| | | # è¿æ¥è¶
æ¶æ¶é´ |
| | | timeout: 10s |
| | | lettuce: |
| | | pool: |
| | | # è¿æ¥æ± ä¸çæå°ç©ºé²è¿æ¥ |
| | | min-idle: 0 |
| | | # è¿æ¥æ± ä¸çæå¤§ç©ºé²è¿æ¥ |
| | | max-idle: 8 |
| | | # è¿æ¥æ± çæå¤§æ°æ®åºè¿æ¥æ° |
| | | max-active: 8 |
| | | # #è¿æ¥æ± æå¤§é»å¡çå¾
æ¶é´ï¼ä½¿ç¨è´å¼è¡¨ç¤ºæ²¡æéå¶ï¼ |
| | | max-wait: -1ms |
| | | |
| | | # tokené
ç½® |
| | | token: |
| | |
| | | excludes: /system/notice |
| | | # å¹é
龿¥ |
| | | urlPatterns: /system/*,/monitor/*,/tool/* |
| | | file: |
| | | upload-dir: /upload/file |
| | | file-url: http://localhost:8081/file |
| | |
| | | .authorizeHttpRequests((requests) -> { |
| | | permitAllUrl.getUrls().forEach(url -> requests.requestMatchers(url).permitAll()); |
| | | // 对äºç»å½login 注åregister éªè¯ç captchaImage å
许å¿åè®¿é® |
| | | requests.requestMatchers("/login", "/register", "/captchaImage").permitAll() |
| | | requests.requestMatchers("/login", "/register", "/captchaImage","carboncubes").permitAll() |
| | | // éæèµæºï¼å¯å¿åè®¿é® |
| | | .requestMatchers(HttpMethod.GET, "/", "/*.html", "/**.html", "/**.css", "/**.js", "/profile/**").permitAll() |
| | | .requestMatchers("/swagger-ui.html", "/v3/api-docs/**", "/swagger-ui/**", "/druid/**").permitAll() |