第三方单据上传类型修改

pro
anthonywj 2 years ago
parent b895be051e
commit f51054ea40

@ -1,14 +1,11 @@
package com.glxp.api.controller.thrsys;
import cn.hutool.core.collection.CollUtil;
import com.glxp.api.annotation.AuthRuleAnnotation;
import com.glxp.api.entity.system.SyncDataBustypeEntity;
import com.glxp.api.entity.system.SyncUploadDataSetEntity;
import com.glxp.api.service.system.SyncUploadDataBustypeService;
import com.glxp.api.service.system.SyncUploadDataSetService;
import com.glxp.api.common.enums.ResultEnum;
import com.glxp.api.common.res.BaseResponse;
import com.glxp.api.common.util.ResultVOUtils;
import com.glxp.api.entity.system.SyncUploadDataSetEntity;
import com.glxp.api.service.system.SyncUploadDataSetService;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
@ -16,19 +13,15 @@ import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import javax.validation.Valid;
import java.util.List;
@RestController
public class ThirdUploadSetController {
@Resource
SyncUploadDataSetService syncUploadDataSetService;
@Resource
SyncUploadDataBustypeService syncUploadDataBustypeService;
@AuthRuleAnnotation("system/third/syncData/config")
@GetMapping("/system/third/syncData/config")
public BaseResponse list() {
SyncUploadDataSetEntity syncDataSetResponse = syncUploadDataSetService.selectSet();
return ResultVOUtils.success(syncDataSetResponse);
}
@ -37,11 +30,6 @@ public class ThirdUploadSetController {
@PostMapping("/system/third/syncData/save")
public BaseResponse save(@RequestBody @Valid SyncUploadDataSetEntity syncUploadDataSetEntity
) {
List<SyncDataBustypeEntity> busTypes = syncUploadDataSetEntity.getBusTypes();
syncUploadDataBustypeService.deleteAll();
if (CollUtil.isNotEmpty(busTypes))
syncUploadDataBustypeService.inserts(busTypes);
syncUploadDataSetEntity.setBusTypes(null);
boolean b = syncUploadDataSetService.insert(syncUploadDataSetEntity);
if (!b) {
return ResultVOUtils.error(ResultEnum.NOT_NETWORK);

@ -0,0 +1,9 @@
package com.glxp.api.dao.thrsys;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.glxp.api.entity.thrsys.ThrOrderUploadBustypesEntity;
import org.apache.ibatis.annotations.Mapper;
@Mapper
public interface ThrOrderUploadBustypesMapper extends BaseMapper<ThrOrderUploadBustypesEntity> {
}

@ -4,62 +4,67 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler;
import lombok.Data;
/**
* <p>
*
* </p>
*
* @author
* @since 2023-01-13
*/
@Data
@TableName("thr_order_upload_bustypes")
public class ThrOrderUploadBustypesEntity {
@TableName(value = "thr_order_upload_bustypes")
public class ThrOrderUploadBustypesEntity implements Serializable {
@TableId(value = "id", type = IdType.AUTO)
@TableId(value = "id", type = IdType.INPUT)
private Integer id;
@TableField("action")
@TableField(value = "`action`")
private String action;
@TableField("name")
@TableField(value = "`name`")
private String name;
/**
* : 1:;2:;3:
*/
@TableField(value = "orderStatus")
private Integer orderStatus;
/**
* ()
*/
@TableField(value = "orderSource", typeHandler = FastjsonTypeHandler.class)
private String orderSource;
/**
*
*/
@TableField("createUser")
@TableField(value = "`createUser`")
private String createUser;
/**
*
*/
@TableField("createTime")
@TableField(value = "createTime")
private Date createTime;
/**
*
*/
@TableField("updateUser")
@TableField(value = "updateUser")
private String updateUser;
/**
*
*/
@TableField("updateTime")
@TableField(value = "updateTime")
private Date updateTime;
/**
*
*/
@TableField("remark")
@TableField(value = "remark")
private String remark;
private static final long serialVersionUID = 1L;
}

@ -154,7 +154,6 @@ public class ErpBasicClient {
/**
*
*
* @param files
* @param thirdSys
* @return
*/

@ -0,0 +1,10 @@
package com.glxp.api.service.thrsys;
import org.springframework.stereotype.Service;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.glxp.api.dao.thrsys.ThrOrderUploadBustypesMapper;
import com.glxp.api.entity.thrsys.ThrOrderUploadBustypesEntity;
@Service
public class ThrOrderUploadBustypesService extends ServiceImpl<ThrOrderUploadBustypesMapper, ThrOrderUploadBustypesEntity> {
}

@ -0,0 +1,4 @@
<?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.glxp.api.dao.thrsys.ThrOrderUploadBustypesMapper">
</mapper>
Loading…
Cancel
Save