Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/mx_charging_pile
76个文件已修改
2个文件已删除
24个文件已添加
New file |
| | |
| | | package com.ruoyi.account.api.dto; |
| | | |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | public class TagListQueryDto extends BasePage { |
| | | String tagName; |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_app_coupon") |
| | | @ApiModel(value="TAppCoupon对象", description="") |
| | | public class TAppCoupon implements Serializable { |
| | | public class TAppCoupon extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_app_user") |
| | | @ApiModel(value="TAppUser对象", description="") |
| | | public class TAppUser implements Serializable { |
| | | public class TAppUser extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | @ApiModelProperty(value = "最后一次登录时间") |
| | | @TableField("last_login_time") |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_app_user_address") |
| | | @ApiModel(value="TAppUserAddress对象", description="") |
| | | public class TAppUserAddress implements Serializable { |
| | | public class TAppUserAddress extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @TableField("default_address") |
| | | private Integer defaultAddress; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_app_user_car") |
| | | @ApiModel(value="TAppUserCar对象", description="") |
| | | public class TAppUserCar implements Serializable { |
| | | public class TAppUserCar extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @TableField("endurance") |
| | | private String endurance; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_app_user_sign") |
| | | @ApiModel(value="TAppUserSign对象", description="") |
| | | public class TAppUserSign implements Serializable { |
| | | public class TAppUserSign extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_app_user_tag") |
| | | @ApiModel(value="TAppUserTag对象", description="") |
| | | public class TAppUserTag implements Serializable { |
| | | public class TAppUserTag implements Serializable{ |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableField; |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | import com.baomidou.mybatisplus.annotation.TableId; |
| | | import com.baomidou.mybatisplus.annotation.TableLogic; |
| | | import com.baomidou.mybatisplus.annotation.TableName; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_invoice_information") |
| | | @ApiModel(value="TInvoiceInformation对象", description="") |
| | | public class TInvoiceInformation implements Serializable { |
| | | public class TInvoiceInformation extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | |
| | | @TableField("bank_account") |
| | | private String bankAccount; |
| | | |
| | | @ApiModelProperty(value = "设置默认(0=否,1=是)") |
| | | @TableField("default") |
| | | private Integer default; |
| | | // @ApiModelProperty(value = "设置默认(0=否,1=是)") |
| | | // @TableField("default") |
| | | // private Integer default; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | <?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.account.api.mapper.TAppCouponMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppCoupon"> |
| | | <id column="id" property="id" /> |
| | | <result column="app_user_id" property="appUserId" /> |
| | | <result column="coupon_id" property="couponId" /> |
| | | <result column="end_time" property="endTime" /> |
| | | <result column="ways_to_obtain" property="waysToObtain" /> |
| | | <result column="redeem_points" property="redeemPoints" /> |
| | | <result column="payment_amount" property="paymentAmount" /> |
| | | <result column="payment_type" property="paymentType" /> |
| | | <result column="serial_number" property="serialNumber" /> |
| | | <result column="payment_time" property="paymentTime" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id, coupon_id, end_time, ways_to_obtain, redeem_points, payment_amount, payment_type, serial_number, payment_time, status, create_time, del_flag |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.account.api.mapper.TAppUserAddressMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppUserAddress"> |
| | | <id column="id" property="id" /> |
| | | <result column="app_user_id" property="appUserId" /> |
| | | <result column="name" property="name" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="city" property="city" /> |
| | | <result column="city_code" property="cityCode" /> |
| | | <result column="address" property="address" /> |
| | | <result column="lon" property="lon" /> |
| | | <result column="lat" property="lat" /> |
| | | <result column="default_address" property="defaultAddress" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id, name, phone, city, city_code, address, lon, lat, default_address, create_time, del_flag |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.account.api.mapper.TAppUserCarMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppUserCar"> |
| | | <id column="id" property="id" /> |
| | | <result column="app_user_id" property="appUserId" /> |
| | | <result column="license_plate" property="licensePlate" /> |
| | | <result column="vehicle_brand" property="vehicleBrand" /> |
| | | <result column="vehicle_model" property="vehicleModel" /> |
| | | <result column="vehicle_use" property="vehicleUse" /> |
| | | <result column="endurance" property="endurance" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id, license_plate, vehicle_brand, vehicle_model, vehicle_use, endurance, create_time, del_flag |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.account.api.mapper.TAppUserIntegralChangeMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppUserIntegralChange"> |
| | | <id column="id" property="id" /> |
| | | <result column="code" property="code" /> |
| | | <result column="app_user_id" property="appUserId" /> |
| | | <result column="change_type" property="changeType" /> |
| | | <result column="historical_integral" property="historicalIntegral" /> |
| | | <result column="current_integral" property="currentIntegral" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="extension" property="extension" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, code, app_user_id, change_type, historical_integral, current_integral, create_time, extension |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.account.api.mapper.TAppUserMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppUser"> |
| | | <id column="id" property="id" /> |
| | | <result column="name" property="name" /> |
| | | <result column="phone" property="phone" /> |
| | | <result column="avatar" property="avatar" /> |
| | | <result column="vip_id" property="vipId" /> |
| | | <result column="vip_end_time" property="vipEndTime" /> |
| | | <result column="company_id" property="companyId" /> |
| | | <result column="id_card" property="idCard" /> |
| | | <result column="auth_status" property="authStatus" /> |
| | | <result column="wx_openid" property="wxOpenid" /> |
| | | <result column="ali_openid" property="aliOpenid" /> |
| | | <result column="points" property="points" /> |
| | | <result column="province" property="province" /> |
| | | <result column="province_code" property="provinceCode" /> |
| | | <result column="city" property="city" /> |
| | | <result column="city_code" property="cityCode" /> |
| | | <result column="status" property="status" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | <result column="last_login_time" property="lastLoginTime" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, name, phone, avatar, vip_id, vip_end_time, company_id, id_card, auth_status, wx_openid, ali_openid, points, province, province_code, city, city_code, status, create_time, del_flag, last_login_time |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.account.api.mapper.TAppUserSignMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppUserSign"> |
| | | <id column="id" property="id" /> |
| | | <result column="app_user_id" property="appUserId" /> |
| | | <result column="sign_day" property="signDay" /> |
| | | <result column="reward_points" property="rewardPoints" /> |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id, sign_day, reward_points, create_time |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.account.api.mapper.TAppUserTagMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TAppUserTag"> |
| | | <id column="id" property="id" /> |
| | | <result column="app_user_id" property="appUserId" /> |
| | | <result column="user_tag_id" property="userTagId" /> |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id, user_tag_id, create_time |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.account.api.mapper.TInviteUserMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TInviteUser"> |
| | | <id column="id" property="id" /> |
| | | <result column="app_user_id" property="appUserId" /> |
| | | <result column="be_invited_app_user_id" property="beInvitedAppUserId" /> |
| | | <result column="award" property="award" /> |
| | | <result column="create_time" property="createTime" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id, be_invited_app_user_id, award, create_time |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | <?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.account.api.mapper.TInvoiceInformationMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.TInvoiceInformation"> |
| | | <id column="id" property="id" /> |
| | | <result column="app_user_id" property="appUserId" /> |
| | | <result column="invoice_type" property="invoiceType" /> |
| | | <result column="invoicing_object_type" property="invoicingObjectType" /> |
| | | <result column="name" property="name" /> |
| | | <result column="tax_identification_number" property="taxIdentificationNumber" /> |
| | | <result column="company_address" property="companyAddress" /> |
| | | <result column="company_phone" property="companyPhone" /> |
| | | <result column="deposit_bank" property="depositBank" /> |
| | | <result column="bank_account" property="bankAccount" /> |
| | | <result column="default" property="default" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id, invoice_type, invoicing_object_type, name, tax_identification_number, company_address, company_phone, deposit_bank, bank_account, default, create_time, del_flag |
| | | </sql> |
| | | |
| | | </mapper> |
New file |
| | |
| | | package com.ruoyi.chargingPile.api.model; |
| | | |
| | | import com.baomidou.mybatisplus.annotation.*; |
| | | import com.fasterxml.jackson.annotation.JsonFormat; |
| | | import com.ruoyi.common.core.web.domain.BasePojo; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | import lombok.EqualsAndHashCode; |
| | | |
| | | import java.io.Serializable; |
| | | import java.math.BigDecimal; |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | | * |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Data |
| | | @EqualsAndHashCode(callSuper = false) |
| | | @TableName("t_apply_charging_pile") |
| | | @ApiModel(value="TApplyChargingPile对象", description="") |
| | | public class TApplyChargingPile extends BasePojo { |
| | | |
| | | private static final long serialVersionUID = 1L; |
| | | |
| | | @ApiModelProperty(value = "主键") |
| | | @TableId(value = "id", type = IdType.AUTO) |
| | | private Integer id; |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | @TableField("app_user_id") |
| | | private Long appUserId; |
| | | |
| | | @ApiModelProperty(value = "用电地址") |
| | | @TableField("address") |
| | | private String address; |
| | | |
| | | @ApiModelProperty(value = "申请容量") |
| | | @TableField("capacity") |
| | | private BigDecimal capacity; |
| | | |
| | | @ApiModelProperty(value = "用电时间") |
| | | @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8") |
| | | @TableField("consumption_time") |
| | | private LocalDate consumptionTime; |
| | | |
| | | @ApiModelProperty(value = "户主经办(0=关,1=开)") |
| | | @TableField("landlord_handling") |
| | | private Integer landlordHandling; |
| | | |
| | | @ApiModelProperty(value = "户名") |
| | | @TableField("landlord_name") |
| | | private String landlordName; |
| | | |
| | | @ApiModelProperty(value = "户主身份证号码") |
| | | @TableField("landlord_id_card") |
| | | private String landlordIdCard; |
| | | |
| | | @ApiModelProperty(value = "户主手机号") |
| | | @TableField("landlord_phone") |
| | | private String landlordPhone; |
| | | |
| | | @ApiModelProperty(value = "户主身份证正面") |
| | | @TableField("landlord_front_id_card") |
| | | private String landlordFrontIdCard; |
| | | |
| | | @ApiModelProperty(value = "户主身份证反面") |
| | | @TableField("landlord_back_id_card") |
| | | private String landlordBackIdCard; |
| | | |
| | | @ApiModelProperty(value = "产权证明") |
| | | @TableField("title_certificate") |
| | | private String titleCertificate; |
| | | |
| | | @ApiModelProperty(value = "营业执照") |
| | | @TableField("business_license") |
| | | private String businessLicense; |
| | | |
| | | @ApiModelProperty(value = "充电桩用户(0=关,1=开)") |
| | | @TableField("charging_pile_user") |
| | | private Integer chargingPileUser; |
| | | |
| | | @ApiModelProperty(value = "固定车位产权") |
| | | @TableField("fixed_parking_property_rights") |
| | | private String fixedParkingPropertyRights; |
| | | |
| | | @ApiModelProperty(value = "施工证明") |
| | | @TableField("construction_certificate") |
| | | private String constructionCertificate; |
| | | |
| | | @ApiModelProperty(value = "经办人姓名") |
| | | @TableField("agent_name") |
| | | private String agentName; |
| | | |
| | | @ApiModelProperty(value = "经办人身份证号") |
| | | @TableField("agent_id_card") |
| | | private String agentIdCard; |
| | | |
| | | @ApiModelProperty(value = "经办人手机号") |
| | | @TableField("agent_phone") |
| | | private String agentPhone; |
| | | |
| | | @ApiModelProperty(value = "经办人身份证正面") |
| | | @TableField("agent_front_id_card") |
| | | private String agentFrontIdCard; |
| | | |
| | | @ApiModelProperty(value = "经办人身份证背面") |
| | | @TableField("agent_back_id_card") |
| | | private String agentBackIdCard; |
| | | |
| | | @ApiModelProperty(value = "是否有充电桩(0=否,1=是)") |
| | | @TableField("charging_pile") |
| | | private Integer chargingPile; |
| | | |
| | | @ApiModelProperty(value = "补充资料") |
| | | @TableField("further_information") |
| | | private String furtherInformation; |
| | | |
| | | @ApiModelProperty(value = "备注") |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.api.factory; |
| | | |
| | | import com.ruoyi.order.api.feignClient.ChargingOrderClient; |
| | | import org.slf4j.Logger; |
| | | import org.slf4j.LoggerFactory; |
| | | import org.springframework.cloud.openfeign.FallbackFactory; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | /** |
| | | * 充电订单服务降级处理 |
| | | * |
| | | * @author ruoyi |
| | | */ |
| | | @Component |
| | | public class OrderFallbackFactory implements FallbackFactory<ChargingOrderClient> |
| | | { |
| | | private static final Logger log = LoggerFactory.getLogger(OrderFallbackFactory.class); |
| | | |
| | | |
| | | @Override |
| | | public ChargingOrderClient create(Throwable cause) { |
| | | log.error("商品订单调用失败:{}", cause.getMessage()); |
| | | return new ChargingOrderClient() { |
| | | |
| | | }; |
| | | } |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.api.feignClient; |
| | | |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.order.api.factory.ChargingOrderFallbackFactory; |
| | | import com.ruoyi.order.api.factory.OrderFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | | import org.springframework.web.bind.annotation.PostMapping; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * 后台订单服务 |
| | | * @author ruoyi |
| | | */ |
| | | @FeignClient(contextId = "OrderClient", value = ServiceNameConstants.CONTRACT_ORDER, fallbackFactory = OrderFallbackFactory.class) |
| | | public interface OrderClient { |
| | | |
| | | @PostMapping("/t-exchange-order/getSalesCountByGoodsIds") |
| | | R<List<Integer>> getSalesCountByGoodsId(String goodsIds); |
| | | } |
| | |
| | | @TableField("img_url") |
| | | private String imgUrl; |
| | | |
| | | @ApiModelProperty(value = "申诉状态 (1=待处理,2=已处理)") |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "申诉反馈") |
| | | @TableField("feedback") |
| | | private String feedback; |
New file |
| | |
| | | package com.ruoyi.order.api.query; |
| | | |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "TOrderAppealQuery对象", description = "订单申诉查询条件") |
| | | public class TOrderAppealQuery extends BasePage { |
| | | |
| | | @ApiModelProperty(value = "用户id") |
| | | private Long appUserId; |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.order.api.vo; |
| | | |
| | | import com.ruoyi.order.api.model.*; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel(value = "TOrderAppealVO对象", description = "订单申诉VO对象") |
| | | public class TOrderAppealVO extends TOrderAppeal { |
| | | |
| | | @ApiModelProperty(value = "充电订单") |
| | | private TChargingOrder chargingOrder; |
| | | |
| | | @ApiModelProperty(value = "购物订单") |
| | | private TShoppingOrder shoppingOrder; |
| | | |
| | | @ApiModelProperty(value = "兑换订单") |
| | | private TExchangeOrder exchangeOrder; |
| | | |
| | | @ApiModelProperty(value = "会员订单") |
| | | private TVipOrder vipOrder; |
| | | |
| | | } |
| | |
| | | com.ruoyi.order.api.factory.ChargingOrderFallbackFactory |
| | | com.ruoyi.order.api.factory.ChargingOrderFallbackFactory |
| | | com.ruoyi.order.api.factory.OrderFallbackFactory |
| | |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | @ApiModelProperty(value = "活动状态 1未开始 2已开始 3已结束") |
| | | @TableField(exist = false) |
| | | private Integer startState; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | @ApiModelProperty(value = "广告状态 1未开始 2已开始 3已结束") |
| | | @TableField(exist = false) |
| | |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | @ApiModelProperty(value = "人数") |
| | | @TableField(exist = false) |
| | | private Long userCount; |
| | |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("remark") |
| | | private String remark; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("type") |
| | | private Integer type; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("status") |
| | | private Integer status; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | @ApiModelProperty(value = "销量") |
| | | @TableField(exist = false) |
| | | private Integer salesCount; |
| | | |
| | | } |
| | |
| | | @TableField("added_service_tariff") |
| | | private Double addedServiceTariff; |
| | | |
| | | @ApiModelProperty(value = "删除状态(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("end_time") |
| | | private LocalDateTime endTime; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("condition") |
| | | private String condition; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | |
| | | @ApiModelProperty(value = "到达人数") |
| | | @TableField(exist = false) |
| | | private Long count; |
| | | |
| | | |
| | | |
| | | } |
| | |
| | | @TableField("mall_exclusive_price") |
| | | private Integer mallExclusivePrice; |
| | | |
| | | @ApiModelProperty(value = "添加时间") |
| | | @TableField("create_time") |
| | | private LocalDateTime createTime; |
| | | |
| | | @ApiModelProperty(value = "删除(0=否,1=是)") |
| | | @TableField("del_flag") |
| | | @TableLogic |
| | | private Integer delFlag; |
| | | |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.api.dto; |
| | | |
| | | import com.ruoyi.common.core.web.page.BasePage; |
| | | import io.swagger.annotations.ApiModel; |
| | | import io.swagger.annotations.ApiModelProperty; |
| | | import lombok.Data; |
| | | |
| | | @Data |
| | | @ApiModel("商品管理列表查询DTO") |
| | | public class GoodsDTO extends BasePage { |
| | | @ApiModelProperty(value = "商品状态 1上架 2下架") |
| | | private Integer status; |
| | | @ApiModelProperty(value = "商品名称") |
| | | private String name; |
| | | @ApiModelProperty(value = "1现金购买 2积分兑换 ") |
| | | private Integer type; |
| | | @ApiModelProperty(value = "1全部 2已售罄 ") |
| | | private Integer otherState; |
| | | } |
| | |
| | | package com.ruoyi.other.api.factory; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.api.dto.TagListQueryDto; |
| | | import com.ruoyi.account.api.dto.UnitListQueryDto; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.other.api.domain.TCompany; |
| | | import com.ruoyi.other.api.domain.TUserTag; |
| | | import com.ruoyi.other.api.feignClient.GoodsClient; |
| | | import com.ruoyi.other.api.feignClient.OtherClient; |
| | | import org.slf4j.Logger; |
| | |
| | | public R unitDelete(Integer id) { |
| | | return R.fail("删除单位失败:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R<Page<TUserTag>> queryTagPage(TagListQueryDto unitListQueryDto) { |
| | | return R.fail("查询标签:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R addorUpdateTag(TUserTag tUserTag) { |
| | | return R.fail("添加标签:" + throwable.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R deleteTag(Integer id) { |
| | | return R.fail("查询标签:" + throwable.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.other.api.feignClient; |
| | | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.api.dto.TagListQueryDto; |
| | | import com.ruoyi.account.api.dto.UnitListQueryDto; |
| | | import com.ruoyi.common.core.constant.ServiceNameConstants; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.other.api.domain.TCompany; |
| | | import com.ruoyi.other.api.domain.TUserTag; |
| | | import com.ruoyi.other.api.factory.GoodsFallbackFactory; |
| | | import com.ruoyi.other.api.factory.OtherFallbackFactory; |
| | | import org.springframework.cloud.openfeign.FeignClient; |
| | |
| | | */ |
| | | @FeignClient(contextId = "UnitClient", value = ServiceNameConstants.CONTRACT_SERVICE, fallbackFactory = OtherFallbackFactory.class) |
| | | public interface OtherClient { |
| | | |
| | | //单位分页 |
| | | @PostMapping(value = "/t-company/unit/page") |
| | | R<Page<TCompany>> queryUnitPage(@RequestBody UnitListQueryDto unitListQueryDto); |
| | | |
| | | //单位添加修改 |
| | | @PostMapping(value = "/t-company/unit/addOrUpdate") |
| | | R unitAddorUpadate(@RequestBody TCompany tCompany); |
| | | //单位删除 |
| | | @PostMapping(value = "/t-company/unit/delete") |
| | | R unitDelete(@RequestParam Integer id); |
| | | |
| | | |
| | | //标签分页 |
| | | @PostMapping(value = "/t-user-tag/page") |
| | | R<Page<TUserTag>> queryTagPage(@RequestBody TagListQueryDto unitListQueryDto); |
| | | |
| | | //用户新增标签 |
| | | @PostMapping(value = "/t-user-tag/addorUpdateTag") |
| | | R addorUpdateTag(@RequestBody TUserTag tUserTag); |
| | | @PostMapping(value = "/t-user-tag/delete") |
| | | R deleteTag(@RequestParam Integer id); |
| | | } |
| | |
| | | * 车辆合同的serviceid |
| | | */ |
| | | public static final String CONTRACT_SERVICE = "ruoyi-contract"; |
| | | public static final String CONTRACT_ORDER = "ruoyi-order"; |
| | | } |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.account.api.model.TAppUserAddress; |
| | | import com.ruoyi.account.service.TAppUserAddressService; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RequestMapping("/t-app-user-address") |
| | | public class TAppUserAddressController { |
| | | |
| | | private final TAppUserAddressService appUserAddressService; |
| | | |
| | | @Autowired |
| | | public TAppUserAddressController(TAppUserAddressService appUserAddressService) { |
| | | this.appUserAddressService = appUserAddressService; |
| | | } |
| | | |
| | | /** |
| | | * 查询用户地址列表 |
| | | */ |
| | | @ApiOperation(tags = {"小程序-用户地址"},value = "查询用户地址列表") |
| | | @GetMapping(value = "/queryAddress") |
| | | public AjaxResult<List<TAppUserAddress>> queryAddress() { |
| | | // TODO 用户id |
| | | return AjaxResult.ok(appUserAddressService.list(Wrappers.<TAppUserAddress>lambdaQuery().eq(TAppUserAddress::getAppUserId, null))); |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 添加用户地址管理 |
| | | */ |
| | | @ApiOperation(tags = {"小程序-用户地址"},value = "添加用户地址") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TAppUserAddress dto) { |
| | | // TODO 用户id |
| | | // 修改用户默认地址 |
| | | appUserAddressService.updateDefaultAddress(dto.getDefaultAddress(),dto.getAppUserId()); |
| | | return AjaxResult.ok(appUserAddressService.save(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 修改用户地址 |
| | | */ |
| | | @ApiOperation(tags = {"小程序-用户地址"},value = "修改用户地址") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@RequestBody TAppUserAddress dto) { |
| | | // 修改用户默认地址 |
| | | appUserAddressService.updateDefaultAddress(dto.getDefaultAddress(),dto.getAppUserId()); |
| | | return AjaxResult.ok(appUserAddressService.updateById(dto)); |
| | | } |
| | | |
| | | /** |
| | | * 删除用户地址 |
| | | */ |
| | | @ApiOperation(tags = {"小程序-用户地址"},value = "删除用户地址") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<Boolean> deleteById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(appUserAddressService.removeById(id)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "用户列表", tags = {"用户管理-用户管理"}) |
| | | @PostMapping(value = "/user/page") |
| | | public R<Page<TCompany>> userPage(@RequestBody UnitListQueryDto unitListQueryDto) { |
| | | |
| | | //拿到标签tag |
| | | |
| | | //拿到会员map |
| | | |
| | | //列表查询 |
| | | |
| | | |
| | | |
| | | |
| | | return R.ok(); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.account.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.api.dto.TagListQueryDto; |
| | | import com.ruoyi.account.api.dto.UnitListQueryDto; |
| | | import com.ruoyi.account.api.model.TAppUser; |
| | | import com.ruoyi.account.api.model.TAppUserTag; |
| | | import com.ruoyi.account.service.TAppUserTagService; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.other.api.domain.TCompany; |
| | | import com.ruoyi.other.api.domain.TUserTag; |
| | | import com.ruoyi.other.api.feignClient.OtherClient; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.annotation.Resource; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/t-app-user-tag") |
| | | public class TAppUserTagController { |
| | | @Resource |
| | | private OtherClient otherClient; |
| | | @Resource |
| | | private TAppUserTagService appUserTagService; |
| | | |
| | | @ApiOperation(value = "标签管理列表", tags = {"用户管理-用户标签管理"}) |
| | | @PostMapping(value = "/tags/page") |
| | | public R<Page<TUserTag>> tagPage(@RequestBody TagListQueryDto tagListQueryDto) { |
| | | //拿到单位列表 |
| | | R<Page<TUserTag>> pageR = otherClient.queryTagPage(tagListQueryDto); |
| | | Page<TUserTag> data = pageR.getData(); |
| | | //拿到单位的用户数 |
| | | for (TUserTag record : data.getRecords()) { |
| | | record.setCount(appUserTagService.lambdaQuery().eq(TAppUserTag::getUserTagId, record.getId()).count()); |
| | | } |
| | | return R.ok(data); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "标签添加或修改", tags = {"用户管理-用户标签管理"}) |
| | | @PostMapping(value = "/tags/add") |
| | | public R<Page<TUserTag>> tagAdd(@RequestBody TUserTag tUserTag) { |
| | | //拿到单位列表 |
| | | otherClient.addorUpdateTag(tUserTag); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @ApiOperation(value = "标签删除", tags = {"用户管理-用户标签管理"}) |
| | | @PostMapping(value = "/tags/delete/{id}") |
| | | public R delete(@PathVariable Integer id) { |
| | | //拿到单位列表 |
| | | otherClient.deleteTag(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | */ |
| | | public interface TAppUserAddressService extends IService<TAppUserAddress> { |
| | | |
| | | /** |
| | | * 修改用户默认地址 |
| | | * @param defaultAddress |
| | | */ |
| | | void updateDefaultAddress(Integer defaultAddress,Long appUserId); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.account.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.account.api.model.TAppUserAddress; |
| | | import com.ruoyi.account.mapper.TAppUserAddressMapper; |
| | |
| | | @Service |
| | | public class TAppUserAddressServiceImpl extends ServiceImpl<TAppUserAddressMapper, TAppUserAddress> implements TAppUserAddressService { |
| | | |
| | | @Override |
| | | public void updateDefaultAddress(Integer defaultAddress,Long appUserId) { |
| | | if (defaultAddress == 1) { |
| | | this.update(Wrappers.<TAppUserAddress>lambdaUpdate().set(TAppUserAddress::getDefaultAddress, 0).eq(TAppUserAddress::getAppUserId, appUserId)); |
| | | } |
| | | } |
| | | } |
| | |
| | | /** |
| | | * 查询计费策略列表 |
| | | */ |
| | | @ApiOperation(value = "查询计费策略分页列表") |
| | | @ApiOperation(tags = {"后台-计费策略"},value = "查询计费策略分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TAccountingStrategyVO>> pageList(@RequestBody TAccountingStrategyQuery query) { |
| | | return AjaxResult.ok(accountingStrategyService.pageList(query)); |
| | |
| | | /** |
| | | * 查询计费策略明细列表 |
| | | */ |
| | | @ApiOperation(value = "查询计费策略明细列表") |
| | | @ApiOperation(tags = {"后台-计费策略"},value = "查询计费策略明细列表") |
| | | @GetMapping(value = "/queryAccountingStrategyDetailByStrategyId") |
| | | public AjaxResult<List<TAccountingStrategyDetailVO>> queryAccountingStrategyDetailByStrategyId(@RequestParam Integer strategyId) { |
| | | List<TAccountingStrategyDetailVO> list = accountingStrategyDetailService.queryAccountingStrategyDetailByStrategyId(strategyId); |
| | |
| | | /** |
| | | * 添加计费策略管理 |
| | | */ |
| | | @ApiOperation(value = "添加计费策略") |
| | | @ApiOperation(tags = {"后台-计费策略"},value = "添加计费策略") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TAccountingStrategyDTO dto) { |
| | | accountingStrategyService.save(dto); |
| | |
| | | /** |
| | | * 修改计费策略 |
| | | */ |
| | | @ApiOperation(value = "修改计费策略") |
| | | @ApiOperation(tags = {"后台-计费策略"},value = "修改计费策略") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@RequestBody TAccountingStrategyDTO dto) { |
| | | // 删除计费策略明细信息 |
| | |
| | | /** |
| | | * 查看计费策略详情 |
| | | */ |
| | | @ApiOperation(value = "查看计费策略详情") |
| | | @ApiOperation(tags = {"后台-计费策略"},value = "查看计费策略详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TAccountingStrategy> getDetailById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(accountingStrategyService.getById(id)); |
| | |
| | | /** |
| | | * 删除计费策略 |
| | | */ |
| | | @ApiOperation(value = "删除计费策略") |
| | | @ApiOperation(tags = {"后台-计费策略"},value = "删除计费策略") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<Boolean> deleteById(@RequestParam Integer id) { |
| | | // 刪除计费策略明细信息 |
| | |
| | | /** |
| | | * 批量删除计费策略 |
| | | */ |
| | | @ApiOperation(value = "批量删除计费策略") |
| | | @ApiOperation(tags = {"后台-计费策略"},value = "批量删除计费策略") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public AjaxResult<Boolean> deleteByIds(@RequestBody List<Integer> ids) { |
| | | // 刪除计费策略明细信息 |
New file |
| | |
| | | package com.ruoyi.chargingPile.controller; |
| | | |
| | | |
| | | import com.ruoyi.chargingPile.api.model.TApplyChargingPile; |
| | | import com.ruoyi.chargingPile.api.model.TCarport; |
| | | import com.ruoyi.chargingPile.api.vo.TCarportVO; |
| | | import com.ruoyi.chargingPile.service.TApplyChargingPileService; |
| | | import com.ruoyi.chargingPile.service.TCarportService; |
| | | import com.ruoyi.chargingPile.service.TVehicleRampService; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-apply-charging-pile") |
| | | public class TApplyChargingPileController { |
| | | |
| | | private final TApplyChargingPileService applyChargingPileService; |
| | | |
| | | @Autowired |
| | | public TApplyChargingPileController(TApplyChargingPileService applyChargingPileService) { |
| | | this.applyChargingPileService = applyChargingPileService; |
| | | } |
| | | |
| | | /** |
| | | * 建桩申请 |
| | | */ |
| | | @ApiOperation(tags = {"小程序-建桩申请"},value = "建桩申请") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TApplyChargingPile dto) { |
| | | // TODO 用户id |
| | | dto.setAppUserId(null); |
| | | return AjaxResult.ok(applyChargingPileService.save(dto)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | /** |
| | | * 通过停车场id查询车库及车道信息 |
| | | */ |
| | | @ApiOperation(value = "通过停车场id查询车库及车道信息") |
| | | @ApiOperation(tags = {"后台-车库"},value = "通过停车场id查询车库及车道信息") |
| | | @GetMapping(value = "/queryCarportByParkId") |
| | | public AjaxResult<List<TCarportVO>> queryCarportByParkId(@RequestParam(value = "parkingLotId", required = true) Integer parkingLotId) { |
| | | return AjaxResult.ok(carportService.queryCarportByParkId(parkingLotId)); |
| | |
| | | /** |
| | | * 添加车库管理 |
| | | */ |
| | | @ApiOperation(value = "添加车库") |
| | | @ApiOperation(tags = {"后台-车库"},value = "添加车库") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TCarport dto) { |
| | | return AjaxResult.ok(carportService.save(dto)); |
| | |
| | | /** |
| | | * 修改车库 |
| | | */ |
| | | @ApiOperation(value = "修改车库") |
| | | @ApiOperation(tags = {"后台-车库"},value = "修改车库") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@RequestBody TCarport dto) { |
| | | return AjaxResult.ok(carportService.updateById(dto)); |
| | |
| | | /** |
| | | * 查看车库详情 |
| | | */ |
| | | @ApiOperation(value = "查看车库详情") |
| | | @ApiOperation(tags = {"后台-车库"},value = "查看车库详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TCarport> getDetailById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(carportService.getById(id)); |
| | |
| | | /** |
| | | * 删除车库 |
| | | */ |
| | | @ApiOperation(value = "删除车库") |
| | | @ApiOperation(tags = {"后台-车库"},value = "删除车库") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<Boolean> deleteById(@RequestParam Integer id) { |
| | | // 刪除车道信息 |
| | |
| | | /** |
| | | * 批量删除车库 |
| | | */ |
| | | @ApiOperation(value = "批量删除车库") |
| | | @ApiOperation(tags = {"后台-车库"},value = "批量删除车库") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public AjaxResult<Boolean> deleteByIds(@RequestBody List<Integer> ids) { |
| | | // 刪除车道信息 |
| | |
| | | /** |
| | | * 查询充电枪列表 |
| | | */ |
| | | @ApiOperation(value = "查询充电枪分页列表") |
| | | @ApiOperation(tags = {"后台-充电枪"},value = "查询充电枪分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TChargingGunVO>> pageList(@RequestBody TChargingGunQuery query) { |
| | | return AjaxResult.ok(chargingGunService.pageList(query)); |
| | |
| | | /** |
| | | * 添加充电枪管理 |
| | | */ |
| | | @ApiOperation(value = "添加充电枪") |
| | | @ApiOperation(tags = {"后台-充电枪"},value = "添加充电枪") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TChargingGunDTO dto) { |
| | | return AjaxResult.ok(chargingGunService.save(dto)); |
| | |
| | | /** |
| | | * 修改充电枪 |
| | | */ |
| | | @ApiOperation(value = "修改充电枪") |
| | | @ApiOperation(tags = {"后台-充电枪"},value = "修改充电枪") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@RequestBody TChargingGunDTO dto) { |
| | | return AjaxResult.ok(chargingGunService.updateById(dto)); |
| | |
| | | /** |
| | | * 查看充电枪详情 |
| | | */ |
| | | @ApiOperation(value = "查看充电枪详情") |
| | | @ApiOperation(tags = {"后台-充电枪"},value = "查看充电枪详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TChargingGun> getDetailById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(chargingGunService.getById(id)); |
| | |
| | | /** |
| | | * 删除充电枪 |
| | | */ |
| | | @ApiOperation(value = "删除充电枪") |
| | | @ApiOperation(tags = {"后台-充电枪"},value = "删除充电枪") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<Boolean> deleteById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(chargingGunService.removeById(id)); |
| | |
| | | /** |
| | | * 批量删除充电枪 |
| | | */ |
| | | @ApiOperation(value = "批量删除充电枪") |
| | | @ApiOperation(tags = {"后台-充电枪"},value = "批量删除充电枪") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public AjaxResult<Boolean> deleteByIds(@RequestBody List<Integer> ids) { |
| | | return AjaxResult.ok(chargingGunService.removeByIds(ids)); |
| | |
| | | /** |
| | | * 结束充电 |
| | | */ |
| | | @ApiOperation(value = "结束充电") |
| | | @ApiOperation(tags = {"后台-充电枪"},value = "结束充电") |
| | | @PostMapping(value = "/stopCharging") |
| | | public AjaxResult<String> stopCharging() { |
| | | // TODO 硬件 结束充电 |
| | |
| | | /** |
| | | * 查询监控列表 |
| | | */ |
| | | @ApiOperation(value = "查询监控分页列表") |
| | | @ApiOperation(tags = {"后台-监控"},value = "查询监控分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TMonitoringEquipmentVO>> pageList(@RequestBody TMonitoringEquipmentQuery query) { |
| | | return AjaxResult.ok(monitoringEquipmentService.pageList(query)); |
| | |
| | | /** |
| | | * 添加监控管理 |
| | | */ |
| | | @ApiOperation(value = "添加监控") |
| | | @ApiOperation(tags = {"后台-监控"},value = "添加监控") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TMonitoringEquipmentDTO dto) { |
| | | return AjaxResult.ok(monitoringEquipmentService.save(dto)); |
| | |
| | | /** |
| | | * 修改监控 |
| | | */ |
| | | @ApiOperation(value = "修改监控") |
| | | @ApiOperation(tags = {"后台-监控"},value = "修改监控") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@RequestBody TMonitoringEquipmentDTO dto) { |
| | | return AjaxResult.ok(monitoringEquipmentService.updateById(dto)); |
| | |
| | | /** |
| | | * 查看监控详情 |
| | | */ |
| | | @ApiOperation(value = "查看监控详情") |
| | | @ApiOperation(tags = {"后台-监控"},value = "查看监控详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TMonitoringEquipment> getDetailById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(monitoringEquipmentService.getById(id)); |
| | |
| | | /** |
| | | * 删除监控 |
| | | */ |
| | | @ApiOperation(value = "删除监控") |
| | | @ApiOperation(tags = {"后台-监控"},value = "删除监控") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<Boolean> deleteById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(monitoringEquipmentService.removeById(id)); |
| | |
| | | /** |
| | | * 批量删除监控 |
| | | */ |
| | | @ApiOperation(value = "批量删除监控") |
| | | @ApiOperation(tags = {"后台-监控"},value = "批量删除监控") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public AjaxResult<Boolean> deleteByIds(@RequestBody List<Integer> ids) { |
| | | return AjaxResult.ok(monitoringEquipmentService.removeByIds(ids)); |
| | |
| | | /** |
| | | * 查询停车场列表 |
| | | */ |
| | | @ApiOperation(value = "查询停车场分页列表") |
| | | @ApiOperation(tags = {"后台-停车场"},value = "查询停车场分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TParkingLotVO>> pageList(@RequestBody TParkingLotQuery query) { |
| | | return AjaxResult.ok(parkingLotService.pageList(query)); |
| | |
| | | /** |
| | | * 查询停车场列表 |
| | | */ |
| | | @ApiOperation(value = "查询停车场列表") |
| | | @ApiOperation(tags = {"后台-停车场"},value = "查询停车场列表") |
| | | @PostMapping(value = "/list") |
| | | public AjaxResult<List<TParkingLot>> list(@RequestBody TParkingLotQuery query) { |
| | | return AjaxResult.ok(parkingLotService.list(Wrappers.lambdaQuery(TParkingLot.class) |
| | |
| | | /** |
| | | * 添加停车场管理 |
| | | */ |
| | | @ApiOperation(value = "添加停车场") |
| | | @ApiOperation(tags = {"后台-停车场"},value = "添加停车场") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TParkingLotDTO dto) { |
| | | return AjaxResult.ok(parkingLotService.save(dto)); |
| | |
| | | /** |
| | | * 修改停车场 |
| | | */ |
| | | @ApiOperation(value = "修改停车场") |
| | | @ApiOperation(tags = {"后台-停车场"},value = "修改停车场") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@RequestBody TParkingLotDTO dto) { |
| | | return AjaxResult.ok(parkingLotService.updateById(dto)); |
| | |
| | | /** |
| | | * 查看停车场详情 |
| | | */ |
| | | @ApiOperation(value = "查看停车场详情") |
| | | @ApiOperation(tags = {"后台-停车场"},value = "查看停车场详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TParkingLot> getDetailById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(parkingLotService.getById(id)); |
| | |
| | | /** |
| | | * 删除停车场 |
| | | */ |
| | | @ApiOperation(value = "删除停车场") |
| | | @ApiOperation(tags = {"后台-停车场"},value = "删除停车场") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<Boolean> deleteById(@RequestParam Integer id) { |
| | | // 刪除车道信息 |
| | |
| | | /** |
| | | * 批量删除停车场 |
| | | */ |
| | | @ApiOperation(value = "批量删除停车场") |
| | | @ApiOperation(tags = {"后台-停车场"},value = "批量删除停车场") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public AjaxResult<Boolean> deleteByIds(@RequestBody List<Integer> ids) { |
| | | // 刪除车道信息 |
| | |
| | | /** |
| | | * 添加车道管理 |
| | | */ |
| | | @ApiOperation(value = "添加车道") |
| | | @ApiOperation(tags = {"后台-车道"},value = "添加车道") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TVehicleRamp dto) { |
| | | return AjaxResult.ok(vehicleRampService.save(dto)); |
| | |
| | | /** |
| | | * 修改车道 |
| | | */ |
| | | @ApiOperation(value = "修改车道") |
| | | @ApiOperation(tags = {"后台-车道"},value = "修改车道") |
| | | @PostMapping(value = "/update") |
| | | public AjaxResult<Boolean> update(@RequestBody TVehicleRamp dto) { |
| | | return AjaxResult.ok(vehicleRampService.updateById(dto)); |
| | |
| | | /** |
| | | * 查看车道详情 |
| | | */ |
| | | @ApiOperation(value = "查看车道详情") |
| | | @ApiOperation(tags = {"后台-车道"},value = "查看车道详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TVehicleRamp> getDetailById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(vehicleRampService.getById(id)); |
| | |
| | | /** |
| | | * 删除车道 |
| | | */ |
| | | @ApiOperation(value = "删除车道") |
| | | @ApiOperation(tags = {"后台-车道"},value = "删除车道") |
| | | @DeleteMapping(value = "/deleteById") |
| | | public AjaxResult<Boolean> deleteById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(vehicleRampService.removeById(id)); |
| | |
| | | /** |
| | | * 批量删除车道 |
| | | */ |
| | | @ApiOperation(value = "批量删除车道") |
| | | @ApiOperation(tags = {"后台-车道"},value = "批量删除车道") |
| | | @DeleteMapping(value = "/deleteByIds") |
| | | public AjaxResult<Boolean> deleteByIds(@RequestBody List<Integer> ids) { |
| | | return AjaxResult.ok(vehicleRampService.removeByIds(ids)); |
| | |
| | | /** |
| | | * 开关闸车道 |
| | | */ |
| | | @ApiOperation(value = "开关闸车道") |
| | | @ApiOperation(tags = {"后台-车道"},value = "开关闸车道") |
| | | @PostMapping(value = "/openOrDown") |
| | | public AjaxResult<String> openOrDown(@RequestBody TVehicleRamp dto) { |
| | | // TODO 硬件 开关闸车道 |
New file |
| | |
| | | package com.ruoyi.chargingPile.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.chargingPile.api.model.TApplyChargingPile; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | public interface TApplyChargingPileMapper extends BaseMapper<TApplyChargingPile> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.chargingPile.api.model.TApplyChargingPile; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | public interface TApplyChargingPileService extends IService<TApplyChargingPile> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.chargingPile.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.chargingPile.api.model.TApplyChargingPile; |
| | | import com.ruoyi.chargingPile.mapper.TApplyChargingPileMapper; |
| | | import com.ruoyi.chargingPile.service.TApplyChargingPileService; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | /** |
| | | * <p> |
| | | * 服务实现类 |
| | | * </p> |
| | | * |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Service |
| | | public class TApplyChargingPileServiceImpl extends ServiceImpl<TApplyChargingPileMapper, TApplyChargingPile> implements TApplyChargingPileService { |
| | | |
| | | } |
New file |
| | |
| | | <?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.chargingPile.mapper.TApplyChargingPileMapper"> |
| | | |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ruoyi.chargingPile.api.model.TApplyChargingPile"> |
| | | <id column="id" property="id" /> |
| | | <result column="app_user_id" property="appUserId" /> |
| | | <result column="address" property="address" /> |
| | | <result column="capacity" property="capacity" /> |
| | | <result column="consumption_time" property="consumptionTime" /> |
| | | <result column="landlord_handling" property="landlordHandling" /> |
| | | <result column="landlord_name" property="landlordName" /> |
| | | <result column="landlord_id_card" property="landlordIdCard" /> |
| | | <result column="landlord_phone" property="landlordPhone" /> |
| | | <result column="landlord_front_id_card" property="landlordFrontIdCard" /> |
| | | <result column="landlord_back_id_card" property="landlordBackIdCard" /> |
| | | <result column="title_certificate" property="titleCertificate" /> |
| | | <result column="business_license" property="businessLicense" /> |
| | | <result column="charging_pile_user" property="chargingPileUser" /> |
| | | <result column="fixed_parking_property_rights" property="fixedParkingPropertyRights" /> |
| | | <result column="construction_certificate" property="constructionCertificate" /> |
| | | <result column="agent_name" property="agentName" /> |
| | | <result column="agent_id_card" property="agentIdCard" /> |
| | | <result column="agent_phone" property="agentPhone" /> |
| | | <result column="agent_front_id_card" property="agentFrontIdCard" /> |
| | | <result column="agent_back_id_card" property="agentBackIdCard" /> |
| | | <result column="charging_pile" property="chargingPile" /> |
| | | <result column="further_information" property="furtherInformation" /> |
| | | <result column="remark" property="remark" /> |
| | | <result column="create_time" property="createTime" /> |
| | | <result column="del_flag" property="delFlag" /> |
| | | </resultMap> |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, app_user_id, address, capacity, consumption_time, landlord_handling, landlord_name, landlord_id_card, landlord_phone, landlord_front_id_card, landlord_back_id_card, title_certificate, business_license, charging_pile_user, fixed_parking_property_rights, construction_certificate, agent_name, agent_id_card, agent_phone, agent_front_id_card, agent_back_id_card, charging_pile, further_information, remark, create_time, del_flag |
| | | </sql> |
| | | |
| | | </mapper> |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Api(tags = "充电订单计费策略明细") |
| | | @RestController |
| | | @RequestMapping("/t-charging-order-accounting-strategy") |
| | | public class TChargingOrderAccountingStrategyController { |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Api(tags = "充电订单") |
| | | @RestController |
| | | @RequestMapping("/t-charging-order") |
| | | public class TChargingOrderController { |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Api(tags = "积分兑换订单") |
| | | @RestController |
| | | @RequestMapping("/t-exchange-order") |
| | | public class TExchangeOrderController { |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.order.api.query.TOrderAppealQuery; |
| | | import com.ruoyi.order.api.vo.TOrderAppealVO; |
| | | import com.ruoyi.order.service.TOrderAppealService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RequestMapping("/t-order-appeal") |
| | | public class TOrderAppealController { |
| | | |
| | | private final TOrderAppealService orderAppealService; |
| | | private final TokenService tokenService; |
| | | |
| | | @Autowired |
| | | public TOrderAppealController(TOrderAppealService orderAppealService, TokenService tokenService) { |
| | | this.orderAppealService = orderAppealService; |
| | | this.tokenService = tokenService; |
| | | } |
| | | |
| | | /** |
| | | * 查询订单申诉列表 |
| | | */ |
| | | @ApiOperation(tags = {"小程序-订单申诉"},value = "查询订单申诉分页列表") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TOrderAppealVO>> pageList(@RequestBody TOrderAppealQuery query) { |
| | | // TODO 用户id 获取小程序当前登录用户id |
| | | Long userId = tokenService.getLoginUser().getUserid(); |
| | | query.setAppUserId(userId); |
| | | return AjaxResult.ok(orderAppealService.pageList(query)); |
| | | } |
| | | |
| | | /** |
| | | * 查询订单申诉详情 |
| | | */ |
| | | @ApiOperation(tags = {"小程序-订单申诉"},value = "查询订单申诉详情") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TOrderAppealVO> getDetailById(@RequestParam Integer id) { |
| | | return AjaxResult.ok(orderAppealService.getDetailById(id)); |
| | | } |
| | | |
| | | |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Api(tags = "订单评价") |
| | | @RestController |
| | | @RequestMapping("/t-order-evaluate") |
| | | public class TOrderEvaluateController { |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Api(tags = "订单评价标签关系表") |
| | | @RestController |
| | | @RequestMapping("/t-order-evaluate-tag") |
| | | public class TOrderEvaluateTagController { |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Api(tags = "订单开票") |
| | | @RestController |
| | | @RequestMapping("/t-order-invoice") |
| | | public class TOrderInvoiceController { |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Api(tags = "订单开票明细") |
| | | @RestController |
| | | @RequestMapping("/t-order-invoice-detail") |
| | | public class TOrderInvoiceDetailController { |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Api(tags = "购物订单") |
| | | @RestController |
| | | @RequestMapping("/t-shopping-order") |
| | | public class TShoppingOrderController { |
| | |
| | | package com.ruoyi.order.controller; |
| | | |
| | | |
| | | import io.swagger.annotations.Api; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Api(tags = "会员订单") |
| | | @RestController |
| | | @RequestMapping("/t-vip-order") |
| | | public class TVipOrderController { |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.order.api.model.TChargingOrderAccountingStrategy; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Mapper |
| | | public interface TChargingOrderAccountingStrategyMapper extends BaseMapper<TChargingOrderAccountingStrategy> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.order.api.model.TChargingOrder; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Mapper |
| | | public interface TChargingOrderMapper extends BaseMapper<TChargingOrder> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.order.api.model.TExchangeOrder; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Mapper |
| | | public interface TExchangeOrderMapper extends BaseMapper<TExchangeOrder> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.order.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.order.api.model.TOrderAppeal; |
| | | import com.ruoyi.order.api.query.TOrderAppealQuery; |
| | | import com.ruoyi.order.api.vo.TOrderAppealVO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TOrderAppealMapper extends BaseMapper<TOrderAppeal> { |
| | | |
| | | /** |
| | | * 查询订单申诉分页列表 |
| | | * @param query |
| | | * @param pageInfo |
| | | * @return |
| | | */ |
| | | List<TOrderAppealVO> pageList(@Param("query") TOrderAppealQuery query, @Param("pageInfo")PageInfo<TOrderAppealVO> pageInfo); |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.order.api.model.TOrderEvaluate; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Mapper |
| | | public interface TOrderEvaluateMapper extends BaseMapper<TOrderEvaluate> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.order.api.model.TOrderEvaluateTag; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Mapper |
| | | public interface TOrderEvaluateTagMapper extends BaseMapper<TOrderEvaluateTag> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.order.api.model.TOrderInvoiceDetail; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Mapper |
| | | public interface TOrderInvoiceDetailMapper extends BaseMapper<TOrderInvoiceDetail> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.order.api.model.TOrderInvoice; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Mapper |
| | | public interface TOrderInvoiceMapper extends BaseMapper<TOrderInvoice> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.order.api.model.TShoppingOrder; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Mapper |
| | | public interface TShoppingOrderMapper extends BaseMapper<TShoppingOrder> { |
| | | |
| | | } |
| | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.order.api.model.TVipOrder; |
| | | import org.apache.ibatis.annotations.Mapper; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @author xiaochen |
| | | * @since 2024-08-07 |
| | | */ |
| | | @Mapper |
| | | public interface TVipOrderMapper extends BaseMapper<TVipOrder> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.order.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.order.api.model.TOrderAppeal; |
| | | import com.ruoyi.order.api.query.TOrderAppealQuery; |
| | | import com.ruoyi.order.api.vo.TOrderAppealVO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TOrderAppealService extends IService<TOrderAppeal> { |
| | | |
| | | /** |
| | | * 查询订单申诉分页列表 |
| | | * @param query |
| | | * @return |
| | | */ |
| | | PageInfo<TOrderAppealVO> pageList(TOrderAppealQuery query); |
| | | |
| | | /** |
| | | * 查询订单申诉详情 |
| | | * @param id |
| | | * @return |
| | | */ |
| | | TOrderAppealVO getDetailById(Integer id); |
| | | } |
| | |
| | | package com.ruoyi.order.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import com.ruoyi.order.api.model.TOrderAppeal; |
| | | import com.ruoyi.order.mapper.TOrderAppealMapper; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.order.api.model.*; |
| | | import com.ruoyi.order.api.query.TOrderAppealQuery; |
| | | import com.ruoyi.order.api.vo.TOrderAppealVO; |
| | | import com.ruoyi.order.mapper.*; |
| | | import com.ruoyi.order.service.TChargingOrderService; |
| | | import com.ruoyi.order.service.TOrderAppealService; |
| | | import org.springframework.beans.BeanUtils; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TOrderAppealServiceImpl extends ServiceImpl<TOrderAppealMapper, TOrderAppeal> implements TOrderAppealService { |
| | | |
| | | @Autowired |
| | | private TChargingOrderMapper chargingOrderMapper; |
| | | @Autowired |
| | | private TExchangeOrderMapper exchangeOrderMapper; |
| | | @Autowired |
| | | private TShoppingOrderMapper shoppingOrderMapper; |
| | | @Autowired |
| | | private TVipOrderMapper vipOrderMapper; |
| | | |
| | | @Override |
| | | public PageInfo<TOrderAppealVO> pageList(TOrderAppealQuery query) { |
| | | PageInfo<TOrderAppealVO> pageInfo = new PageInfo<>(query.getPageCurr(),query.getPageSize()); |
| | | List<TOrderAppealVO> list = this.baseMapper.pageList(query,pageInfo); |
| | | List<Long> orderIds = list.stream().map(TOrderAppealVO::getOrderId).collect(Collectors.toList()); |
| | | // 查询当前页的订单 |
| | | List<TChargingOrder> chargingOrders = chargingOrderMapper.selectList(Wrappers.lambdaQuery(TChargingOrder.class) |
| | | .in(TChargingOrder::getId, orderIds)); |
| | | List<TExchangeOrder> exchangeOrders = exchangeOrderMapper.selectList(Wrappers.lambdaQuery(TExchangeOrder.class) |
| | | .in(TExchangeOrder::getId, orderIds)); |
| | | List<TShoppingOrder> shoppingOrders = shoppingOrderMapper.selectList(Wrappers.lambdaQuery(TShoppingOrder.class) |
| | | .in(TShoppingOrder::getId, orderIds)); |
| | | List<TVipOrder> vipOrders = vipOrderMapper.selectList(Wrappers.lambdaQuery(TVipOrder.class) |
| | | .in(TVipOrder::getId, orderIds)); |
| | | list.forEach(item -> { |
| | | if (item.getOrderType() == 1) { |
| | | item.setChargingOrder(chargingOrders.stream().filter(chargingOrder -> chargingOrder.getId().equals(item.getOrderId())).findFirst().orElse(null)); |
| | | } else if (item.getOrderType() == 2) { |
| | | item.setExchangeOrder(exchangeOrders.stream().filter(exchangeOrder -> exchangeOrder.getId().equals(item.getOrderId())).findFirst().orElse(null)); |
| | | }else if (item.getOrderType() == 3) { |
| | | item.setShoppingOrder(shoppingOrders.stream().filter(shoppingOrder -> shoppingOrder.getId().equals(item.getOrderId())).findFirst().orElse(null)); |
| | | }else if (item.getOrderType() == 4) { |
| | | item.setVipOrder(vipOrders.stream().filter(vipOrder -> vipOrder.getId().equals(item.getOrderId())).findFirst().orElse(null)); |
| | | } |
| | | }); |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | |
| | | @Override |
| | | public TOrderAppealVO getDetailById(Integer id) { |
| | | TOrderAppeal orderAppeal = this.baseMapper.selectById(id); |
| | | TOrderAppealVO orderAppealVO = new TOrderAppealVO(); |
| | | BeanUtils.copyProperties(orderAppeal,orderAppealVO); |
| | | // 查询申诉详情 |
| | | if (orderAppeal.getOrderType() == 1) { |
| | | orderAppealVO.setChargingOrder(chargingOrderMapper.selectById(orderAppeal.getOrderId())); |
| | | } else if (orderAppeal.getOrderType() == 2) { |
| | | orderAppealVO.setExchangeOrder(exchangeOrderMapper.selectById(orderAppeal.getOrderId())); |
| | | }else if (orderAppeal.getOrderType() == 3) { |
| | | orderAppealVO.setShoppingOrder(shoppingOrderMapper.selectById(orderAppeal.getOrderId())); |
| | | }else if (orderAppeal.getOrderType() == 4) { |
| | | orderAppealVO.setVipOrder(vipOrderMapper.selectById(orderAppeal.getOrderId())); |
| | | } |
| | | return orderAppealVO; |
| | | } |
| | | } |
| | |
| | | <result column="reason" property="reason" /> |
| | | <result column="content" property="content" /> |
| | | <result column="img_url" property="imgUrl" /> |
| | | <result column="status" property="status" /> |
| | | <result column="feedback" property="feedback" /> |
| | | <result column="feedback_user_id" property="feedbackUserId" /> |
| | | <result column="feedback_time" property="feedbackTime" /> |
| | |
| | | |
| | | <!-- 通用查询结果列 --> |
| | | <sql id="Base_Column_List"> |
| | | id, order_type, order_id, app_user_id, reason, content, img_url, feedback, feedback_user_id, feedback_time, create_time, del_flag |
| | | id, order_type, order_id, app_user_id, reason, content, img_url, status,feedback, feedback_user_id, feedback_time, create_time, del_flag |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.order.api.vo.TOrderAppealVO"> |
| | | SELECT |
| | | <include refid="Base_Column_List"/> |
| | | FROM t_order_appeal |
| | | <where> |
| | | <if test="query.appUserId != null"> |
| | | AND app_user_id = #{query.appUserId} |
| | | </if> |
| | | AND del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-api-other</artifactId> |
| | | <version>3.6.2</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <dependency> |
| | | <groupId>com.ruoyi</groupId> |
| | | <artifactId>ruoyi-api-order</artifactId> |
| | | <version>3.6.2</version> |
| | | <scope>compile</scope> |
| | | </dependency> |
| | | <!-- SpringCloud Alibaba Nacos Config --> |
| | | <dependency> |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.domain.TActivity; |
| | | import com.ruoyi.other.api.domain.TAdvertising; |
| | | import com.ruoyi.other.api.dto.AdvertisingDTO; |
| | | import com.ruoyi.other.service.TActivityService; |
| | | import com.ruoyi.other.service.TAdvertisingService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | * @since 2024-08-06 |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/t-activity") |
| | | @RequestMapping("/activity") |
| | | public class TActivityController { |
| | | |
| | | @Autowired |
| | | private TActivityService activityService; |
| | | @PostMapping("/saveActivity") |
| | | @ApiOperation(tags = {"管理后台-活动管理"},value = "活动添加") |
| | | public AjaxResult saveActivity(@RequestBody TActivity dto) { |
| | | activityService.save(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/delete") |
| | | @ApiOperation(tags = {"管理后台-活动管理"},value = "活动删除") |
| | | public AjaxResult delete(Integer id) { |
| | | activityService.removeById(id); |
| | | return AjaxResult.success(); |
| | | } |
| | | @PostMapping("/updateVip") |
| | | @ApiOperation(tags = {"管理后台-活动管理"},value = "活动修改") |
| | | public AjaxResult updateActivity(@RequestBody TActivity dto) { |
| | | activityService.updateById(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/getInfo") |
| | | @ApiOperation(tags = {"管理后台-活动管理"},value = "活动查看详情") |
| | | public AjaxResult<TActivity> getInfo(Integer id) { |
| | | return AjaxResult.ok(activityService.getById(id)); |
| | | } |
| | | @ApiOperation(tags = {"管理后台-活动管理"},value = "活动列表分页查询") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TActivity>> pageList(@RequestBody AdvertisingDTO dto) { |
| | | return AjaxResult.ok(activityService.pageList(dto)); |
| | | } |
| | | } |
| | | |
| | |
| | | @Autowired |
| | | private TAdvertisingService advertisingService; |
| | | @PostMapping("/saveAdvertising") |
| | | @ApiOperation(value = "广告添加") |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告添加") |
| | | public AjaxResult saveAdvertising(@RequestBody TAdvertising dto) { |
| | | advertisingService.save(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/delete") |
| | | @ApiOperation(value = "广告删除") |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告删除") |
| | | public AjaxResult delete(Integer id) { |
| | | advertisingService.removeById(id); |
| | | return AjaxResult.success(); |
| | | } |
| | | @PostMapping("/updateVip") |
| | | @ApiOperation(value = "广告修改") |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告修改") |
| | | public AjaxResult updateVip(@RequestBody TAdvertising dto) { |
| | | advertisingService.updateById(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/getInfo") |
| | | @ApiOperation(value = "广告查看详情") |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告查看详情") |
| | | public AjaxResult<TAdvertising> getInfo(Integer id) { |
| | | return AjaxResult.ok(advertisingService.getById(id)); |
| | | } |
| | | @ApiOperation(value = "广告列表分页查询") |
| | | @ApiOperation(tags = {"管理后台-广告管理"},value = "广告列表分页查询") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TAdvertising>> pageList(AdvertisingDTO dto) { |
| | | public AjaxResult<PageInfo<TAdvertising>> pageList(@RequestBody AdvertisingDTO dto) { |
| | | return AjaxResult.ok(advertisingService.pageList(dto)); |
| | | } |
| | | } |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.other.api.domain.TEnterpriseUserApplication; |
| | | import com.ruoyi.other.service.TEnterpriseUserApplicationService; |
| | | import com.sun.xml.internal.bind.v2.TODO; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | 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; |
| | |
| | | @RequestMapping("/t-enterprise-user-application") |
| | | public class TEnterpriseUserApplicationController { |
| | | |
| | | private final TEnterpriseUserApplicationService enterpriseUserApplicationService; |
| | | |
| | | @Autowired |
| | | public TEnterpriseUserApplicationController(TEnterpriseUserApplicationService enterpriseUserApplicationService) { |
| | | this.enterpriseUserApplicationService = enterpriseUserApplicationService; |
| | | } |
| | | |
| | | /** |
| | | * 添加计费策略管理 |
| | | */ |
| | | @ApiOperation(tags = {"小程序-计费策略"},value = "添加集团用户申请") |
| | | @PostMapping(value = "/add") |
| | | public AjaxResult<Boolean> add(@RequestBody TEnterpriseUserApplication dto) { |
| | | // TODO 用户id |
| | | return AjaxResult.ok(enterpriseUserApplicationService.save(dto)); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.domain.TActivity; |
| | | import com.ruoyi.other.api.domain.TGoods; |
| | | import com.ruoyi.other.api.dto.AdvertisingDTO; |
| | | import com.ruoyi.other.api.dto.GoodsDTO; |
| | | import com.ruoyi.other.service.TActivityService; |
| | | import com.ruoyi.other.service.TAdvertisingService; |
| | | import com.ruoyi.other.service.TGoodsService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/t-goods") |
| | | public class TGoodsController { |
| | | |
| | | @Autowired |
| | | private TGoodsService goodsService; |
| | | @Autowired |
| | | private TActivityService activityService; |
| | | @PostMapping("/saveGoods") |
| | | @ApiOperation(tags = {"管理后台-商品管理"},value = "商品添加") |
| | | public AjaxResult saveActivity(@RequestBody TGoods dto) { |
| | | goodsService.save(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/delete") |
| | | @ApiOperation(tags = {"管理后台-商品管理"},value = "商品删除") |
| | | public AjaxResult delete(Integer id) { |
| | | goodsService.removeById(id); |
| | | return AjaxResult.success(); |
| | | } |
| | | @PostMapping("/updateVip") |
| | | @ApiOperation(tags = {"管理后台-商品管理"},value = "商品修改") |
| | | public AjaxResult updateActivity(@RequestBody TGoods dto) { |
| | | goodsService.updateById(dto); |
| | | return AjaxResult.success(); |
| | | } |
| | | @GetMapping("/getInfo") |
| | | @ApiOperation(tags = {"管理后台-商品管理"},value = "商品查看详情") |
| | | public AjaxResult<TGoods> getInfo(Integer id) { |
| | | return AjaxResult.ok(goodsService.getById(id)); |
| | | } |
| | | @ApiOperation(tags = {"管理后台-商品管理"},value = "商品列表分页查询") |
| | | @PostMapping(value = "/pageList") |
| | | public AjaxResult<PageInfo<TGoods>> pageList(@RequestBody GoodsDTO dto) { |
| | | return AjaxResult.ok(goodsService.pageList(dto)); |
| | | } |
| | | } |
| | | |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.Wrappers; |
| | | import com.ruoyi.common.core.web.domain.AjaxResult; |
| | | import com.ruoyi.other.api.domain.TSystemConfiguration; |
| | | import com.ruoyi.other.service.TSystemConfigurationService; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | /** |
| | |
| | | @RequestMapping("/t-system-configuration") |
| | | public class TSystemConfigurationController { |
| | | |
| | | private final TSystemConfigurationService systemConfigurationService; |
| | | |
| | | @Autowired |
| | | public TSystemConfigurationController(TSystemConfigurationService systemConfigurationService) { |
| | | this.systemConfigurationService = systemConfigurationService; |
| | | } |
| | | |
| | | /** |
| | | * 查看系统设置 |
| | | */ |
| | | @ApiOperation(tags = {"小程序-系统设置"},value = "联系客服") |
| | | @GetMapping(value = "/getDetailById") |
| | | public AjaxResult<TSystemConfiguration> getDetailById(@RequestParam(name = "type",value = "1=客服信息,2=系统设置") Integer type) { |
| | | return AjaxResult.ok(systemConfigurationService.getOne(Wrappers.lambdaQuery(TSystemConfiguration.class) |
| | | .eq(TSystemConfiguration::getType, type))); |
| | | } |
| | | |
| | | } |
| | | |
| | |
| | | package com.ruoyi.other.controller; |
| | | |
| | | |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.ruoyi.account.api.dto.TagListQueryDto; |
| | | import com.ruoyi.account.api.dto.UnitListQueryDto; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.other.api.domain.TCompany; |
| | | import com.ruoyi.other.api.domain.TUserTag; |
| | | import com.ruoyi.other.mapper.TUserTagMapper; |
| | | import com.ruoyi.other.service.TUserTagService; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import javax.annotation.Resource; |
| | | import java.time.LocalDateTime; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @RestController |
| | | @RequestMapping("/t-user-tag") |
| | | public class TUserTagController { |
| | | @Resource |
| | | private TUserTagService tUserTagService; |
| | | |
| | | @PostMapping(value = "/page") |
| | | public R<Page<TUserTag>> page(@RequestBody TagListQueryDto tagListQueryDto) { |
| | | Page<TUserTag> page = tUserTagService.lambdaQuery() |
| | | .orderByDesc(TUserTag::getCreateTime) |
| | | .like(tagListQueryDto.getTagName()!=null&& tagListQueryDto.getTagName().isEmpty(), TUserTag::getName, tagListQueryDto.getTagName()) |
| | | .page(Page.of(tagListQueryDto.getPageCurr(), tagListQueryDto.getPageSize())); |
| | | return R.ok(page); |
| | | |
| | | } |
| | | |
| | | @PostMapping(value = "/addorUpdateTag") |
| | | public R addorUpdateTag(@RequestBody TUserTag tUserTag) { |
| | | tUserTag.setCreateTime(LocalDateTime.now()); |
| | | tUserTagService.saveOrUpdate(tUserTag); |
| | | return R.ok(); |
| | | } |
| | | |
| | | @PostMapping(value = "/delete") |
| | | public R delete(@RequestParam Integer id) { |
| | | tUserTagService.removeById(id); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | } |
| | | |
New file |
| | |
| | | package com.ruoyi.other.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.other.api.domain.SysDictData; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author 无关风月 |
| | | * @since 2024-08-06 |
| | | */ |
| | | public interface SysDictDataMapper extends BaseMapper<SysDictData> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.mapper; |
| | | |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.other.api.domain.SysDictType; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author 无关风月 |
| | | * @since 2024-08-06 |
| | | */ |
| | | public interface SysDictTypeMapper extends BaseMapper<SysDictType> { |
| | | |
| | | } |
New file |
| | |
| | | package com.ruoyi.other.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.other.api.domain.SysNotice; |
| | | |
| | | /** |
| | | * <p> |
| | | * Mapper 接口 |
| | | * </p> |
| | | * |
| | | * @author 无关风月 |
| | | * @since 2024-08-06 |
| | | */ |
| | | public interface SysNoticeMapper extends BaseMapper<SysNotice> { |
| | | |
| | | } |
| | |
| | | package com.ruoyi.other.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.domain.TActivity; |
| | | import com.ruoyi.other.api.domain.TAdvertising; |
| | | import com.ruoyi.other.api.dto.AdvertisingDTO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TActivityMapper extends BaseMapper<TActivity> { |
| | | |
| | | List<TActivity> pageList(@Param("pageInfo")PageInfo<TActivity> pageInfo, @Param("req") AdvertisingDTO dto); |
| | | } |
| | |
| | | package com.ruoyi.other.mapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.domain.TActivity; |
| | | import com.ruoyi.other.api.domain.TGoods; |
| | | import com.ruoyi.other.api.dto.GoodsDTO; |
| | | import org.apache.ibatis.annotations.Param; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TGoodsMapper extends BaseMapper<TGoods> { |
| | | |
| | | List<TGoods> pageList(@Param("pageInfo")PageInfo<TGoods> pageInfo, @Param("req") GoodsDTO dto); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.other.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.domain.TActivity; |
| | | import com.ruoyi.other.api.dto.AdvertisingDTO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TActivityService extends IService<TActivity> { |
| | | |
| | | PageInfo<TActivity> pageList(AdvertisingDTO dto); |
| | | } |
| | |
| | | package com.ruoyi.other.service; |
| | | |
| | | import com.baomidou.mybatisplus.extension.service.IService; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.domain.TGoods; |
| | | import com.ruoyi.other.api.dto.GoodsDTO; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | */ |
| | | public interface TGoodsService extends IService<TGoods> { |
| | | |
| | | PageInfo<TGoods> pageList(GoodsDTO dto); |
| | | |
| | | } |
| | |
| | | package com.ruoyi.other.service.impl; |
| | | |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.other.api.domain.TActivity; |
| | | import com.ruoyi.other.api.domain.TAdvertising; |
| | | import com.ruoyi.other.api.dto.AdvertisingDTO; |
| | | import com.ruoyi.other.mapper.TActivityMapper; |
| | | import com.ruoyi.other.service.TActivityService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TActivityServiceImpl extends ServiceImpl<TActivityMapper, TActivity> implements TActivityService { |
| | | |
| | | @Override |
| | | public PageInfo<TActivity> pageList(AdvertisingDTO dto) { |
| | | |
| | | PageInfo<TActivity> pageInfo = new PageInfo<>(dto.getPageCurr(),dto.getPageSize()); |
| | | List<TActivity> list = this.baseMapper.pageList(pageInfo,dto); |
| | | for (TActivity tAdvertising : list) { |
| | | // 如果开始时间大于当前时间 那么设置状态startState为1 未开始 |
| | | if (tAdvertising.getStartTime().isAfter(LocalDateTime.now())) { |
| | | tAdvertising.setStartState(1); |
| | | } else if (tAdvertising.getEndTime().isBefore(LocalDateTime.now())) { |
| | | tAdvertising.setStartState(3); |
| | | } else { |
| | | tAdvertising.setStartState(2); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | @Override |
| | | public PageInfo<TAdvertising> pageList(AdvertisingDTO dto) { |
| | | |
| | | PageInfo<TAdvertising> pageInfo = new PageInfo<>(dto.getStartState(),dto.getPageSize()); |
| | | PageInfo<TAdvertising> pageInfo = new PageInfo<>(dto.getPageCurr(),dto.getPageSize()); |
| | | List<TAdvertising> list = this.baseMapper.pageList(pageInfo,dto); |
| | | for (TAdvertising tAdvertising : list) { |
| | | // 如果开始时间大于当前时间 那么设置状态startState为1 未开始 |
| | | if (tAdvertising.getStartTime().isAfter(LocalDateTime.now())) { |
| | | tAdvertising.setStartState(1); |
| | | } else if (tAdvertising.getEndTime().isBefore(LocalDateTime.now())) { |
| | | tAdvertising.setStartState(3); |
| | | } else { |
| | | tAdvertising.setStartState(2); |
| | | } |
| | | } |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | |
| | | package com.ruoyi.other.service.impl; |
| | | |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.order.api.feignClient.OrderClient; |
| | | import com.ruoyi.other.api.domain.TGoods; |
| | | import com.ruoyi.other.api.dto.GoodsDTO; |
| | | import com.ruoyi.other.mapper.TGoodsMapper; |
| | | import com.ruoyi.other.service.TGoodsService; |
| | | import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Service; |
| | | import org.springframework.util.StringUtils; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * <p> |
| | |
| | | @Service |
| | | public class TGoodsServiceImpl extends ServiceImpl<TGoodsMapper, TGoods> implements TGoodsService { |
| | | |
| | | @Autowired |
| | | private OrderClient orderClient; |
| | | @Override |
| | | public PageInfo<TGoods> pageList(GoodsDTO dto) { |
| | | PageInfo<TGoods> pageInfo = new PageInfo<>(dto.getPageCurr(),dto.getPageSize()); |
| | | List<TGoods> list = this.baseMapper.pageList(pageInfo,dto); |
| | | |
| | | StringBuilder stringBuilder = new StringBuilder(); |
| | | for (TGoods temp : list) { |
| | | stringBuilder.append(temp.getId()).append(","); |
| | | } |
| | | if (StringUtils.hasLength(stringBuilder)){ |
| | | // 去除最后一个字符 |
| | | stringBuilder.deleteCharAt(stringBuilder.length()-1); |
| | | } |
| | | String string = stringBuilder.toString(); |
| | | List<Integer> data = orderClient.getSalesCountByGoodsId(string).getData(); |
| | | |
| | | // goodsClient |
| | | // 远程调用cha'xun |
| | | pageInfo.setRecords(list); |
| | | return pageInfo; |
| | | } |
| | | } |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, name, img, start_time, end_time, jump_type, jump_url, status, create_time, del_flag |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.other.api.domain.TActivity"> |
| | | select * from t_activity |
| | | <where> |
| | | <if test="req.name != null and req.name != ''"> |
| | | AND `name` LIKE concat('%',#{req.name}, '%') |
| | | </if> |
| | | <if test="req.state == 1"> |
| | | AND start_time >= NOW() |
| | | </if> |
| | | <if test="req.state == 2"> |
| | | AND start_time <= NOW() AND end_time >= NOW() |
| | | </if> |
| | | <if test="req.state == 3"> |
| | | AND end_time <= NOW() |
| | | </if> |
| | | AND del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | | <select id="pageList" resultType="com.ruoyi.other.api.domain.TAdvertising"> |
| | | select * from t_advertising |
| | | <where> |
| | | |
| | | <if test="req.name != null and req.name != ''"> |
| | | AND `name` LIKE concat('%',#{req.name}, '%') |
| | | </if> |
| | |
| | | <sql id="Base_Column_List"> |
| | | id, type, name, cover_picture, details_picture, dispatch_address, service_description, original_price, preferential_price, vip_price, redeem_points, limit_exchange_times, inventory, underlying_sales, describe, introduce, explain, status, create_time, del_flag |
| | | </sql> |
| | | <select id="pageList" resultType="com.ruoyi.other.api.domain.TGoods"> |
| | | select * from t_goods |
| | | <where> |
| | | <if test="req.name != null and req.name != ''"> |
| | | AND `name` LIKE concat('%',#{req.name}, '%') |
| | | </if> |
| | | <if test="req.type != null"> |
| | | AND `type` = #{req.type} |
| | | </if> |
| | | <if test="req.status != null"> |
| | | AND status = #{req.status} |
| | | </if> |
| | | <if test="req.otherState != null and req.otherState = 2"> |
| | | AND inventory = 0 |
| | | </if> |
| | | AND del_flag = ${@com.ruoyi.common.core.enums.DelFlagEnum@NO.getCode()} |
| | | </where> |
| | | ORDER BY create_time DESC |
| | | </select> |
| | | |
| | | </mapper> |