升级新架构
This commit is contained in:
parent
6e8e4672e7
commit
a4d958dbc8
|
|
@ -10,16 +10,10 @@ import cn.qihangerp.domain.OShopPlatform;
|
|||
import cn.qihangerp.module.service.OLogisticsCompanyService;
|
||||
import cn.qihangerp.module.service.OShopPlatformService;
|
||||
import cn.qihangerp.module.service.OShopService;
|
||||
import cn.qihangerp.oms.request.ShopBo;
|
||||
import cn.qihangerp.security.common.BaseController;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.security.access.prepost.PreAuthorize;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 店铺Controller
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
package cn.qihangerp.oms.controller;
|
||||
|
||||
import cn.qihangerp.common.PageQuery;
|
||||
import cn.qihangerp.common.PageResult;
|
||||
import cn.qihangerp.domain.OLogisticsCompany;
|
||||
import cn.qihangerp.domain.OShopPlatform;
|
||||
import cn.qihangerp.module.service.OLogisticsCompanyService;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,72 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<parent>
|
||||
<groupId>cn.qihangerp</groupId>
|
||||
<artifactId>qihangerp-cloud</artifactId>
|
||||
<version>2.0.6</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<groupId>cn.qihangerp.model</groupId>
|
||||
<artifactId>model</artifactId>
|
||||
|
||||
<properties>
|
||||
<maven.compiler.source>17</maven.compiler.source>
|
||||
<maven.compiler.target>17</maven.compiler.target>
|
||||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
|
||||
</properties>
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.apache.commons</groupId>
|
||||
<artifactId>commons-lang3</artifactId>
|
||||
<version>3.12.0</version>
|
||||
</dependency>
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>jakarta.platform</groupId>-->
|
||||
<!-- <artifactId>jakarta.jakartaee-api</artifactId>-->
|
||||
<!-- <version>9.1.0</version>-->
|
||||
<!-- <!– <scope>provided</scope>–>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>org.hibernate.validator</groupId>
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
<version>9.0.0.Final</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.mapstruct</groupId>
|
||||
<artifactId>mapstruct</artifactId>
|
||||
<version>1.6.3</version>
|
||||
</dependency>
|
||||
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.mapstruct</groupId>-->
|
||||
<!-- <artifactId>mapstruct-processor</artifactId>-->
|
||||
<!-- <version>1.6.3</version>-->
|
||||
<!-- </dependency>-->
|
||||
<!-- <!– 允许使用Lombok的Java Bean类中使用MapStruct注解 (Lombok 1.18.20+) –>-->
|
||||
<!-- <dependency>-->
|
||||
<!-- <groupId>org.projectlombok</groupId>-->
|
||||
<!-- <artifactId>lombok-mapstruct-binding</artifactId>-->
|
||||
<!-- <version>0.2.0</version>-->
|
||||
<!-- <scope>provided</scope>-->
|
||||
<!-- </dependency>-->
|
||||
<dependency>
|
||||
<groupId>com.fasterxml.jackson.core</groupId>
|
||||
<artifactId>jackson-annotations</artifactId>
|
||||
<version>2.20</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>io.swagger.core.v3</groupId>
|
||||
<artifactId>swagger-annotations</artifactId>
|
||||
<version>2.2.36</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>mybatis-plus-spring-boot3-starter</artifactId>
|
||||
<version>3.5.5</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
</project>
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
package cn.qihangerp.model;
|
||||
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello, World!");
|
||||
}
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.qihangerp.domain;
|
||||
package cn.qihangerp.model.entity;
|
||||
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.qihangerp.domain;
|
||||
package cn.qihangerp.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.qihangerp.domain;
|
||||
package cn.qihangerp.model.entity;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableField;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.qihangerp.domain;
|
||||
package cn.qihangerp.model.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.qihangerp.domain;
|
||||
package cn.qihangerp.model.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.qihangerp.domain;
|
||||
package cn.qihangerp.model.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.qihangerp.domain;
|
||||
package cn.qihangerp.model.entity;
|
||||
|
||||
|
||||
import cn.qihangerp.common.constant.UserConstants;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.qihangerp.domain;
|
||||
package cn.qihangerp.model.entity;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Map;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.qihangerp.domain;
|
||||
package cn.qihangerp.model.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.qihangerp.domain;
|
||||
package cn.qihangerp.model.entity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Date;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package cn.qihangerp.domain;
|
||||
package cn.qihangerp.model.entity;
|
||||
|
||||
|
||||
import java.util.Date;
|
||||
|
|
@ -6,7 +6,6 @@ import cn.qihangerp.common.api.ShopApiParams;
|
|||
import cn.qihangerp.common.enums.EnumShopType;
|
||||
import cn.qihangerp.common.enums.HttpStatus;
|
||||
import cn.qihangerp.domain.OShopPlatform;
|
||||
import cn.qihangerp.module.service.OShopPlatformService;
|
||||
import cn.qihangerp.module.service.OShopService;
|
||||
import cn.qihangerp.open.common.ApiResultVo;
|
||||
import cn.qihangerp.sdk.dou.DouTokenApiHelper;
|
||||
|
|
|
|||
|
|
@ -18,7 +18,6 @@ import cn.qihangerp.module.service.OShopPullLasttimeService;
|
|||
import cn.qihangerp.module.service.OShopPullLogsService;
|
||||
import cn.qihangerp.open.common.ApiResultVo;
|
||||
import cn.qihangerp.open.dou.DouOrderApiHelper;
|
||||
import cn.qihangerp.open.dou.model.Token;
|
||||
import cn.qihangerp.open.dou.model.order.Order;
|
||||
import cn.qihangerp.sdk.dou.PullRequest;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
|
|
|
|||
|
|
@ -16,7 +16,6 @@ import cn.qihangerp.module.service.OShopPullLasttimeService;
|
|||
import cn.qihangerp.module.service.OShopPullLogsService;
|
||||
import cn.qihangerp.open.common.ApiResultVo;
|
||||
import cn.qihangerp.open.dou.DouRefundApiHelper;
|
||||
import cn.qihangerp.open.dou.model.Token;
|
||||
import cn.qihangerp.open.dou.model.after.AfterSale;
|
||||
import cn.qihangerp.sdk.dou.PullRequest;
|
||||
import com.alibaba.fastjson2.JSONObject;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import cn.qihangerp.common.api.ShopApiParams;
|
|||
import cn.qihangerp.common.enums.EnumShopType;
|
||||
import cn.qihangerp.common.enums.HttpStatus;
|
||||
import cn.qihangerp.domain.OShopPlatform;
|
||||
import cn.qihangerp.module.service.OShopPlatformService;
|
||||
import cn.qihangerp.module.service.OShopService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import cn.qihangerp.common.api.ShopApiParams;
|
|||
import cn.qihangerp.common.enums.EnumShopType;
|
||||
import cn.qihangerp.common.enums.HttpStatus;
|
||||
import cn.qihangerp.domain.OShopPlatform;
|
||||
import cn.qihangerp.module.service.OShopPlatformService;
|
||||
import cn.qihangerp.module.service.OShopService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
|
|||
|
|
@ -6,7 +6,6 @@ import cn.qihangerp.common.api.ShopApiParams;
|
|||
import cn.qihangerp.common.enums.EnumShopType;
|
||||
import cn.qihangerp.common.enums.HttpStatus;
|
||||
import cn.qihangerp.domain.OShopPlatform;
|
||||
import cn.qihangerp.module.service.OShopPlatformService;
|
||||
import cn.qihangerp.module.service.OShopService;
|
||||
import lombok.AllArgsConstructor;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,6 @@
|
|||
package cn.qihangerp.module.order.service.impl;
|
||||
|
||||
|
||||
import cn.qihangerp.common.bo.ShipOrderAllocateShipBo;
|
||||
import cn.qihangerp.common.bo.ShopOrderShipBo;
|
||||
import cn.qihangerp.domain.OLogisticsCompany;
|
||||
import cn.qihangerp.module.goods.domain.OGoods;
|
||||
import cn.qihangerp.module.goods.domain.OGoodsSku;
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.qihangerp.module.mapper.OLogisticsCompanyMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.domain.OLogisticsCompany">
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.model.entity.OLogisticsCompany">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="platformId" column="platform_id" jdbcType="INTEGER"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.qihangerp.module.mapper.OShopMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.domain.OShop">
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.model.entity.OShop">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="type" column="type" jdbcType="INTEGER"/>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.qihangerp.module.mapper.OShopPlatformMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.domain.OShopPlatform">
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.model.entity.OShopPlatform">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="name" column="name" jdbcType="VARCHAR"/>
|
||||
<result property="code" column="code" jdbcType="VARCHAR"/>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.qihangerp.module.mapper.OShopPullLasttimeMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.domain.OShopPullLasttime">
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.model.entity.OShopPullLasttime">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="pullType" column="pull_type" jdbcType="OTHER"/>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.qihangerp.module.mapper.OShopPullLogsMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.domain.OShopPullLogs">
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.model.entity.OShopPullLogs">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="shopId" column="shop_id" jdbcType="INTEGER"/>
|
||||
<result property="shopType" column="shop_type" jdbcType="INTEGER"/>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.qihangerp.module.mapper.SysTaskLogsMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.domain.SysTaskLogs">
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.model.entity.SysTaskLogs">
|
||||
<id property="id" column="id" jdbcType="BIGINT"/>
|
||||
<result property="taskId" column="task_id" jdbcType="INTEGER"/>
|
||||
<result property="result" column="result" jdbcType="VARCHAR"/>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.qihangerp.module.mapper.SysTaskMapper">
|
||||
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.domain.SysTask">
|
||||
<resultMap id="BaseResultMap" type="cn.qihangerp.model.entity.SysTask">
|
||||
<id property="id" column="id" jdbcType="INTEGER"/>
|
||||
<result property="taskName" column="task_name" jdbcType="VARCHAR"/>
|
||||
<result property="cron" column="cron" jdbcType="VARCHAR"/>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.qihangerp.module.mapper.SysDictDataMapper">
|
||||
|
||||
<resultMap type="cn.qihangerp.domain.SysDictData" id="SysDictDataResult">
|
||||
<resultMap type="cn.qihangerp.model.entity.SysDictData" id="SysDictDataResult">
|
||||
<id property="dictCode" column="dict_code" />
|
||||
<result property="dictSort" column="dict_sort" />
|
||||
<result property="dictLabel" column="dict_label" />
|
||||
|
|
@ -25,7 +25,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
from sys_dict_data
|
||||
</sql>
|
||||
|
||||
<select id="selectDictDataList" parameterType="cn.qihangerp.domain.SysDictData" resultMap="SysDictDataResult">
|
||||
<select id="selectDictDataList" parameterType="cn.qihangerp.model.entity.SysDictData" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
<where>
|
||||
<if test="dictType != null and dictType != ''">
|
||||
|
|
@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
order by dict_sort asc
|
||||
</select>
|
||||
|
||||
<select id="selectDictDataByType" parameterType="cn.qihangerp.domain.SysDictData" resultMap="SysDictDataResult">
|
||||
<select id="selectDictDataByType" parameterType="cn.qihangerp.model.entity.SysDictData" resultMap="SysDictDataResult">
|
||||
<include refid="selectDictDataVo"/>
|
||||
where status = '0' and dict_type = #{dictType} order by dict_sort asc
|
||||
</select>
|
||||
|
|
@ -71,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</foreach>
|
||||
</delete>
|
||||
|
||||
<update id="updateDictData" parameterType="cn.qihangerp.domain.SysDictData">
|
||||
<update id="updateDictData" parameterType="cn.qihangerp.model.entity.SysDictData">
|
||||
update sys_dict_data
|
||||
<set>
|
||||
<if test="dictSort != null">dict_sort = #{dictSort},</if>
|
||||
|
|
@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
update sys_dict_data set dict_type = #{newDictType} where dict_type = #{oldDictType}
|
||||
</update>
|
||||
|
||||
<insert id="insertDictData" parameterType="cn.qihangerp.domain.SysDictData">
|
||||
<insert id="insertDictData" parameterType="cn.qihangerp.model.entity.SysDictData">
|
||||
insert into sys_dict_data(
|
||||
<if test="dictSort != null">dict_sort,</if>
|
||||
<if test="dictLabel != null and dictLabel != ''">dict_label,</if>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.qihangerp.module.mapper.SysRoleMapper">
|
||||
|
||||
<resultMap type="cn.qihangerp.domain.SysRole" id="SysRoleResult">
|
||||
<resultMap type="cn.qihangerp.model.entity.SysRole" id="SysRoleResult">
|
||||
<id property="roleId" column="role_id" />
|
||||
<result property="roleName" column="role_name" />
|
||||
<result property="roleKey" column="role_key" />
|
||||
|
|
@ -30,7 +30,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
</sql>
|
||||
|
||||
<select id="selectRoleList" parameterType="cn.qihangerp.domain.SysRole" resultMap="SysRoleResult">
|
||||
<select id="selectRoleList" parameterType="cn.qihangerp.model.entity.SysRole" resultMap="SysRoleResult">
|
||||
<include refid="selectRoleVo"/>
|
||||
where r.del_flag = '0'
|
||||
<if test="roleId != null and roleId != 0">
|
||||
|
|
@ -93,7 +93,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertRole" parameterType="cn.qihangerp.domain.SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
||||
<insert id="insertRole" parameterType="cn.qihangerp.model.entity.SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
||||
insert into sys_role(
|
||||
<if test="roleId != null and roleId != 0">role_id,</if>
|
||||
<if test="roleName != null and roleName != ''">role_name,</if>
|
||||
|
|
@ -121,7 +121,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateRole" parameterType="cn.qihangerp.domain.SysRole">
|
||||
<update id="updateRole" parameterType="cn.qihangerp.model.entity.SysRole">
|
||||
update sys_role
|
||||
<set>
|
||||
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="cn.qihangerp.module.mapper.SysUserMapper">
|
||||
|
||||
<resultMap type="cn.qihangerp.domain.SysUser" id="SysUserResult">
|
||||
<resultMap type="cn.qihangerp.model.entity.SysUser" id="SysUserResult">
|
||||
<id property="userId" column="user_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="userName" column="user_name" />
|
||||
|
|
@ -38,7 +38,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<!-- from sys_user u-->
|
||||
<!-- </sql>-->
|
||||
|
||||
<select id="selectUserList" parameterType="cn.qihangerp.domain.SysUser" resultMap="SysUserResult">
|
||||
<select id="selectUserList" parameterType="cn.qihangerp.model.entity.SysUser" resultMap="SysUserResult">
|
||||
select u.user_id, u.dept_id, u.nick_name, u.user_name, u.email, u.avatar, u.phonenumber, u.sex, u.status, u.del_flag, u.login_ip, u.login_date, u.create_by, u.create_time, u.remark, d.dept_name, d.leader from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
where u.del_flag = '0'
|
||||
|
|
@ -67,7 +67,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectAllocatedList" parameterType="cn.qihangerp.domain.SysUser" resultMap="SysUserResult">
|
||||
<select id="selectAllocatedList" parameterType="cn.qihangerp.model.entity.SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
|
|
@ -84,7 +84,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
${params.dataScope}
|
||||
</select>
|
||||
|
||||
<select id="selectUnallocatedList" parameterType="cn.qihangerp.domain.SysUser" resultMap="SysUserResult">
|
||||
<select id="selectUnallocatedList" parameterType="cn.qihangerp.model.entity.SysUser" resultMap="SysUserResult">
|
||||
select distinct u.user_id, u.dept_id, u.user_name, u.nick_name, u.email, u.phonenumber, u.status, u.create_time
|
||||
from sys_user u
|
||||
left join sys_dept d on u.dept_id = d.dept_id
|
||||
|
|
@ -124,7 +124,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
select user_id, email from sys_user where email = #{email} and del_flag = '0' limit 1
|
||||
</select>
|
||||
|
||||
<insert id="insertUser" parameterType="cn.qihangerp.domain.SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
<insert id="insertUser" parameterType="cn.qihangerp.model.entity.SysUser" useGeneratedKeys="true" keyProperty="userId">
|
||||
insert into sys_user(
|
||||
<if test="userId != null and userId != 0">user_id,</if>
|
||||
<if test="deptId != null and deptId != 0">dept_id,</if>
|
||||
|
|
@ -156,7 +156,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
)
|
||||
</insert>
|
||||
|
||||
<update id="updateUser" parameterType="cn.qihangerp.domain.SysUser">
|
||||
<update id="updateUser" parameterType="cn.qihangerp.model.entity.SysUser">
|
||||
update sys_user
|
||||
<set>
|
||||
<if test="deptId != null and deptId != 0">dept_id = #{deptId},</if>
|
||||
|
|
@ -177,15 +177,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserStatus" parameterType="cn.qihangerp.domain.SysUser">
|
||||
<update id="updateUserStatus" parameterType="cn.qihangerp.model.entity.SysUser">
|
||||
update sys_user set status = #{status} where user_id = #{userId}
|
||||
</update>
|
||||
|
||||
<update id="updateUserAvatar" parameterType="cn.qihangerp.domain.SysUser">
|
||||
<update id="updateUserAvatar" parameterType="cn.qihangerp.model.entity.SysUser">
|
||||
update sys_user set avatar = #{avatar} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
<update id="resetUserPwd" parameterType="cn.qihangerp.domain.SysUser">
|
||||
<update id="resetUserPwd" parameterType="cn.qihangerp.model.entity.SysUser">
|
||||
update sys_user set password = #{password} where user_name = #{userName}
|
||||
</update>
|
||||
|
||||
|
|
|
|||
1
pom.xml
1
pom.xml
|
|
@ -14,6 +14,7 @@
|
|||
<module>core</module>
|
||||
<module>module</module>
|
||||
<module>microservices</module>
|
||||
<module>core/model</module>
|
||||
|
||||
</modules>
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
Before Width: | Height: | Size: 509 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 137 KiB |
Binary file not shown.
|
After Width: | Height: | Size: 6.2 KiB |
|
|
@ -51,7 +51,7 @@ const user = {
|
|||
return new Promise((resolve, reject) => {
|
||||
getInfo().then(res => {
|
||||
const user = res.user
|
||||
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.jpg") : process.env.VUE_APP_BASE_API + user.avatar;
|
||||
const avatar = (user.avatar == "" || user.avatar == null) ? require("@/assets/images/profile.gif") : process.env.VUE_APP_BASE_API + user.avatar;
|
||||
if (res.roles && res.roles.length > 0) { // 验证返回的roles是否是一个非空数组
|
||||
commit('SET_ROLES', res.roles)
|
||||
commit('SET_PERMISSIONS', res.permissions)
|
||||
|
|
|
|||
|
|
@ -1,98 +0,0 @@
|
|||
<template>
|
||||
<div class="dashboard-editor-container">
|
||||
|
||||
<panel-group @handleSetLineChartData="handleSetLineChartData" />
|
||||
|
||||
<el-row style="background:#fff;padding:16px 16px 0;margin-bottom:32px;">
|
||||
<line-chart :chart-data="lineChartData" />
|
||||
</el-row>
|
||||
|
||||
<el-row :gutter="32">
|
||||
<el-col :xs="24" :sm="24" :lg="8">
|
||||
<div class="chart-wrapper">
|
||||
<raddar-chart />
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :lg="8">
|
||||
<div class="chart-wrapper">
|
||||
<pie-chart />
|
||||
</div>
|
||||
</el-col>
|
||||
<el-col :xs="24" :sm="24" :lg="8">
|
||||
<div class="chart-wrapper">
|
||||
<bar-chart />
|
||||
</div>
|
||||
</el-col>
|
||||
</el-row>
|
||||
|
||||
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import PanelGroup from './dashboard/PanelGroup'
|
||||
import LineChart from './dashboard/LineChart'
|
||||
import RaddarChart from './dashboard/RaddarChart'
|
||||
import PieChart from './dashboard/PieChart'
|
||||
import BarChart from './dashboard/BarChart'
|
||||
|
||||
const lineChartData = {
|
||||
newVisitis: {
|
||||
expectedData: [100, 120, 161, 134, 105, 160, 165],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 145]
|
||||
},
|
||||
messages: {
|
||||
expectedData: [200, 192, 120, 144, 160, 130, 140],
|
||||
actualData: [180, 160, 151, 106, 145, 150, 130]
|
||||
},
|
||||
purchases: {
|
||||
expectedData: [80, 100, 121, 104, 105, 90, 100],
|
||||
actualData: [120, 90, 100, 138, 142, 130, 130]
|
||||
},
|
||||
shoppings: {
|
||||
expectedData: [130, 140, 141, 142, 145, 150, 160],
|
||||
actualData: [120, 82, 91, 154, 162, 140, 130]
|
||||
}
|
||||
}
|
||||
|
||||
export default {
|
||||
name: 'Index',
|
||||
components: {
|
||||
PanelGroup,
|
||||
LineChart,
|
||||
RaddarChart,
|
||||
PieChart,
|
||||
BarChart
|
||||
},
|
||||
data() {
|
||||
return {
|
||||
lineChartData: lineChartData.newVisitis
|
||||
}
|
||||
},
|
||||
methods: {
|
||||
handleSetLineChartData(type) {
|
||||
this.lineChartData = lineChartData[type]
|
||||
}
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
<style lang="scss" scoped>
|
||||
.dashboard-editor-container {
|
||||
padding: 32px;
|
||||
background-color: rgb(240, 242, 245);
|
||||
position: relative;
|
||||
|
||||
.chart-wrapper {
|
||||
background: #fff;
|
||||
padding: 16px 16px 0;
|
||||
margin-bottom: 32px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width:1024px) {
|
||||
.chart-wrapper {
|
||||
padding: 8px;
|
||||
}
|
||||
}
|
||||
</style>
|
||||
|
|
@ -1,207 +0,0 @@
|
|||
<template>
|
||||
<div class="login">
|
||||
<el-form ref="loginForm" :model="loginForm" :rules="loginRules" class="login-form">
|
||||
<h3 class="title">启航电商ERP系统</h3>
|
||||
<el-form-item prop="username">
|
||||
<el-input
|
||||
v-model="loginForm.username"
|
||||
type="text"
|
||||
auto-complete="off"
|
||||
placeholder="账号"
|
||||
>
|
||||
<svg-icon slot="prefix" icon-class="user" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="password">
|
||||
<el-input
|
||||
v-model="loginForm.password"
|
||||
type="password"
|
||||
auto-complete="off"
|
||||
placeholder="密码"
|
||||
@keyup.enter.native="handleLogin"
|
||||
>
|
||||
<svg-icon slot="prefix" icon-class="password" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
</el-form-item>
|
||||
<el-form-item prop="code" v-if="captchaEnabled">
|
||||
<el-input
|
||||
v-model="loginForm.code"
|
||||
auto-complete="off"
|
||||
placeholder="验证码"
|
||||
style="width: 63%"
|
||||
@keyup.enter.native="handleLogin"
|
||||
>
|
||||
<svg-icon slot="prefix" icon-class="validCode" class="el-input__icon input-icon" />
|
||||
</el-input>
|
||||
<div class="login-code">
|
||||
<img :src="codeUrl" @click="getCode" class="login-code-img"/>
|
||||
</div>
|
||||
</el-form-item>
|
||||
<el-checkbox v-model="loginForm.rememberMe" style="margin:0px 0px 25px 0px;">记住密码</el-checkbox>
|
||||
<el-form-item style="width:100%;">
|
||||
<el-button
|
||||
:loading="loading"
|
||||
size="medium"
|
||||
type="primary"
|
||||
style="width:100%;"
|
||||
@click.native.prevent="handleLogin"
|
||||
>
|
||||
<span v-if="!loading">登 录</span>
|
||||
<span v-else>登 录 中...</span>
|
||||
</el-button>
|
||||
|
||||
</el-form-item>
|
||||
</el-form>
|
||||
<!-- 底部 -->
|
||||
<div class="el-login-footer">
|
||||
<span>Copyright © 2023-2024 qihangec.tech All Rights Reserved.</span>
|
||||
</div>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import Cookies from "js-cookie";
|
||||
import { encrypt, decrypt } from '@/utils/jsencrypt'
|
||||
|
||||
export default {
|
||||
name: "Login",
|
||||
data() {
|
||||
return {
|
||||
codeUrl: "",
|
||||
loginForm: {
|
||||
username: "admin",
|
||||
password: "admin123",
|
||||
rememberMe: false,
|
||||
code: "",
|
||||
uuid: ""
|
||||
},
|
||||
loginRules: {
|
||||
username: [
|
||||
{ required: true, trigger: "blur", message: "请输入您的账号" }
|
||||
],
|
||||
password: [
|
||||
{ required: true, trigger: "blur", message: "请输入您的密码" }
|
||||
],
|
||||
code: [{ required: true, trigger: "change", message: "请输入验证码" }]
|
||||
},
|
||||
loading: false,
|
||||
// 验证码开关
|
||||
captchaEnabled: false,
|
||||
// 注册开关
|
||||
register: false,
|
||||
redirect: undefined
|
||||
};
|
||||
},
|
||||
watch: {
|
||||
$route: {
|
||||
handler: function(route) {
|
||||
this.redirect = route.query && route.query.redirect;
|
||||
},
|
||||
immediate: true
|
||||
}
|
||||
},
|
||||
created() {
|
||||
// this.getCode();
|
||||
this.getCookie();
|
||||
},
|
||||
methods: {
|
||||
getCookie() {
|
||||
const username = Cookies.get("username");
|
||||
const password = Cookies.get("password");
|
||||
const rememberMe = Cookies.get('rememberMe')
|
||||
this.loginForm = {
|
||||
username: username === undefined ? this.loginForm.username : username,
|
||||
password: password === undefined ? this.loginForm.password : decrypt(password),
|
||||
rememberMe: rememberMe === undefined ? false : Boolean(rememberMe)
|
||||
};
|
||||
},
|
||||
handleLogin() {
|
||||
this.$refs.loginForm.validate(valid => {
|
||||
if (valid) {
|
||||
this.loading = true;
|
||||
if (this.loginForm.rememberMe) {
|
||||
Cookies.set("username", this.loginForm.username, { expires: 30 });
|
||||
Cookies.set("password", encrypt(this.loginForm.password), { expires: 30 });
|
||||
Cookies.set('rememberMe', this.loginForm.rememberMe, { expires: 30 });
|
||||
} else {
|
||||
Cookies.remove("username");
|
||||
Cookies.remove("password");
|
||||
Cookies.remove('rememberMe');
|
||||
}
|
||||
this.$store.dispatch("Login", this.loginForm).then(() => {
|
||||
this.$router.push({ path: this.redirect || "/" }).catch(()=>{});
|
||||
}).catch(() => {
|
||||
this.loading = false;
|
||||
if (this.captchaEnabled) {
|
||||
this.getCode();
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
</script>
|
||||
|
||||
<style rel="stylesheet/scss" lang="scss">
|
||||
.login {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
height: 100%;
|
||||
background-image: url("../assets/images/login-background.jpg");
|
||||
background-size: cover;
|
||||
}
|
||||
.title {
|
||||
margin: 0px auto 30px auto;
|
||||
text-align: center;
|
||||
color: #707070;
|
||||
}
|
||||
|
||||
.login-form {
|
||||
border-radius: 6px;
|
||||
background: #ffffff;
|
||||
width: 400px;
|
||||
padding: 25px 25px 5px 25px;
|
||||
.el-input {
|
||||
height: 38px;
|
||||
input {
|
||||
height: 38px;
|
||||
}
|
||||
}
|
||||
.input-icon {
|
||||
height: 39px;
|
||||
width: 14px;
|
||||
margin-left: 2px;
|
||||
}
|
||||
}
|
||||
.login-tip {
|
||||
font-size: 13px;
|
||||
text-align: center;
|
||||
color: #bfbfbf;
|
||||
}
|
||||
.login-code {
|
||||
width: 33%;
|
||||
height: 38px;
|
||||
float: right;
|
||||
img {
|
||||
cursor: pointer;
|
||||
vertical-align: middle;
|
||||
}
|
||||
}
|
||||
.el-login-footer {
|
||||
height: 40px;
|
||||
line-height: 40px;
|
||||
position: fixed;
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
color: #fff;
|
||||
font-family: Arial;
|
||||
font-size: 12px;
|
||||
letter-spacing: 1px;
|
||||
}
|
||||
.login-code-img {
|
||||
height: 38px;
|
||||
}
|
||||
</style>
|
||||
Loading…
Reference in New Issue