Browse Source

1 分堆配置

2 系统配置
main
xbw 1 year ago
parent
commit
275f6b8019
  1. 15
      jnpf-library/jnpf-library-biz/src/main/java/jnpf/mapper/TBunchingMapper.java
  2. 17
      jnpf-library/jnpf-library-biz/src/main/java/jnpf/mapper/TSystemConfigurationMapper.java
  3. 23
      jnpf-library/jnpf-library-biz/src/main/java/jnpf/service/TBunchingService.java
  4. 21
      jnpf-library/jnpf-library-biz/src/main/java/jnpf/service/TSystemConfigurationService.java
  5. 6
      jnpf-library/jnpf-library-biz/src/main/java/jnpf/service/TUserForLibraryService.java
  6. 71
      jnpf-library/jnpf-library-biz/src/main/java/jnpf/service/impl/TBunchingServiceImpl.java
  7. 77
      jnpf-library/jnpf-library-biz/src/main/java/jnpf/service/impl/TSystemConfigurationServiceImpl.java
  8. 12
      jnpf-library/jnpf-library-biz/src/main/java/jnpf/service/impl/TUserForLibraryServiceImpl.java
  9. 38
      jnpf-library/jnpf-library-biz/src/main/resources/mapper/TBunching.xml
  10. 38
      jnpf-library/jnpf-library-biz/src/main/resources/mapper/TSystemConfiguration.xml
  11. 4
      jnpf-library/jnpf-library-biz/src/main/resources/mapper/TUserForLibraryMapper.xml
  12. 51
      jnpf-library/jnpf-library-controller/src/main/java/jnpf/controller/TBunchingController.java
  13. 51
      jnpf-library/jnpf-library-controller/src/main/java/jnpf/controller/TSystemConfigurationController.java
  14. 52
      jnpf-library/jnpf-library-controller/src/main/java/jnpf/controller/TUserForLibraryController.java
  15. 84
      jnpf-library/jnpf-library-entity/src/main/java/jnpf/entity/TBunching.java
  16. 84
      jnpf-library/jnpf-library-entity/src/main/java/jnpf/entity/TSystemConfiguration.java
  17. 50
      jnpf-library/jnpf-library-entity/src/main/java/jnpf/model/dto/TBunchingDto.java
  18. 49
      jnpf-library/jnpf-library-entity/src/main/java/jnpf/model/dto/TSystemConfigurationDto.java
  19. 4
      jnpf-library/jnpf-library-entity/src/main/java/jnpf/model/dto/TUserForLibraryDto.java

15
jnpf-library/jnpf-library-biz/src/main/java/jnpf/mapper/TBunchingMapper.java

@ -0,0 +1,15 @@ @@ -0,0 +1,15 @@
package jnpf.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import jnpf.entity.TBunching;
import jnpf.model.dto.TBunchingDto;
/**
* @author xbw
*/
public interface TBunchingMapper extends BaseMapper<TBunching> {
IPage<TBunching> selectList(IPage<TBunching> page, TBunchingDto.TBunchingDtoParam param);
}

17
jnpf-library/jnpf-library-biz/src/main/java/jnpf/mapper/TSystemConfigurationMapper.java

@ -0,0 +1,17 @@ @@ -0,0 +1,17 @@
package jnpf.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import jnpf.entity.TSystemConfiguration;
import jnpf.entity.TUserForLibrary;
import jnpf.model.dto.TSystemConfigurationDto;
import jnpf.model.dto.TUserForLibraryDto;
/**
* @author xbw
*/
public interface TSystemConfigurationMapper extends BaseMapper<TSystemConfiguration> {
IPage<TSystemConfiguration> selectList(IPage<TSystemConfiguration> page, TSystemConfigurationDto.TSystemConfigurationDtoParam param);
}

23
jnpf-library/jnpf-library-biz/src/main/java/jnpf/service/TBunchingService.java

@ -0,0 +1,23 @@ @@ -0,0 +1,23 @@
package jnpf.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.entity.TBunching;
import jnpf.entity.TSystemConfiguration;
import jnpf.model.dto.TBunchingDto;
import jnpf.model.dto.TSystemConfigurationDto;
/**
* @author xbw
*/
public interface TBunchingService extends IService<TBunching> {
void addOrUpdate(TBunchingDto.TBunchingDtoAddOrUpdate bunchingDtoAddOrUpdate);
void del(TBunchingDto.TBunchingDtoDel del);
IPage<TBunching> selectList(TBunchingDto.TBunchingDtoParam param);
}

21
jnpf-library/jnpf-library-biz/src/main/java/jnpf/service/TSystemConfigurationService.java

@ -0,0 +1,21 @@ @@ -0,0 +1,21 @@
package jnpf.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import jnpf.entity.TSystemConfiguration;
import jnpf.model.dto.TSystemConfigurationDto;
/**
* @author xbw
*/
public interface TSystemConfigurationService extends IService<TSystemConfiguration> {
void addOrUpdate(TSystemConfigurationDto.TSystemConfigurationDtoAdd tSystemConfigurationDtoAdd);
void del(TSystemConfigurationDto.TSystemConfigurationDtoDel configurationDtoDel);
IPage<TSystemConfiguration> selectList(TSystemConfigurationDto.TSystemConfigurationDtoParam param);
}

6
jnpf-library/jnpf-library-biz/src/main/java/jnpf/service/TUserForLibraryService.java

@ -11,11 +11,11 @@ import jnpf.model.dto.TUserForLibraryDto; @@ -11,11 +11,11 @@ import jnpf.model.dto.TUserForLibraryDto;
*/
public interface TUserForLibraryService extends IService<TUserForLibrary>{
void addOrUpdateUser(TUserForLibraryDto.TUserForLibraryDtoAdd tUserForLibraryDtoAdd);
void addOrUpdate(TUserForLibraryDto.TUserForLibraryDtoAdd tUserForLibraryDtoAdd);
void delUser(TUserForLibraryDto.TUserForLibraryDtoDel userForLibraryDtoDel);
void del(TUserForLibraryDto.TUserForLibraryDtoDel userForLibraryDtoDel);
IPage<TUserForLibrary> getUserLibraryList(TUserForLibraryDto.TUserForLibraryDtoParam param);
IPage<TUserForLibrary> selectList(TUserForLibraryDto.TUserForLibraryDtoParam param);
}

71
jnpf-library/jnpf-library-biz/src/main/java/jnpf/service/impl/TBunchingServiceImpl.java

@ -0,0 +1,71 @@ @@ -0,0 +1,71 @@
package jnpf.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.entity.TBunching;
import jnpf.exception.DataException;
import jnpf.mapper.TBunchingMapper;
import jnpf.model.dto.TBunchingDto;
import jnpf.service.TBunchingService;
import jnpf.util.UserProvider;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
/**
* @author xbw
*/
@Service("iTBunchingService")
@DS("bunching")
public class TBunchingServiceImpl extends ServiceImpl<TBunchingMapper, TBunching> implements TBunchingService {
@Override
public void addOrUpdate(TBunchingDto.TBunchingDtoAddOrUpdate bunchingDtoAddOrUpdate) {
if (StringUtils.isBlank(bunchingDtoAddOrUpdate.getBunchingTo())) {
throw new DataException("分堆去向不能为空");
}
if (bunchingDtoAddOrUpdate.getBunchingNumber() == null) {
throw new DataException("送样数量不能为空");
}
TBunching tBunching = new TBunching();
BeanUtils.copyProperties(bunchingDtoAddOrUpdate, tBunching);
if (bunchingDtoAddOrUpdate.getId() == null) {
tBunching.setCreateName(UserProvider.getUser().getUserName());
tBunching.setCreateBy(UserProvider.getUser().getUserId());
tBunching.setCreateTime(LocalDateTime.now());
this.save(tBunching);
}
tBunching.setUpdateTime(LocalDateTime.now());
tBunching.setUpdateBy(UserProvider.getUser().getUserName());
tBunching.setUpdateName(UserProvider.getUser().getUserId());
this.updateById(tBunching);
}
@Override
public void del(TBunchingDto.TBunchingDtoDel del) {
if (del.getId() == null) {
throw new DataException("请传入系统参数id");
}
TBunching byId = this.getById(del.getId());
if (byId == null || byId.getDelFlag() == 1) {
throw new DataException("不存在或已删除");
}
byId.setDelFlag(1);
this.updateById(byId);
}
@Override
public IPage<TBunching> selectList(TBunchingDto.TBunchingDtoParam param) {
return this.baseMapper.selectList(new Page<>(param.getCurrent(), param.getSize()), param);
}
}

77
jnpf-library/jnpf-library-biz/src/main/java/jnpf/service/impl/TSystemConfigurationServiceImpl.java

@ -0,0 +1,77 @@ @@ -0,0 +1,77 @@
package jnpf.service.impl;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import jnpf.entity.TSystemConfiguration;
import jnpf.exception.DataException;
import jnpf.mapper.TSystemConfigurationMapper;
import jnpf.model.dto.TSystemConfigurationDto;
import jnpf.service.TSystemConfigurationService;
import jnpf.util.UserProvider;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import java.time.LocalDateTime;
/**
* @author xbw
*/
@Service("iTSystemConfigurationService")
@DS("systemConfiguration")
public class TSystemConfigurationServiceImpl extends ServiceImpl<TSystemConfigurationMapper, TSystemConfiguration> implements TSystemConfigurationService {
@Override
public void addOrUpdate(TSystemConfigurationDto.TSystemConfigurationDtoAdd tSystemConfigurationDtoAdd) {
if (StringUtils.isBlank(tSystemConfigurationDtoAdd.getSystemParameter())) {
throw new DataException("系统参数不能为空");
}
if (StringUtils.isBlank(tSystemConfigurationDtoAdd.getSystemParameterValue())) {
throw new DataException("系统参数值不能为空");
}
if (StringUtils.isBlank(tSystemConfigurationDtoAdd.getSystemParameterRemark())) {
throw new DataException("系统参数说明不能为空");
}
TSystemConfiguration tSystemConfiguration = new TSystemConfiguration();
BeanUtils.copyProperties(tSystemConfigurationDtoAdd, tSystemConfiguration);
if (tSystemConfigurationDtoAdd.getId() == null) {
BeanUtils.copyProperties(tSystemConfigurationDtoAdd, tSystemConfiguration);
tSystemConfiguration.setCreateTime(LocalDateTime.now());
tSystemConfiguration.setCreateName(UserProvider.getUser().getUserName());
tSystemConfiguration.setCreateBy(UserProvider.getUser().getUserId());
this.save(tSystemConfiguration);
return;
}
tSystemConfiguration.setUpdateTime(LocalDateTime.now());
tSystemConfiguration.setUpdateBy(UserProvider.getUser().getUserName());
tSystemConfiguration.setUpdateName(UserProvider.getUser().getUserId());
this.updateById(tSystemConfiguration);
}
@Override
public void del(TSystemConfigurationDto.TSystemConfigurationDtoDel configurationDtoDel) {
if (configurationDtoDel.getId() == null) {
throw new DataException("请传入系统参数id");
}
TSystemConfiguration byId = this.getById(configurationDtoDel.getId());
if(byId==null||byId.getDelFlag()==1){
throw new DataException("不存在或已删除");
}
byId.setDelFlag(1);
this.updateById(byId);
}
@Override
public IPage<TSystemConfiguration> selectList(TSystemConfigurationDto.TSystemConfigurationDtoParam param) {
return this.baseMapper.selectList(new Page<>(param.getCurrent(), param.getSize()), param);
}
}

12
jnpf-library/jnpf-library-biz/src/main/java/jnpf/service/impl/TUserForLibraryServiceImpl.java

@ -28,7 +28,7 @@ public class TUserForLibraryServiceImpl extends ServiceImpl<TUserForLibraryMappe @@ -28,7 +28,7 @@ public class TUserForLibraryServiceImpl extends ServiceImpl<TUserForLibraryMappe
@Override
public void addOrUpdateUser(TUserForLibraryDto.TUserForLibraryDtoAdd tUserForLibraryDtoAdd) {
public void addOrUpdate(TUserForLibraryDto.TUserForLibraryDtoAdd tUserForLibraryDtoAdd) {
if (StringUtils.isBlank(tUserForLibraryDtoAdd.getUserName())) {
throw new DataException("用户姓名不正确");
}
@ -42,11 +42,10 @@ public class TUserForLibraryServiceImpl extends ServiceImpl<TUserForLibraryMappe @@ -42,11 +42,10 @@ public class TUserForLibraryServiceImpl extends ServiceImpl<TUserForLibraryMappe
throw new DataException("用户类型不正确");
}
TUserForLibrary tUserForLibrary = new TUserForLibrary();
BeanUtils.copyProperties(tUserForLibraryDtoAdd, tUserForLibrary);
if (tUserForLibraryDtoAdd.getId() == null) {
// 外部用户
BeanUtils.copyProperties(tUserForLibraryDtoAdd, tUserForLibrary);
tUserForLibrary.setCreateTime(LocalDateTime.now());
tUserForLibrary.setUpdateTime(LocalDateTime.now());
tUserForLibrary.setCreateName(UserProvider.getUser().getUserName());
tUserForLibrary.setCreateBy(UserProvider.getUser().getUserId());
this.save(tUserForLibrary);
@ -62,18 +61,21 @@ public class TUserForLibraryServiceImpl extends ServiceImpl<TUserForLibraryMappe @@ -62,18 +61,21 @@ public class TUserForLibraryServiceImpl extends ServiceImpl<TUserForLibraryMappe
}
@Override
public void delUser(TUserForLibraryDto.TUserForLibraryDtoDel userForLibraryDtoDel) {
public void del(TUserForLibraryDto.TUserForLibraryDtoDel userForLibraryDtoDel) {
if (userForLibraryDtoDel.getId() == null) {
throw new DataException("请传入用户id");
}
TUserForLibrary byId = this.getById(userForLibraryDtoDel.getId());
if(byId==null||byId.getDelFlag()==1){
throw new DataException("不存在或已删除");
}
byId.setDelFlag(1);
this.updateById(byId);
}
@Override
public IPage<TUserForLibrary> getUserLibraryList(TUserForLibraryDto.TUserForLibraryDtoParam param) {
public IPage<TUserForLibrary> selectList(TUserForLibraryDto.TUserForLibraryDtoParam param) {
return this.baseMapper.selectList(new Page<>(param.getCurrent(), param.getSize()), param);
}
}

38
jnpf-library/jnpf-library-biz/src/main/resources/mapper/TBunching.xml

@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
<?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="jnpf.mapper.TBunchingMapper">
<resultMap type="jnpf.entity.TBunching" id="TBunchingMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="bunchingTo" column="bunching_to"/>
<result property="bunchingRemark" column="bunching_remark"/>
<result property="bunchingNumber" column="bunching_number"/>
<result property="createBy" column="create_by"/>
<result property="updateBy" column="update_by"/>
<result property="updateName" column="update_name"/>
<result property="updateTime" column="update_time"/>
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="createName" column="create_name" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,bunching_to,bunching_remark,bunching_number,
create_by,update_by,update_name,update_time,del_flag,
create_time,create_name
</sql>
<select id="selectList" resultMap="TBunchingMap">
select
<include refid="Base_Column_List"/>
from t_bunching
<where>
<if test="bunchingTo!='' and bunchingTo != null">
and bunching_to like concat('%',#{bunchingTo},'%')
</if>
and del_flag = 0
</where>
</select>
</mapper>

38
jnpf-library/jnpf-library-biz/src/main/resources/mapper/TSystemConfiguration.xml

@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
<?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="jnpf.mapper.TSystemConfigurationMapper">
<resultMap type="jnpf.entity.TSystemConfiguration" id="TSystemConfigurationMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="systemParameter" column="system_parameter"/>
<result property="systemParameterRemark" column="system_parameter_remark"/>
<result property="systemParameterValue" column="system_parameter_value"/>
<result property="createBy" column="create_by"/>
<result property="updateBy" column="update_by"/>
<result property="updateName" column="update_name"/>
<result property="updateTime" column="update_time"/>
<result property="delFlag" column="del_flag" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="createName" column="create_name" jdbcType="VARCHAR"/>
</resultMap>
<sql id="Base_Column_List">
id,system_parameter,system_parameter_remark,system_parameter_value,
create_by,update_by,update_name,update_time,del_flag,
create_time,create_name
</sql>
<select id="selectList" resultMap="TSystemConfigurationMap">
select
<include refid="Base_Column_List"/>
from t_system_configuration
<where>
<if test="systemParameter!='' and systemParameter != null">
and system_parameter like concat('%',#{systemParameter},'%')
</if>
and del_flag = 0
</where>
</select>
</mapper>

4
jnpf-library/jnpf-library-biz/src/main/resources/mapper/TUserForLibraryMapper.xml

@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="jnpf.mapper.TUserForLibraryMapper">
<resultMap type="jnpf.entity.TUserForLibrary" id="TSelectionOrderingBooksMap">
<resultMap type="jnpf.entity.TUserForLibrary" id="TUserForLibraryMap">
<result property="id" column="id" jdbcType="INTEGER"/>
<result property="userName" column="user_name"/>
<result property="idNumber" column="id_number"/>
@ -26,7 +26,7 @@ @@ -26,7 +26,7 @@
create_by,update_by,update_name,update_time,del_flag,
create_time,create_name
</sql>
<select id="selectList" resultMap="TSelectionOrderingBooksMap">
<select id="selectList" resultMap="TUserForLibraryMap">
select
<include refid="Base_Column_List"/>
from t_user_for_library

51
jnpf-library/jnpf-library-controller/src/main/java/jnpf/controller/TBunchingController.java

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
package jnpf.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult;
import jnpf.constant.MsgCode;
import jnpf.entity.TBunching;
import jnpf.model.dto.TBunchingDto;
import jnpf.service.TBunchingService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author xbw
*/
@RestController
@Api("分堆管理")
@Tag(name = "分堆管理", description = "bunching")
@RequestMapping("/bunching")
@AllArgsConstructor
public class TBunchingController {
private final TBunchingService tBunchingService;
@Operation(summary = "分堆新增|修改")
@PostMapping("newOrUpdateBunching")
public ActionResult<Void> newOrUpdateUserForLibrary(@RequestBody TBunchingDto.TBunchingDtoAddOrUpdate param) {
tBunchingService.addOrUpdate(param);
return ActionResult.success(MsgCode.SU000.get());
}
@Operation(summary = "分堆删除")
@PostMapping("delBunching")
public ActionResult<Void> delUserForLibrary(@RequestBody TBunchingDto.TBunchingDtoDel tBunchingDtoDel) {
tBunchingService.del(tBunchingDtoDel);
return ActionResult.success(MsgCode.SU000.get());
}
@Operation(summary = "分堆查询")
@PostMapping("selectList")
public ActionResult<IPage<TBunching>> selectList(@RequestBody TBunchingDto.TBunchingDtoParam param) {
return ActionResult.success(MsgCode.SU000.get(), tBunchingService.selectList(param));
}
}

51
jnpf-library/jnpf-library-controller/src/main/java/jnpf/controller/TSystemConfigurationController.java

@ -0,0 +1,51 @@ @@ -0,0 +1,51 @@
package jnpf.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult;
import jnpf.constant.MsgCode;
import jnpf.entity.TSystemConfiguration;
import jnpf.model.dto.TSystemConfigurationDto;
import jnpf.service.TSystemConfigurationService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author xbw
*/
@RestController
@Api("系统配置管理")
@Tag(name = "系统配置管理", description = "systemConfiguration")
@RequestMapping("/systemConfiguration")
@AllArgsConstructor
public class TSystemConfigurationController {
private final TSystemConfigurationService tSystemConfigurationService;
@Operation(summary = "系统配置新增")
@PostMapping("newOrUpdateSystemConfiguration")
public ActionResult<Void> newOrUpdateSystemConfiguration(@RequestBody TSystemConfigurationDto.TSystemConfigurationDtoAdd tSystemConfigurationDtoAdd) {
tSystemConfigurationService.addOrUpdate(tSystemConfigurationDtoAdd);
return ActionResult.success(MsgCode.SU000.get());
}
@Operation(summary = "系统配置删除")
@PostMapping("delSystemConfiguration")
public ActionResult<Void> delSystemConfiguration(@RequestBody TSystemConfigurationDto.TSystemConfigurationDtoDel configurationDtoDel) {
tSystemConfigurationService.del(configurationDtoDel);
return ActionResult.success(MsgCode.SU000.get());
}
@Operation(summary = "系配置查询")
@PostMapping("selectList")
public ActionResult<IPage<TSystemConfiguration>> selectList(@RequestBody TSystemConfigurationDto.TSystemConfigurationDtoParam param) {
return ActionResult.success(MsgCode.SU000.get(), tSystemConfigurationService.selectList(param));
}
}

52
jnpf-library/jnpf-library-controller/src/main/java/jnpf/controller/TUserForLibraryController.java

@ -0,0 +1,52 @@ @@ -0,0 +1,52 @@
package jnpf.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import io.swagger.annotations.Api;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jnpf.base.ActionResult;
import jnpf.constant.MsgCode;
import jnpf.entity.TUserForLibrary;
import jnpf.model.dto.TUserForLibraryDto;
import jnpf.service.TUserForLibraryService;
import lombok.AllArgsConstructor;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* @author xbw
*/
@RestController
@Api("赠品用户管理")
@Tag(name = "赠品用户管理", description = "userForLibrary")
@RequestMapping("/userForLibrary")
@AllArgsConstructor
public class TUserForLibraryController {
private final TUserForLibraryService tUserForLibraryService;
@Operation(summary = "用户新增")
@PostMapping("newOrUpdateUserForLibrary")
public ActionResult<Void> newOrUpdateUserForLibrary(@RequestBody TUserForLibraryDto.TUserForLibraryDtoAdd param) {
tUserForLibraryService.addOrUpdate(param);
return ActionResult.success(MsgCode.SU000.get());
}
@Operation(summary = "用户删除")
@PostMapping("delUserForLibrary")
public ActionResult<Void> delUserForLibrary(@RequestBody TUserForLibraryDto.TUserForLibraryDtoDel userForLibraryDtoDel) {
tUserForLibraryService.del(userForLibraryDtoDel);
return ActionResult.success(MsgCode.SU000.get());
}
@Operation(summary = "用户查询")
@PostMapping("selectList")
public ActionResult<IPage<TUserForLibrary>> selectList(@RequestBody TUserForLibraryDto.TUserForLibraryDtoParam param) {
return ActionResult.success(MsgCode.SU000.get(),tUserForLibraryService.selectList(param));
}
}

84
jnpf-library/jnpf-library-entity/src/main/java/jnpf/entity/TBunching.java

@ -0,0 +1,84 @@ @@ -0,0 +1,84 @@
package jnpf.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author xbw
*/
@Data
@TableName("t_bunching")
public class TBunching implements Serializable {
private static final long serialVersionUID = -65167281438767901L;
@TableId(type = IdType.ASSIGN_ID)
private Long id;
@ApiModelProperty(value = "分堆去向")
@TableField(value = "bunching_to")
private String bunchingTo;
@ApiModelProperty(value = "分堆说明")
@TableField(value = "bunching_remark")
private String bunchingRemark;
@ApiModelProperty(value = "送阳册数")
@TableField(value = "bunching_number")
private Integer bunchingNumber;
@ApiModelProperty(value = "删除标记0-正常 1-删除")
@TableField(value = "del_flag")
@TableLogic
private Integer delFlag;
@ApiModelProperty(value = "创建者id")
@TableField(value = "create_by")
private String createBy;
@ApiModelProperty(value = "创建者名称")
@TableField(value = "create_name")
private String createName;
@ApiModelProperty(value = "创建时间")
@TableField(value = "create_time",fill = FieldFill.INSERT)
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@ApiModelProperty(value = "更新者id")
@TableField(value = "update_by")
private String updateBy;
@ApiModelProperty(value = "更新者名称")
@TableField(value = "update_name")
private String updateName;
@ApiModelProperty(value = "修改时间")
@TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
@ApiModelProperty(value = "创建人单位名称")
@TableField(value = "create_corp_name")
private String createCorpName;
@ApiModelProperty(value = "创建人单位id")
@TableField(value = "create_corp_id")
private String createCorpId;
@ApiModelProperty(value = "创建人部门名称")
@TableField(value = "create_dept_name")
private String createDeptName;
@ApiModelProperty(value = "创建人部门id")
@TableField(value = "create_dept_id")
private String createDeptId;
}

84
jnpf-library/jnpf-library-entity/src/main/java/jnpf/entity/TSystemConfiguration.java

@ -0,0 +1,84 @@ @@ -0,0 +1,84 @@
package jnpf.entity;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.time.LocalDateTime;
/**
* @author xbw
*/
@Data
@TableName("t_system_configuration")
public class TSystemConfiguration implements Serializable {
private static final long serialVersionUID = -65167281438767901L;
@TableId(type = IdType.ASSIGN_ID)
private Long id;
@ApiModelProperty(value = "系统参数")
@TableField(value = "system_parameter")
private String systemParameter;
@ApiModelProperty(value = "系统参数说明")
@TableField(value = "system_parameter_remark")
private String systemParameterRemark;
@ApiModelProperty(value = "系统参数值")
@TableField(value = "system_parameter_value")
private String systemParameterValue;
@ApiModelProperty(value = "删除标记0-正常 1-删除")
@TableField(value = "del_flag")
@TableLogic
private Integer delFlag;
@ApiModelProperty(value = "创建者id")
@TableField(value = "create_by")
private String createBy;
@ApiModelProperty(value = "创建者名称")
@TableField(value = "create_name")
private String createName;
@ApiModelProperty(value = "创建时间")
@TableField(value = "create_time",fill = FieldFill.INSERT)
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime createTime;
@ApiModelProperty(value = "更新者id")
@TableField(value = "update_by")
private String updateBy;
@ApiModelProperty(value = "更新者名称")
@TableField(value = "update_name")
private String updateName;
@ApiModelProperty(value = "修改时间")
@TableField(value = "update_time",fill = FieldFill.INSERT_UPDATE)
@JsonFormat(timezone = "GMT+8", pattern = "yyyy-MM-dd HH:mm:ss")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private LocalDateTime updateTime;
@ApiModelProperty(value = "创建人单位名称")
@TableField(value = "create_corp_name")
private String createCorpName;
@ApiModelProperty(value = "创建人单位id")
@TableField(value = "create_corp_id")
private String createCorpId;
@ApiModelProperty(value = "创建人部门名称")
@TableField(value = "create_dept_name")
private String createDeptName;
@ApiModelProperty(value = "创建人部门id")
@TableField(value = "create_dept_id")
private String createDeptId;
}

50
jnpf-library/jnpf-library-entity/src/main/java/jnpf/model/dto/TBunchingDto.java

@ -0,0 +1,50 @@ @@ -0,0 +1,50 @@
package jnpf.model.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author xbw
*/
public class TBunchingDto {
private TBunchingDto() {
}
@Data
public static class TBunchingDtoParam extends TBunchingDtoBasePageParam {
@ApiModelProperty(value = "分堆去向")
private String bunchingTo;
}
@Data
public static class TBunchingDtoBasePageParam {
@ApiModelProperty("当前页")
private Integer current = 1;
@ApiModelProperty("页大小")
private Integer size = 10;
}
@Data
public static class TBunchingDtoDel {
@ApiModelProperty(value = "分堆id")
private Long id;
}
@Data
public static class TBunchingDtoAddOrUpdate {
@ApiModelProperty(value = "分堆id 新增不传")
private Long id;
@ApiModelProperty(value = "分堆去向")
private String bunchingTo;
@ApiModelProperty(value = "分堆说明")
private String bunchingRemark;
@ApiModelProperty(value = "送阳册数")
private Integer bunchingNumber;
}
}

49
jnpf-library/jnpf-library-entity/src/main/java/jnpf/model/dto/TSystemConfigurationDto.java

@ -0,0 +1,49 @@ @@ -0,0 +1,49 @@
package jnpf.model.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @author xbw
*/
public class TSystemConfigurationDto {
private TSystemConfigurationDto(){}
@Data
public static class TSystemConfigurationDtoParam extends TSystemConfigurationDtoBasePageParam{
@ApiModelProperty(value = "系统参数")
private String systemParameter;
}
@Data
public static class TSystemConfigurationDtoBasePageParam {
@ApiModelProperty("当前页")
private Integer current = 1;
@ApiModelProperty("页大小")
private Integer size = 10;
}
@Data
public static class TSystemConfigurationDtoDel {
@ApiModelProperty(value = "用户id")
private Long id;
}
@Data
public static class TSystemConfigurationDtoAdd {
@ApiModelProperty(value = "用户id 新增不传")
private Long id;
@ApiModelProperty(value = "系统参数")
private String systemParameter;
@ApiModelProperty(value = "系统参数说明")
private String systemParameterRemark;
@ApiModelProperty(value = "系统参数值")
private String systemParameterValue;
}
}

4
jnpf-library/jnpf-library-entity/src/main/java/jnpf/model/dto/TUserForLibraryDto.java

@ -11,7 +11,7 @@ public class TUserForLibraryDto { @@ -11,7 +11,7 @@ public class TUserForLibraryDto {
private TUserForLibraryDto(){}
@Data
public static class TUserForLibraryDtoParam extends BasePageParam{
public static class TUserForLibraryDtoParam extends TUserForLibraryDtoBasePageParam{
@ApiModelProperty(value = "用户手机号")
private String userPhone;
@ -20,7 +20,7 @@ public class TUserForLibraryDto { @@ -20,7 +20,7 @@ public class TUserForLibraryDto {
}
@Data
public static class BasePageParam {
public static class TUserForLibraryDtoBasePageParam {
@ApiModelProperty("当前页")
private Integer current = 1;
@ApiModelProperty("页大小")

Loading…
Cancel
Save