单据类型,关联自助平台

master^2
anthonyywj2 3 years ago
parent b96388c5fc
commit 8a03e70898

@ -157,9 +157,9 @@
<artifactId>spring-boot-starter-data-mongodb</artifactId>
</dependency>
<!--<dependency>-->
<!--<groupId>com.github.Ryan-Miao</groupId>-->
<!--<artifactId>mongo-page-helper</artifactId>-->
<!--<version>1.0</version>-->
<!--<groupId>com.github.Ryan-Miao</groupId>-->
<!--<artifactId>mongo-page-helper</artifactId>-->
<!--<version>1.0</version>-->
<!--</dependency>-->
<dependency>
<groupId>io.github.openfeign</groupId>

@ -1,11 +1,16 @@
package com.glxp.udi.admin.controller.info;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.github.pagehelper.PageInfo;
import com.glxp.udi.admin.annotation.AuthRuleAnnotation;
import com.glxp.udi.admin.entity.info.PlatformEntity;
import com.glxp.udi.admin.entity.inout.UdiInfoEntity;
import com.glxp.udi.admin.entity.inout.UnitMaintainEntity;
import com.glxp.udi.admin.exception.JsonException;
import com.glxp.udi.admin.req.inout.UnitMaintainFilterRequest;
import com.glxp.udi.admin.res.PageSimpleResponse;
import com.glxp.udi.admin.res.basic.SpmsBusTypeResponse;
import com.glxp.udi.admin.service.info.PlatformService;
import com.glxp.udi.admin.service.inout.UnitMaintainService;
import com.glxp.udi.admin.util.UuidUtils;
@ -34,6 +39,7 @@ import org.springframework.web.client.RestTemplate;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSON;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
@ -42,7 +48,9 @@ import java.util.Map;
import java.io.IOException;
import java.nio.charset.Charset;
import java.util.HashMap;
import com.glxp.udi.admin.util.HttpClient;
@RestController
@Slf4j
public class PlatformController {
@ -51,12 +59,12 @@ public class PlatformController {
private PlatformService platformService;
@Resource
private UnitMaintainService unitMaintainService;
@AuthRuleAnnotation("")
@PostMapping("/udims/platform/remove")
public BaseResponse remove(@RequestBody PlatformEntity platformEntity) {
if(platformService.remove(platformEntity.getId())>0)
ResultVOUtils.success("删除成功");
if (platformService.remove(platformEntity.getId()) > 0)
ResultVOUtils.success("删除成功");
return ResultVOUtils.error(500, "删除失败");
}
@ -64,9 +72,9 @@ public class PlatformController {
@AuthRuleAnnotation("")
@PostMapping("/udims/platform/update")
public BaseResponse update(@RequestBody PlatformEntity platformEntity) {
if(platformService.update(platformEntity)>0)
ResultVOUtils.success("修改成功");
if (platformService.update(platformEntity) > 0)
ResultVOUtils.success("修改成功");
return ResultVOUtils.success("修改失败");
}
@ -74,62 +82,88 @@ public class PlatformController {
@GetMapping("/udims/platform/list")
public BaseResponse list(@RequestParam Map<String, Object> params) {
List<PlatformEntity> list = platformService.list(params);
if(params.get("page")!=null&&params.get("limit")!=null) {
params.put("offset",(Integer.valueOf(params.get("page").toString()) -1) *(Integer.valueOf(params.get("limit").toString())));
if (params.get("page") != null && params.get("limit") != null) {
params.put("offset", (Integer.valueOf(params.get("page").toString()) - 1) * (Integer.valueOf(params.get("limit").toString())));
}
int total = platformService.count(params);
PageSimpleResponse<PlatformEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(Long.valueOf(String.valueOf(total)));
pageSimpleResponse.setList(list);
return ResultVOUtils.success(pageSimpleResponse);
}
@AuthRuleAnnotation("")
@PostMapping("/udims/platform/link")
public BaseResponse update(@RequestBody UnitMaintainEntity unitMaintainEntity) {
PlatformEntity platformEntity = platformService.get(unitMaintainEntity.getPlatformId());
if(platformEntity!=null) {
String url = platformEntity.getHost()+"/verify";
Map<String, Object> map = new HashMap<String,Object>();
map.put("username",unitMaintainEntity.getPlatformUsername());
map.put("password",unitMaintainEntity.getPlatformPassword());
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
HttpEntity<String> request = new HttpEntity<String>(JSON.toJSONString(map),headers);
RestTemplate restTemplate = new RestTemplate();
log.error(url);
String result = restTemplate.postForObject(url, request, String.class, map);
log.error(result);
Map<String,Object> object = JSON.parseObject(result,Map.class);
if(object!=null&&object.get("data")!=null) {
Map<String,Object> data = JSON.parseObject(JSON.toJSONString(object.get("data")),Map.class);
log.error(JSON.toJSONString(object.get("data")));
if(data.get("appid")!=null) {
unitMaintainEntity.setAppid(data.get("appid").toString());
if(data.get("apiKey")!=null)
unitMaintainEntity.setApiKey(data.get("apiKey").toString());
if(data.get("secretKey")!=null)
unitMaintainEntity.setSecretKey(data.get("secretKey").toString());
} else {
return ResultVOUtils.error(500, "关联验证失败,请联系管理人员");
}
} else if(object!=null&&object.get("message")!=null){
return ResultVOUtils.error(500, object.get("message").toString());
} else {
return ResultVOUtils.error(500, "关联失败,请联系管理人员");
}
} else {
return ResultVOUtils.error(500, "未查询到平台信息");
}
unitMaintainService.updateUnit(unitMaintainEntity);
return ResultVOUtils.success("关联成功");
}
PlatformEntity platformEntity = platformService.get(unitMaintainEntity.getPlatformId());
if (platformEntity != null) {
String url = platformEntity.getHost() + "/verify";
Map<String, Object> map = new HashMap<String, Object>();
map.put("username", unitMaintainEntity.getPlatformUsername());
map.put("password", unitMaintainEntity.getPlatformPassword());
HttpHeaders headers = new HttpHeaders();
headers.setContentType(MediaType.APPLICATION_JSON_UTF8);
HttpEntity<String> request = new HttpEntity<String>(JSON.toJSONString(map), headers);
RestTemplate restTemplate = new RestTemplate();
log.error(url);
String result = restTemplate.postForObject(url, request, String.class, map);
log.error(result);
Map<String, Object> object = JSON.parseObject(result, Map.class);
if (object != null && object.get("data") != null) {
Map<String, Object> data = JSON.parseObject(JSON.toJSONString(object.get("data")), Map.class);
log.error(JSON.toJSONString(object.get("data")));
if (data.get("appid") != null) {
unitMaintainEntity.setAppid(data.get("appid").toString());
if (data.get("apiKey") != null)
unitMaintainEntity.setApiKey(data.get("apiKey").toString());
if (data.get("secretKey") != null)
unitMaintainEntity.setSecretKey(data.get("secretKey").toString());
} else {
return ResultVOUtils.error(500, "关联验证失败,请联系管理人员");
}
} else if (object != null && object.get("message") != null) {
return ResultVOUtils.error(500, object.get("message").toString());
} else {
return ResultVOUtils.error(500, "关联失败,请联系管理人员");
}
} else {
return ResultVOUtils.error(500, "未查询到平台信息");
}
unitMaintainService.updateUnit(unitMaintainEntity);
return ResultVOUtils.success("关联成功");
}
@AuthRuleAnnotation("")
@GetMapping("/udims/platform/getPlatformBusTypes")
public BaseResponse getPlatformBusTypes(UnitMaintainFilterRequest unitMaintainFilterRequest) {
UnitMaintainEntity unitMaintainEntity = unitMaintainService.selectByUnitId(unitMaintainFilterRequest.getUnitId());
if (unitMaintainEntity.getSecretKey() == null) {
return ResultVOUtils.error(500, "未验证,请先关联验证!");
}
PlatformEntity platformEntity = platformService.get(unitMaintainEntity.getPlatformId());
if (platformEntity != null) {
HttpHeaders headers = new HttpHeaders();
headers.add("api_key", unitMaintainEntity.getApiKey());
headers.add("secret_key", unitMaintainEntity.getSecretKey());
String response = HttpClient.mipsGetHead(platformEntity.getHost() + "/udiwms/bussinessType/udimsFilter", null, headers);
BaseResponse<PageSimpleResponse<SpmsBusTypeResponse>> baseResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse<PageSimpleResponse<SpmsBusTypeResponse>>>() {
});
if (baseResponse.getCode() == 20000) {
return baseResponse;
}
}
return ResultVOUtils.error(500, "连接自助平台服务器失败!");
}
}

@ -104,6 +104,8 @@ public class BusRoleRlController {
HttpServletRequest request = attributes.getRequest();
String userId = request.getHeader("ADMIN_ID");
AuthAdmin authAdmin = authAdminService.findById(Long.parseLong(userId));
if (authAdmin.getCustomerId() == 110) {//系统管理员角色
BussinessTypeFilterRequest bussinessTypeFilterRequest = new BussinessTypeFilterRequest();
BeanUtils.copyProperties(busRoleRlFilterRequest, bussinessTypeFilterRequest);

@ -0,0 +1,91 @@
package com.glxp.udi.admin.controller.inout;
import com.github.pagehelper.PageInfo;
import com.glxp.udi.admin.entity.inout.BussinessContrastTypeEntity;
import com.glxp.udi.admin.entity.inout.BussinessTypeEntity;
import com.glxp.udi.admin.req.inout.DeleteRequest;
import com.glxp.udi.admin.req.receipt.BussinessTypeConstrastFilterRequest;
import com.glxp.udi.admin.req.receipt.BussinessTypeFilterRequest;
import com.glxp.udi.admin.res.PageSimpleResponse;
import com.glxp.udi.admin.res.basic.BussinessTypResponse;
import com.glxp.udi.admin.service.inout.BussinessTypeContrastService;
import com.glxp.udi.common.enums.ResultEnum;
import com.glxp.udi.common.res.BaseResponse;
import com.glxp.udi.common.util.ResultVOUtils;
import org.springframework.validation.BindingResult;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
import java.util.List;
@RestController
public class BussinessTypeContrastController {
@Resource
private BussinessTypeContrastService bussinessTypeService;
@GetMapping("/udiwms/btcontrast/filter")
public BaseResponse filterJoinBussinessType(BussinessTypeConstrastFilterRequest bussinessTypeFilterRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
List<BussinessContrastTypeEntity> bussinessTypeEntities;
bussinessTypeEntities = bussinessTypeService.filterList(bussinessTypeFilterRequest);
PageInfo<BussinessContrastTypeEntity> pageInfo;
pageInfo = new PageInfo<>(bussinessTypeEntities);
PageSimpleResponse<BussinessContrastTypeEntity> pageSimpleResponse = new PageSimpleResponse<>();
pageSimpleResponse.setTotal(pageInfo.getTotal());
pageSimpleResponse.setList(bussinessTypeEntities);
return ResultVOUtils.success(pageSimpleResponse);
}
@PostMapping("/udiwms/btcontrast/delete")
public BaseResponse deleteBussinessType(@RequestBody DeleteRequest deleteRequest, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
String id = deleteRequest.getId();
bussinessTypeService.deleteById(id);
return ResultVOUtils.success("删除成功");
}
@PostMapping("/udiwms/btcontrast/update")
public BaseResponse updateBussinessType(@RequestBody BussinessContrastTypeEntity bussinessTypeEntity,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (bussinessTypeEntity != null) {
bussinessTypeService.updateBussinessType(bussinessTypeEntity);
} else {
ResultVOUtils.error(999, "参数错误");
}
return ResultVOUtils.success("更新成功");
}
@PostMapping("/udiwms/btcontrast/insert")
public BaseResponse insertBussinessType(@RequestBody BussinessContrastTypeEntity bussinessTypeEntity, BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (bussinessTypeEntity != null) {
bussinessTypeService.insertBussinessType(bussinessTypeEntity);
} else {
ResultVOUtils.error(999, "参数错误");
}
return ResultVOUtils.success("添加成功");
}
}

@ -1,13 +1,13 @@
package com.glxp.udi.admin.controller.inout;
import com.alibaba.fastjson.JSONObject;
import com.alibaba.fastjson.TypeReference;
import com.github.pagehelper.PageInfo;
import com.glxp.udi.admin.annotation.AuthRuleAnnotation;
import com.glxp.udi.admin.constant.Constant;
import com.glxp.udi.admin.entity.auth.AuthAdmin;
import com.glxp.udi.admin.entity.inout.ErpOrderEntity;
import com.glxp.udi.admin.entity.inout.OrderEntity;
import com.glxp.udi.admin.entity.inout.OrderMdEntity;
import com.glxp.udi.admin.entity.inout.WarehouseEntity;
import com.glxp.udi.admin.entity.info.PlatformEntity;
import com.glxp.udi.admin.entity.inout.*;
import com.glxp.udi.admin.exception.JsonException;
import com.glxp.udi.admin.mongo.service.OrderDetailMdService;
import com.glxp.udi.admin.mongo.service.OrderMdService;
@ -15,11 +15,14 @@ import com.glxp.udi.admin.mongo.service.WarehouseMdService;
import com.glxp.udi.admin.mongo.utils.PageResult;
import com.glxp.udi.admin.req.inout.*;
import com.glxp.udi.admin.res.PageSimpleResponse;
import com.glxp.udi.admin.res.inout.UdiRelevanceResponse;
import com.glxp.udi.admin.service.auth.AuthAdminService;
import com.glxp.udi.admin.service.info.PlatformService;
import com.glxp.udi.admin.service.info.SetupService;
import com.glxp.udi.admin.service.inout.*;
import com.glxp.udi.admin.service.receipts.MipsBarcodeService;
import com.glxp.udi.admin.util.GetAuthAdminUtil;
import com.glxp.udi.admin.util.HttpClient;
import com.glxp.udi.common.enums.ResultEnum;
import com.glxp.udi.common.res.BaseResponse;
import com.glxp.udi.common.util.ResultVOUtils;
@ -64,6 +67,10 @@ public class OrderController {
private OrderMdService orderMdService;
@Resource
private WarehouseMdService warehouseMdService;
@Resource
private UnitMaintainService unitMaintainService;
@Resource
private PlatformService platformService;
@AuthRuleAnnotation("")
@GetMapping("/warehouse/inout/order/filter")
@ -285,4 +292,66 @@ public class OrderController {
return ResultVOUtils.success("更新成功");
}
@AuthRuleAnnotation("")
@PostMapping("/warehouse/inout/order/updateSpms")
public BaseResponse uploadSpms(@RequestBody OrderUploadRequest orderUploadRequest,
BindingResult bindingResult) {
if (bindingResult.hasErrors()) {
return ResultVOUtils.error(ResultEnum.PARAM_VERIFY_FALL, bindingResult.getFieldError().getDefaultMessage());
}
if (orderUploadRequest.getOrderIds() != null && orderUploadRequest.getOrderIds().size() > 0) {
PostUdimsOrderRequest postUdimsOrderRequest = new PostUdimsOrderRequest();
List<PostUdimsOrderRequest.OrderBean> orderBeans = new ArrayList<>();
UnitMaintainEntity unitMaintainEntity = null;
String orderId = orderUploadRequest.getOrderIds().get(0);
OrderMdEntity orderMdEntity = orderMdService.findByOne(orderId);
if (orderMdEntity != null) {
unitMaintainEntity = unitMaintainService.selectByUnitId(orderMdEntity.getFromCorpId());
if (unitMaintainEntity == null || unitMaintainEntity.getAppid() == null) {
return ResultVOUtils.error(500, "该往来单位未绑定UDI自助平台");
}
if (!orderMdEntity.getAction().equals(unitMaintainEntity.getSourceAction())) {
return ResultVOUtils.error(500, "该单据类型不支持提交!");
}
PostUdimsOrderRequest.OrderBean orderBean = new PostUdimsOrderRequest.OrderBean();
BeanUtils.copyProperties(orderMdEntity, orderBean);
orderBean.setAction(unitMaintainEntity.getTargetAction());
WarehouseQueryRequest warehouseQueryRequest = new WarehouseQueryRequest();
warehouseQueryRequest.setOrderId(orderMdEntity.getOrderId());
List<WarehouseEntity> warehouseEntities = warehouseMdService.filterWarehouse(warehouseQueryRequest);
List<PostUdimsOrderRequest.OrderBean.CodeBean> codeBeans = new ArrayList<>();
warehouseEntities.forEach(data -> {
PostUdimsOrderRequest.OrderBean.CodeBean codeBean = new PostUdimsOrderRequest.OrderBean.CodeBean();
BeanUtils.copyProperties(data, codeBean);
codeBeans.add(codeBean);
});
orderBean.setCodes(codeBeans);
orderBeans.add(orderBean);
postUdimsOrderRequest.setOrderBeans(orderBeans);
}
PlatformEntity platformEntity = platformService.get(unitMaintainEntity.getPlatformId());
postUdimsOrderRequest.setOrderBeans(orderBeans);
String response =
HttpClient.uCloudPostSmp(platformEntity.getHost() + "/warehouse/inout/postOrdersUdims",
postUdimsOrderRequest, unitMaintainEntity.getApiKey(), unitMaintainEntity.getSecretKey());
BaseResponse baseResponse =
JSONObject.parseObject(response, new TypeReference<BaseResponse>() {
});
if (baseResponse.getCode() == 20000) {
orderMdEntity.setUploadStatus("1");
orderMdService.updateOrder(orderMdEntity);
return baseResponse;
} else {
return ResultVOUtils.error(500, baseResponse.getMessage());
}
}
return ResultVOUtils.success("未选择订单!");
}
}

@ -0,0 +1,24 @@
package com.glxp.udi.admin.dao.inout;
import com.glxp.udi.admin.entity.inout.BussinessContrastTypeEntity;
import com.glxp.udi.admin.entity.inout.BussinessTypeEntity;
import com.glxp.udi.admin.req.receipt.BussinessTypeConstrastFilterRequest;
import com.glxp.udi.admin.req.receipt.BussinessTypeFilterRequest;
import com.glxp.udi.admin.res.basic.BussinessTypResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface BussinessTypeContrastDao {
List<BussinessContrastTypeEntity> filterList(BussinessTypeConstrastFilterRequest bussinessTypeFilterRequest);
boolean insertBussinessType(BussinessContrastTypeEntity bussinessTypeEntity);
boolean updateBussinessType(BussinessContrastTypeEntity bussinessTypeEntity);
boolean deleteById(@Param("id") String id);
}

@ -0,0 +1,15 @@
package com.glxp.udi.admin.entity.inout;
import lombok.Data;
@Data
public class BussinessContrastTypeEntity {
private Integer id;
private Integer sourceAction;
private Integer targetAction;
private Integer customerId;
private Integer unitId;
}

@ -12,7 +12,7 @@ public class OrderMdEntity {
private String orderId;
private String action;
private String corpOrderId;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date actDate;
private String fromCorpId;
private String actor;
@ -24,6 +24,7 @@ public class OrderMdEntity {
private String fromType;
private String contrastStatus;
private String erpFk;
private String uploadStatus; //上传状态0未上传1已上传
private Long customerId;
}

@ -13,7 +13,7 @@ public class UdiInfoEntity {
private String bzcj;
private String addType;
private String deviceRecordKey;
private Integer isUseDy;
private int isUseDy;
private String cpmctymc;
private String cplb;
private String flbm;

@ -17,10 +17,14 @@ public class UnitMaintainEntity {
private String creditNo;
private String erpId;
private String platformId;
private String platformName;
private String platformUsername;
private String platformPassword;
private String appid;
private String apiKey;
private String secretKey;
private String sourceAction;
private String targetAction;
}

@ -82,6 +82,17 @@ public class OrderMdService {
}
public OrderMdEntity findByOne(String orderId) {
OrderFilterRequest orderFilterRequest = new OrderFilterRequest();
orderFilterRequest.setId(orderId);
List<OrderMdEntity> orderMdEntities = findAll(orderFilterRequest);
if (orderMdEntities != null && orderMdEntities.size() > 0) {
return orderMdEntities.get(0);
}
return null;
}
public List<OrderMdEntity> findAll(OrderFilterRequest orderFilterRequest) {
Query query = new Query();
if (orderFilterRequest.getId() != null && !orderFilterRequest.getId().isEmpty()) {
@ -167,6 +178,9 @@ public class OrderMdService {
if (orderMdEntity.getErpFk() != null) {
update.set("erpFk", orderMdEntity.getErpFk());
}
if (orderMdEntity.getUploadStatus() != null) {
update.set("uploadStatus", orderMdEntity.getUploadStatus());
}
mongoTemplate.updateMulti(query, update, MongoDBName.NAME_ORDER);
}

@ -0,0 +1,10 @@
package com.glxp.udi.admin.req.inout;
import lombok.Data;
import java.util.List;
@Data
public class OrderUploadRequest {
private List<String> orderIds;
}

@ -0,0 +1,57 @@
package com.glxp.udi.admin.req.inout;
import lombok.Data;
import java.util.List;
@Data
public class PostUdimsOrderRequest {
List<OrderBean> orderBeans;
private String customerId;
@Data
public static class OrderBean {
private String orderId;
private String corpOrderId;
private String action;
private String actDate;
private String actor;
private String mainAction;
private String fromCorpId;
private String fromCorp;
private String remark;
private List<CodeBean> codes;
@Data
public static class CodeBean {
private String action;
private String mainAction;
private String code;
private String corpOrderId;
private String actor;
private String actDate;
private String fromCorpId;
private String fromCorp;
private String orderId;
private String batchNo;
private String produceDate;
private String expireDate;
private String serialNo;
private Integer count;
private String packageLevel;
private String warehouseCode;
private String customerId;
private String nameCode;
private String supId;//供应商ID
private String invStorageCode;
private String invWarehouseCode;
private String relId;
private Integer status;
private String locStorageCode;
}
}
}

@ -8,5 +8,6 @@ public class UnitMaintainFilterRequest extends ListPageRequest {
private String key;
private String customerId;
private String thirdId;
private String unitId;
}

@ -0,0 +1,13 @@
package com.glxp.udi.admin.req.receipt;
import com.glxp.udi.admin.req.ListPageRequest;
import lombok.Data;
@Data
public class BussinessTypeConstrastFilterRequest extends ListPageRequest {
private String sourceAction;
private Integer customerId;
private Integer unitId;
}

@ -0,0 +1,50 @@
package com.glxp.udi.admin.res.basic;
import lombok.Data;
@Data
public class SpmsBusTypeResponse {
private Integer id;
private String action;
private String name;
private Boolean enable;
private String remark;
private String mainAction;
private String thirdSysFk;
private String thirdId;
private String thirdName;
private Boolean enabled;
private String localAction;
private Boolean checkEnable; //是否根据业务单据类型校验
private Boolean advanceType; //是否预入库
private Boolean changeEnable;
private Boolean genUnit;
// private Boolean innerOrder;
private Boolean spUse;
private String localName;
private Boolean secCheckEnable;
private boolean checkUdims;
private boolean checkPdaEd;
private boolean checkPdaUn;
private boolean checkPc;
private boolean checkWebNew;
private boolean checkChange;
private boolean secCheckUdims;
private boolean secCheckPdaEd;
private boolean secCheckPdaUn;
private boolean secCheckPc;
private boolean secCheckWebNew;
private boolean secCheckChange;
private int corpType;
private String storageCode;
//补单类型
private String supplementOrderType;
//启用默认补单
private boolean enableSupplementOrder;
}

@ -7,51 +7,57 @@ import com.glxp.udi.admin.service.info.PlatformService;
import org.springframework.stereotype.Service;
import lombok.extern.slf4j.Slf4j;
import com.alibaba.fastjson.JSON;
import java.util.List;
import java.util.Map;
import javax.annotation.Resource;
import com.glxp.udi.admin.util.UuidUtils;
import org.apache.commons.lang3.StringUtils;
@Service
@Slf4j
public class PlatformServiceImpl implements PlatformService {
@Resource
@Resource
PlatformDao platformDao;
@Override
public int save(PlatformEntity platformEntity){
if(StringUtils.isEmpty(platformEntity.getId()))
platformEntity.setId(UuidUtils.getUUId());
return platformDao.save(platformEntity);
public int save(PlatformEntity platformEntity) {
if (StringUtils.isEmpty(platformEntity.getId()))
platformEntity.setId(UuidUtils.getUUId());
return platformDao.save(platformEntity);
}
@Override
public int batchSave(List<PlatformEntity> list){
return platformDao.batchSave(list);
public int batchSave(List<PlatformEntity> list) {
return platformDao.batchSave(list);
}
@Override
public int remove(String id){
return platformDao.remove(id);
public int remove(String id) {
return platformDao.remove(id);
}
@Override
public int update(PlatformEntity platformEntity){
if(StringUtils.isEmpty(platformEntity.getId()))
return save(platformEntity);
return platformDao.update(platformEntity);
public int update(PlatformEntity platformEntity) {
if (StringUtils.isEmpty(platformEntity.getId()))
return save(platformEntity);
return platformDao.update(platformEntity);
}
@Override
public List<PlatformEntity> list(Map<String, Object> map){
return platformDao.list(map);
public List<PlatformEntity> list(Map<String, Object> map) {
return platformDao.list(map);
}
@Override
public int count(Map<String, Object> map) {
return platformDao.count(map);
return platformDao.count(map);
}
@Override
public PlatformEntity get(String id) {
return platformDao.get(id);
return platformDao.get(id);
}
}

@ -0,0 +1,19 @@
package com.glxp.udi.admin.service.inout;
import com.glxp.udi.admin.entity.inout.BussinessContrastTypeEntity;
import com.glxp.udi.admin.req.receipt.BussinessTypeConstrastFilterRequest;
import org.apache.ibatis.annotations.Param;
import java.util.List;
public interface BussinessTypeContrastService {
List<BussinessContrastTypeEntity> filterList(BussinessTypeConstrastFilterRequest bussinessTypeFilterRequest);
boolean insertBussinessType(BussinessContrastTypeEntity bussinessTypeEntity);
boolean updateBussinessType(BussinessContrastTypeEntity bussinessTypeEntity);
boolean deleteById(@Param("id") String id);
}

@ -16,5 +16,7 @@ public interface UnitMaintainService {
UnitMaintainEntity selectById(String id);
UnitMaintainEntity selectByUnitId(String id);
boolean updateUnit(UnitMaintainEntity unitMaintainEntity);
}

@ -0,0 +1,49 @@
package com.glxp.udi.admin.service.inout.impl;
import com.github.pagehelper.PageHelper;
import com.glxp.udi.admin.dao.inout.BussinessTypeContrastDao;
import com.glxp.udi.admin.entity.inout.BussinessContrastTypeEntity;
import com.glxp.udi.admin.entity.inout.BussinessTypeEntity;
import com.glxp.udi.admin.req.receipt.BussinessTypeConstrastFilterRequest;
import com.glxp.udi.admin.service.inout.BussinessTypeContrastService;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.List;
@Service
public class BussinessTypeContrastServiceImpl implements BussinessTypeContrastService {
@Resource
BussinessTypeContrastDao bussinessTypeContrastDao;
@Override
public List<BussinessContrastTypeEntity> filterList(BussinessTypeConstrastFilterRequest bussinessTypeFilterRequest) {
if (bussinessTypeFilterRequest == null) {
return Collections.emptyList();
}
if (bussinessTypeFilterRequest.getPage() != null) {
int offset = (bussinessTypeFilterRequest.getPage() - 1) * bussinessTypeFilterRequest.getLimit();
PageHelper.offsetPage(offset, bussinessTypeFilterRequest.getLimit());
}
List<BussinessContrastTypeEntity> data = bussinessTypeContrastDao.filterList(bussinessTypeFilterRequest);
return data;
}
@Override
public boolean insertBussinessType(BussinessContrastTypeEntity bussinessTypeEntity) {
return bussinessTypeContrastDao.insertBussinessType(bussinessTypeEntity);
}
@Override
public boolean updateBussinessType(BussinessContrastTypeEntity bussinessTypeEntity) {
return bussinessTypeContrastDao.updateBussinessType(bussinessTypeEntity);
}
@Override
public boolean deleteById(String id) {
return bussinessTypeContrastDao.deleteById(id);
}
}

@ -22,8 +22,10 @@ public class UnitMaintainServiceImpl implements UnitMaintainService {
if (unitMaintainFilterRequest == null) {
return Collections.emptyList();
}
int offset = (unitMaintainFilterRequest.getPage() - 1) * unitMaintainFilterRequest.getLimit();
PageHelper.offsetPage(offset, unitMaintainFilterRequest.getLimit());
if (unitMaintainFilterRequest.getPage() != null) {
int offset = (unitMaintainFilterRequest.getPage() - 1) * unitMaintainFilterRequest.getLimit();
PageHelper.offsetPage(offset, unitMaintainFilterRequest.getLimit());
}
List<UnitMaintainEntity> data = unitMaintainDao.filterList(unitMaintainFilterRequest);
return data;
}
@ -43,6 +45,17 @@ public class UnitMaintainServiceImpl implements UnitMaintainService {
return unitMaintainDao.selectById(id);
}
@Override
public UnitMaintainEntity selectByUnitId(String id) {
UnitMaintainFilterRequest unitMaintainFilterRequest = new UnitMaintainFilterRequest();
unitMaintainFilterRequest.setUnitId(id);
List<UnitMaintainEntity> unitMaintainEntities = unitMaintainDao.filterList(unitMaintainFilterRequest);
if (unitMaintainEntities != null && unitMaintainEntities.size() > 0) {
return unitMaintainEntities.get(0);
}
return null;
}
@Override
public boolean updateUnit(UnitMaintainEntity unitMaintainEntity) {
return unitMaintainDao.updateUnit(unitMaintainEntity);

@ -5,7 +5,9 @@ import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.HttpMethod;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
import org.springframework.util.LinkedMultiValueMap;
import org.springframework.util.MultiValueMap;
import org.springframework.web.client.RestTemplate;
@ -13,6 +15,7 @@ import org.springframework.web.client.RestTemplate;
import java.util.Iterator;
import java.util.Map;
@Service
public class HttpClient {
private static final Logger logger = LoggerFactory.getLogger(HttpClient.class);
@ -39,6 +42,43 @@ public class HttpClient {
return response;
}
public static String mipsGetHead(String url, Map params, HttpHeaders headers) {
headers.add("Content-Type", "application/json");
if(params!=null){
StringBuffer stringBuffer = new StringBuffer(url);
if (params instanceof Map) {
Iterator iterator = ((Map) params).entrySet().iterator();
if (iterator.hasNext()) {
stringBuffer.append("?");
Object element;
while (iterator.hasNext()) {
element = iterator.next();
Map.Entry<String, Object> entry = (Map.Entry) element;
if (entry.getValue() != null) {
stringBuffer.append(element).append("&");
}
url = stringBuffer.substring(0, stringBuffer.length() - 1);
}
}
} else {
throw new RuntimeException("url请求:" + url + "请求参数有误不是map类型");
}
}
RestTemplate restTemplate = new RestTemplate();
String accessTokenRequestUrl = url;//"http://127.0.0.1:9997/mips/druginfo/list";
logger.info(accessTokenRequestUrl);
ResponseEntity<String> response = restTemplate.exchange(url, HttpMethod.GET, new HttpEntity<>(headers), String.class);
// String response = restTemplate.getForObject(accessTokenRequestUrl, String.class, new HttpEntity<String>(headers));
return response.getBody();
}
public static String mipsGet(String url, Map params) {
StringBuffer stringBuffer = new StringBuffer(url);
if (params instanceof Map) {
@ -68,8 +108,6 @@ public class HttpClient {
public static String uCloudPost(String url, Object object) {
RestTemplate restTemplate = new RestTemplate();
String json = JSONObject.toJSON(object).toString();
// MultiValueMap<String, Object> postParameters = new LinkedMultiValueMap<>();
// postParameters.add("params", json);
logger.info(url + "\n" + json);
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Type", "application/json");
@ -79,14 +117,31 @@ public class HttpClient {
System.out.println(response);
return response;
}
public static ResponseEntity<byte[]> getFile(String url,Map<String,String> headerMap){
public static String uCloudPostSmp(String url, Object object, String appKey, String secretKey) {
RestTemplate restTemplate = new RestTemplate();
String json = JSONObject.toJSON(object).toString();
logger.info(url + "\n" + json);
HttpHeaders headers = new HttpHeaders();
headers.add("Content-Type", "application/json");
headers.add("api_key", appKey);
headers.add("secret_key", secretKey);
HttpEntity<String> httpEntity = new HttpEntity<>(json, headers);
logger.info(httpEntity.toString());
String response = restTemplate.postForObject(url, httpEntity, String.class);
System.out.println(response);
return response;
}
public static ResponseEntity<byte[]> getFile(String url, Map<String, String> headerMap) {
RestTemplate restTemplate = new RestTemplate();
HttpHeaders httpHeaders = new HttpHeaders();
for (Map.Entry<String, String> stringStringEntry : headerMap.entrySet()) {
httpHeaders.add(stringStringEntry.getKey(), stringStringEntry.getValue());
}
HttpEntity httpEntity = new HttpEntity(httpHeaders);
return restTemplate.getForEntity(url,byte[].class,httpEntity);
return restTemplate.getForEntity(url, byte[].class, httpEntity);
}

@ -127,8 +127,6 @@
FROM udi_user
where
CustomerId = #{id}
</select>
<update id="updateUserByCustomerId" parameterType="com.glxp.udi.admin.entity.auth.UpdateUserflagBean">
UPDATE udi_user

@ -0,0 +1,61 @@
<?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.udi.admin.dao.inout.BussinessTypeContrastDao">
<select id="filterList" parameterType="com.glxp.udi.admin.req.receipt.BussinessTypeConstrastFilterRequest"
resultType="com.glxp.udi.admin.entity.inout.BussinessContrastTypeEntity">
SELECT * FROM bussiness_type_contrast
<where>
<if test="sourceAction != ''and sourceAction != null">
AND name LIKE concat(#{sourceAction},'%')
</if>
<if test="customerId != ''and customerId != null">
AND customerId =#{customerId}
</if>
<if test="unitId != ''and unitId != null">
AND unitId =#{unitId}
</if>
</where>
</select>
<insert id="insertBussinessType" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.BussinessTypeEntity">
replace
INTO bussiness_type_contrast
(sourceAction,targetAction,customerId,unitId)
values
(
#{sourceAction},
#{targetAction},
#{customerId},
#{unitId}
)
</insert>
<update id="updateBussinessType" parameterType="com.glxp.udi.admin.entity.inout.BussinessTypeEntity">
UPDATE bussiness_type_contrast
<trim prefix="set" suffixOverrides=",">
<if test="sourceAction != null">sourceAction = #{sourceAction},</if>
<if test="targetAction != null">targetAction = #{targetAction},</if>
<if test="customerId != null">customerId = #{customerId},</if>
<if test="unitId != null">unitId = #{unitId},</if>
</trim>
WHERE id = #{id}
</update>
<delete id="deleteById" parameterType="Map">
DELETE
FROM bussiness_type_contrast
WHERE id = #{id}
</delete>
<select id="selectById" parameterType="Map" resultType="com.glxp.udi.admin.entity.inout.BussinessTypeEntity">
select *
FROM bussiness_type_contrast
WHERE id = #{id}
</select>
</mapper>

@ -5,7 +5,8 @@
<select id="filterList" parameterType="com.glxp.udi.admin.req.inout.UnitMaintainFilterRequest"
resultType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity">
SELECT * FROM io_unit_maintain
SELECT * ,auth_platform.name platformName FROM io_unit_maintain
left join auth_platform on io_unit_maintain.platformId = auth_platform.id
<where>
<if test="key != '' and key!=null">
and name like concat('%',#{key},'%') or spell like concat('%',#{key},'%') or unitId like
@ -14,34 +15,49 @@
<if test="customerId != '' and customerId != null">
AND customerId = #{customerId}
</if>
<if test="unitId != '' and unitId != null">
AND unitId = #{unitId}
</if>
<if test="thirdId != '' and thirdId != null">
AND thirdId = #{thirdId}
</if>
</where>
</select>
<insert id="insertUnitMaintain" keyProperty="id"
parameterType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity">
replace INTO io_unit_maintain
replace
INTO io_unit_maintain
(thirdId,unitId,name,spell,
addr,status,type,customerId,creditNo)
addr,status,type,customerId,creditNo,sourceAction,targetAction)
values
(
#{thirdId},
#{unitId},
#{name},
#{spell},
#{addr},
#{status},
#{type},#{customerId},#{creditNo}
)
#{thirdId},
#{unitId},
#{name},
#{spell},
#{addr},
#{status},
#{type},
#{customerId},
#{creditNo},
#{sourceAction},
#{targetAction}
)
</insert>
<delete id="deleteById" parameterType="Map">
DELETE FROM io_unit_maintain WHERE id = #{id}
DELETE
FROM io_unit_maintain
WHERE id = #{id}
</delete>
<select id="selectById" parameterType="Map" resultType="com.glxp.udi.admin.entity.inout.UnitMaintainEntity">
select * FROM io_unit_maintain WHERE id = #{id}
select *
FROM io_unit_maintain
WHERE id = #{id}
</select>
@ -56,10 +72,13 @@
<if test="status != null">status=#{status},</if>
<if test="type != null">type=#{type},</if>
<if test="creditNo != null">creditNo=#{creditNo},</if>
<if test="platformId != null">platform_id=#{platformId},</if>
<if test="platformId != null">platformId=#{platformId},</if>
<if test="appid != null">appid=#{appid},</if>
<if test="apiKey != null">api_key=#{apiKey},</if>
<if test="secretKey != null">secret_key=#{secretKey},</if>
<if test="apiKey != null">apiKey=#{apiKey},</if>
<if test="secretKey != null">secretKey=#{secretKey},
</if>
<if test="sourceAction != null">sourceAction=#{sourceAction},</if>
<if test="targetAction != null">targetAction=#{targetAction},</if>
</set>
WHERE id = #{id}
</update>

@ -1,237 +1,3 @@
/*
Navicat MySQL Data Transfer
Source Server : php
Source Server Version : 50553
Source Host : localhost:3306
Source Database : vue-admin
Target Server Type : MYSQL
Target Server Version : 50553
File Encoding : 65001
Date: 2018-11-20 18:59:57
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for ad
-- ----------------------------
DROP TABLE IF EXISTS `ad`;
CREATE TABLE `ad` (
`ad_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '广告ID',
`title` varchar(255) NOT NULL COMMENT '广告标题',
`describe` varchar(255) NOT NULL DEFAULT '' COMMENT '描述',
`pic` varchar(255) NOT NULL DEFAULT '' COMMENT '图片的地址',
`jump_type` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT '跳转方式0web 页面1APP内链接2小程序',
`jump_url` varchar(255) NOT NULL DEFAULT '' COMMENT '跳转的url路径',
`ios_url` varchar(255) NOT NULL DEFAULT '' COMMENT 'ios 的类名',
`android_url` varchar(255) NOT NULL DEFAULT '' COMMENT 'android 的类名',
`wxa_appid` varchar(50) NOT NULL DEFAULT '' COMMENT '微信小程序的APPID跳转类型为 1 时有效)',
`channel_type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '渠道名单类型0不做处理1白名单2黑名单',
`channel_list` varchar(255) NOT NULL DEFAULT '' COMMENT '渠道黑名单',
`android_version_type` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT 'android 版本名单类型0不做处理1白名单2黑名单',
`android_version_list` varchar(255) NOT NULL DEFAULT '' COMMENT 'android 版本黑名单',
`ios_version_type` tinyint(4) unsigned NOT NULL DEFAULT '0' COMMENT 'ios 版本名单类型0不做处理1白名单2黑名单',
`ios_version_list` varchar(255) NOT NULL DEFAULT '' COMMENT 'ios 版本黑名单',
`new_show_start_num` int(11) NOT NULL DEFAULT '0' COMMENT '新用户从第几次开始展示',
`new_show_max_num` int(11) NOT NULL DEFAULT '0' COMMENT '新用户最大展示几次',
`old_show_start_num` int(11) NOT NULL DEFAULT '0' COMMENT '老用户第几次开始展示',
`old_show_max_num` int(11) NOT NULL DEFAULT '0' COMMENT '老用户最大展示几次',
`start_time` datetime DEFAULT NULL COMMENT '开始时间',
`end_time` datetime DEFAULT NULL COMMENT '结束时间',
`event_name` varchar(255) NOT NULL DEFAULT '' COMMENT '统计事件名称',
`status` tinyint(4) NOT NULL DEFAULT '0' COMMENT '广告状态0禁用1正常',
`create_time` datetime NOT NULL COMMENT '创建时间',
`modified_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`ad_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='广告表';
-- ----------------------------
-- Table structure for ad_site
-- ----------------------------
DROP TABLE IF EXISTS `ad_site`;
CREATE TABLE `ad_site` (
`site_id` int(11) NOT NULL AUTO_INCREMENT COMMENT '广告位id',
`site_name` varchar(255) NOT NULL COMMENT '广告位名称',
`describe` varchar(255) NOT NULL DEFAULT '' COMMENT '广告位描述',
`ad_ids` varchar(255) NOT NULL DEFAULT '' COMMENT '广告位的广告id用 , 隔开)',
`create_time` datetime NOT NULL COMMENT '创建时间',
`modified_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`site_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='广告位';
-- ----------------------------
-- Table structure for auth_admin
-- ----------------------------
DROP TABLE IF EXISTS `auth_admin`;
CREATE TABLE `auth_admin` (
`id` bigint(20) unsigned NOT NULL AUTO_INCREMENT,
`username` varchar(60) NOT NULL DEFAULT '' COMMENT '用户名',
`password` varchar(64) NOT NULL DEFAULT '' COMMENT '登录密码sp_password加密',
`tel` varchar(50) NOT NULL DEFAULT '' COMMENT '用户手机号',
`email` varchar(100) NOT NULL DEFAULT '' COMMENT '登录邮箱',
`avatar` varchar(255) NOT NULL DEFAULT '' COMMENT '用户头像',
`sex` smallint(1) NOT NULL DEFAULT '0' COMMENT '性别0保密12',
`last_login_ip` varchar(16) NOT NULL DEFAULT '' COMMENT '最后登录ip',
`last_login_time` datetime NOT NULL COMMENT '最后登录时间',
`create_time` datetime NOT NULL COMMENT '注册时间',
`status` int(11) NOT NULL DEFAULT '1' COMMENT '用户状态 0禁用 1正常 2未验证',
PRIMARY KEY (`id`),
KEY `user_login_key` (`username`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='管理员表';
-- ----------------------------
-- Records of auth_admin
-- ----------------------------
INSERT INTO `auth_admin` VALUES ('1', 'admin', 'c3284d0f94606de1fd2af172aba15bf3', 'admin', 'lmxdawn@gmail.com', 'sssss', '0', '127.0.0.1', '2018-07-06 17:19:00', '2018-07-06 17:19:00', '1');
-- ----------------------------
-- Table structure for auth_permission
-- ----------------------------
DROP TABLE IF EXISTS `auth_permission`;
CREATE TABLE `auth_permission` (
`role_id` int(11) unsigned NOT NULL COMMENT '角色',
`permission_rule_id` int(11) NOT NULL DEFAULT '0' COMMENT '权限id',
`type` varchar(30) DEFAULT NULL COMMENT '权限规则分类,请加应用前缀,如admin_'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='权限授权表';
-- ----------------------------
-- Records of auth_permission
-- ----------------------------
INSERT INTO `auth_permission` VALUES ('1', '4', 'admin');
INSERT INTO `auth_permission` VALUES ('1', '3', 'admin');
INSERT INTO `auth_permission` VALUES ('1', '2', 'admin');
INSERT INTO `auth_permission` VALUES ('1', '1', 'admin');
-- ----------------------------
-- Table structure for auth_permission_rule
-- ----------------------------
DROP TABLE IF EXISTS `auth_permission_rule`;
CREATE TABLE `auth_permission_rule` (
`id` int(8) unsigned NOT NULL AUTO_INCREMENT COMMENT '规则编号',
`pid` int(11) NOT NULL DEFAULT '0' COMMENT '父级id',
`name` char(80) NOT NULL DEFAULT '' COMMENT '规则唯一标识',
`title` char(20) NOT NULL DEFAULT '' COMMENT '规则中文名称',
`status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态为1正常为0禁用',
`condition` char(100) NOT NULL DEFAULT '' COMMENT '规则表达式,为空表示存在就验证,不为空表示按照条件验证',
`listorder` int(10) NOT NULL DEFAULT '0' COMMENT '排序,优先级,越小优先级越高',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8 COMMENT='规则表';
-- ----------------------------
-- Records of auth_permission_rule
-- ----------------------------
INSERT INTO `auth_permission_rule` VALUES ('1', '0', 'user_manage', '用户管理', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('2', '1', 'user_manage/admin_manage', '管理组', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('3', '2', 'admin/auth_admin/index', '管理员管理', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('4', '3', 'admin/auth_admin/save', '添加管理员', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('5', '3', 'admin/auth_admin/edit', '编辑管理员', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('6', '3', 'admin/auth_admin/delete', '删除管理员', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('7', '2', 'admin/auth_role/index', '角色管理', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('8', '7', 'admin/auth_role/save', '添加角色', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('9', '7', 'admin/auth_role/edit', '编辑角色', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('10', '7', 'admin/auth_role/delete', '删除角色', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('11', '7', 'admin/auth_role/auth', '角色授权', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('12', '2', 'admin/auth_permission_rule/index', '权限管理', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('13', '12', 'admin/auth_permission_rule/save', '添加权限', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('14', '12', 'admin/auth_permission_rule/edit', '编辑权限', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('15', '12', 'admin/auth_permission_rule/delete', '删除权限', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('16', '0', 'ad_manage', '广告相关', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('17', '16', 'admin/ad_site/index', '广告位管理', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('18', '17', 'admin/ad_site/save', '广告位添加', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('19', '17', 'admin/ad_site/edit', '广告位编辑', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('20', '17', 'admin/ad_site/delete', '广告位删除', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('21', '16', 'admin/ad/index', '广告管理', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('22', '21', 'admin/ad/save', '广告添加', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('23', '21', 'admin/ad/edit', '广告编辑', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('24', '21', 'admin/ad/delete', '广告删除', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
INSERT INTO `auth_permission_rule` VALUES ('25', '17', 'admin/ad_site/adlist', '广告位选择时的广告列表', '1', '', '999', '2018-07-06 17:19:00', '2018-07-06 17:19:00');
-- ----------------------------
-- Table structure for auth_role
-- ----------------------------
DROP TABLE IF EXISTS `auth_role`;
CREATE TABLE `auth_role` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL COMMENT '角色名称',
`pid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT '父角色ID',
`status` tinyint(1) unsigned NOT NULL DEFAULT '0' COMMENT '状态',
`remark` varchar(255) NOT NULL DEFAULT '' COMMENT '备注',
`create_time` datetime NOT NULL COMMENT '创建时间',
`update_time` datetime NOT NULL COMMENT '更新时间',
`listorder` int(3) NOT NULL DEFAULT '0' COMMENT '排序,优先级,越小优先级越高',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='角色表';
-- ----------------------------
-- Records of auth_role
-- ----------------------------
INSERT INTO `auth_role` VALUES ('1', '超级管理员', '0', '1', '拥有网站最高管理员权限!', '2018-07-06 17:19:00', '2018-07-06 17:19:00', '0');
-- ----------------------------
-- Table structure for auth_role_admin
-- ----------------------------
DROP TABLE IF EXISTS `auth_role_admin`;
CREATE TABLE `auth_role_admin` (
`role_id` int(11) unsigned DEFAULT '0' COMMENT '角色 id',
`admin_id` int(11) DEFAULT '0' COMMENT '管理员id'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='用户角色对应表';
-- ----------------------------
-- Records of auth_role_admin
-- ----------------------------
-- ----------------------------
-- Table structure for file_resource
-- ----------------------------
DROP TABLE IF EXISTS `file_resource`;
CREATE TABLE `file_resource` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '资源id',
`tag_id` int(11) NOT NULL DEFAULT '0' COMMENT '资源分组id',
`type` tinyint(4) NOT NULL DEFAULT '0' COMMENT '资源的类型0图片',
`filename` varchar(255) NOT NULL DEFAULT '' COMMENT '资源的原名',
`path` varchar(255) NOT NULL DEFAULT '' COMMENT '资源的路径(不加 域名的地址)',
`size` int(11) NOT NULL DEFAULT '0' COMMENT '大小',
`ext` varchar(10) NOT NULL DEFAULT '' COMMENT '资源的文件后缀',
`create_time` datetime NOT NULL COMMENT '创建时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COMMENT='资源表';
-- ----------------------------
-- Records of file_resource
-- ----------------------------
INSERT INTO `file_resource` VALUES ('1', '1', '0', 'Group 5.png', 'resources/image/20180530/854ae62758c585be5128cf344a511242.png', '7539', 'png', '2018-05-30 20:41:54');
INSERT INTO `file_resource` VALUES ('2', '0', '0', '643353_sdfaf123.png', 'resources/image/20180823/c356ca140f631a512f1c3a5e37a15dc1.png', '11507', 'png', '2018-08-23 13:38:42');
INSERT INTO `file_resource` VALUES ('3', '0', '0', '643353_sdfaf123.png', 'resources/image/20180823/4549c39e9c07c35681ee9fa94e0fc07e.png', '11507', 'png', '2018-08-23 14:05:18');
INSERT INTO `file_resource` VALUES ('4', '0', '0', '', '', '0', '', '2018-08-23 15:45:21');
INSERT INTO `file_resource` VALUES ('5', '0', '0', '', '', '2000000', '', '2018-08-23 15:45:21');
INSERT INTO `file_resource` VALUES ('6', '0', '0', '', '', '0', '', '2018-08-23 15:45:21');
INSERT INTO `file_resource` VALUES ('7', '0', '0', '', '', '0', '', '2018-08-23 15:45:21');
INSERT INTO `file_resource` VALUES ('8', '0', '0', '643353_sdfaf123.png', 'resources/image/20180823/0c424412b231eb8cb969377e15dbb812.png', '11507', 'png', '2018-08-23 15:53:32');
INSERT INTO `file_resource` VALUES ('9', '0', '0', '232826334630444283.png', 'FjBRVPOPF9gLeNBCAvK7jbif4yg8', '9668', 'png', '2018-08-23 16:08:13');
INSERT INTO `file_resource` VALUES ('10', '0', '0', '232826334630444283.png', 'FjBRVPOPF9gLeNBCAvK7jbif4yg8', '9668', 'png', '2018-08-23 16:09:07');
INSERT INTO `file_resource` VALUES ('11', '0', '0', '643353_sdfaf123.png', 'resources/image/20180823/52af5f8556a3af84cee696972b61baf4.png', '11507', 'png', '2018-08-23 17:06:05');
-- ----------------------------
-- Table structure for file_resource_tag
-- ----------------------------
DROP TABLE IF EXISTS `file_resource_tag`;
CREATE TABLE `file_resource_tag` (
`id` int(11) NOT NULL AUTO_INCREMENT COMMENT '资源分组的id',
`tag` varchar(255) NOT NULL DEFAULT '' COMMENT '资源分组的tag',
`create_time` datetime NOT NULL COMMENT '更新时间',
PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='资源的分组表';
-- ----------------------------
-- Records of file_resource_tag
-- ----------------------------
INSERT INTO `file_resource_tag` VALUES ('1', '测试', '2018-05-30 20:41:48');
-- 导出 表 UDIMS.auth_platform 结构

Loading…
Cancel
Save