Commit 5164814b by 吴迪

【新增】新增接口

parent 0c0d5523
package io.office.modules.manage.controller;
import java.util.Arrays;
import java.util.Map;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import io.office.modules.manage.entity.FirmEntity;
import io.office.modules.manage.service.FirmService;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-29 18:30:59
*/
@RestController
@RequestMapping("/firm")
public class FirmController {
@Autowired
private FirmService firmService;
/**
* 列表
*/
@RequestMapping("/list")
// @RequiresPermissions("manage:firm:list")
public R list(@RequestParam Map<String, Object> params){
PageUtils page = firmService.queryPage(params);
return R.ok().put("page", page);
}
/**
* 信息
*/
@RequestMapping("/info/{fId}")
// @RequiresPermissions("manage:firm:info")
public R info(@PathVariable("fId") Integer fId){
FirmEntity firm = firmService.getById(fId);
return R.ok().put("firm", firm);
}
/**
* 保存
*/
@RequestMapping("/save")
// @RequiresPermissions("manage:firm:save")
public R save(@RequestBody FirmEntity firm){
firmService.save(firm);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
// @RequiresPermissions("manage:firm:update")
public R update(@RequestBody FirmEntity firm){
firmService.updateById(firm);
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
// @RequiresPermissions("manage:firm:delete")
public R delete(@RequestBody Integer[] fIds){
firmService.removeByIds(Arrays.asList(fIds));
return R.ok();
}
}
......@@ -4,9 +4,13 @@ import io.office.common.utils.IPUtils;
import io.office.common.utils.R;
import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.SearchgtinlogEntity;
import io.office.modules.manage.service.FirmService;
import io.office.modules.manage.service.SearchgtinlogService;
import io.office.modules.manage.utils.ESSearchUtils;
import io.office.modules.manage.utils.GLNSearchUtils;
import io.office.modules.manage.utils.UploadUtils;
import io.office.modules.manage.vo.request.DomesticCodeDetailRequest;
import io.office.modules.manage.vo.request.DomesticCodeVo;
import io.office.modules.manage.vo.request.GLNRequestBo;
import io.office.modules.sys.service.SysCaptchaService;
import lombok.extern.slf4j.Slf4j;
......@@ -32,15 +36,17 @@ public class GLNController {
private SysCaptchaService sysCaptchaService;
@Autowired
private SearchgtinlogService searchgtinlogService;
@Autowired
private FirmService firmService;
@Login
@PostMapping("/api/gln")
public R uploadFile(@RequestBody GLNRequestBo glnRequestBo, HttpServletRequest request) {
/* boolean captcha = sysCaptchaService.validate(glnRequestBo.getUuid(), glnRequestBo.getCaptcha());
boolean captcha = sysCaptchaService.validate(glnRequestBo.getUuid(), glnRequestBo.getCaptcha());
if(!captcha){
return R.error("验证码不正确");
}*/
}
SearchgtinlogEntity searchgtinlogEntity = new SearchgtinlogEntity();
searchgtinlogEntity.setCreatedate(new Date());
searchgtinlogEntity.setIp(IPUtils.getIpAddr(request));
......@@ -56,4 +62,77 @@ public class GLNController {
return R.ok().put("data",GLNSearchUtils.getGLNResult("9","GLN",glnRequestBo.getCode(),glnRequestBo.getRequestedLanguage()));
}
/**
* 境内码接口
* @param domesticCodeVo
* @param request
* @return
*/
@Login
@PostMapping("/api/domesticCode")
public R domesticCode(@RequestBody DomesticCodeVo domesticCodeVo, HttpServletRequest request) {
boolean captcha = sysCaptchaService.validate(domesticCodeVo.getUuid(), domesticCodeVo.getCaptcha());
if(!captcha){
return R.error("验证码不正确");
}
SearchgtinlogEntity searchgtinlogEntity = new SearchgtinlogEntity();
searchgtinlogEntity.setCreatedate(new Date());
searchgtinlogEntity.setIp(IPUtils.getIpAddr(request));
if(domesticCodeVo.getType().equals("1")) {
searchgtinlogEntity.setClassStr("境内条码查询:厂商识别代码查询");
} else if(domesticCodeVo.getType().equals("2")){
searchgtinlogEntity.setClassStr("境内条码查询:厂商名称查询");
} else if(domesticCodeVo.getType().equals("3")){
searchgtinlogEntity.setClassStr("境内条码查询:厂商地址查询");
}
searchgtinlogEntity.setKeyword(domesticCodeVo.getCode());
searchgtinlogEntity.setSearchsource(0);
//新增查询日志
searchgtinlogService.save(searchgtinlogEntity);
if(domesticCodeVo.getType().equals("1")) {
return R.ok().put("data", ESSearchUtils.getInfoByCode(searchgtinlogEntity.getKeyword()));
} else if(domesticCodeVo.getType().equals("2")){
return R.ok().put("data", ESSearchUtils.getInfoByName(searchgtinlogEntity.getKeyword()));
} else if(domesticCodeVo.getType().equals("3")){
return R.ok().put("data", ESSearchUtils.getInfoByAddress(searchgtinlogEntity.getKeyword()));
}
return R.error("参数不合法");
}
/**
* 境内码详情
* @param domesticCodeDetailRequest
* @param request
* @return
*/
@Login
@PostMapping("/api/domesticCodeDetail")
public R domesticCodeDetail(@RequestBody DomesticCodeDetailRequest domesticCodeDetailRequest, HttpServletRequest request) {
return R.ok().put("data",firmService.getDetail(domesticCodeDetailRequest));
}
/**
* 查看变更记录
* @param domesticCodeDetailRequest
* @param request
* @return
*/
@Login
@PostMapping("/api/domesticCodeUpdateList")
public R domesticCodeUpdateList(@RequestBody DomesticCodeDetailRequest domesticCodeDetailRequest, HttpServletRequest request) {
return R.ok().put("data",firmService.domesticCodeUpdateList(domesticCodeDetailRequest.getCode()));
}
}
......@@ -97,4 +97,8 @@ public class GlossaryController extends AbstractController {
return R.ok("术语删除成功!");
}
}
package io.office.modules.manage.controller;
import java.util.Arrays;
import java.util.Date;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import io.office.common.utils.IPUtils;
import io.office.modules.app.annotation.Login;
import io.office.modules.manage.entity.SearchgtinlogEntity;
import io.office.modules.manage.entity.ShortCodeEntity;
import io.office.modules.manage.service.SearchgtinlogService;
import io.office.modules.manage.service.ShortCodeService;
import io.office.modules.manage.vo.request.ShortCodeVo;
import io.office.modules.sys.service.SysCaptchaService;
import org.apache.commons.lang.StringUtils;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
......@@ -18,6 +24,7 @@ import org.springframework.web.bind.annotation.RestController;
import io.office.common.utils.PageUtils;
import io.office.common.utils.R;
import javax.servlet.http.HttpServletRequest;
/**
......@@ -32,6 +39,11 @@ import io.office.common.utils.R;
public class ShortCodeController {
@Autowired
private ShortCodeService shortCodeService;
@Autowired
private SearchgtinlogService searchgtinlogService;
@Autowired
private SysCaptchaService sysCaptchaService;
/**
* 列表
......@@ -93,9 +105,31 @@ public class ShortCodeController {
@Login
@RequestMapping("/api/getList")
// @RequiresPermissions("manage:shortcode:delete")
public R getList(@RequestBody ShortCodeVo shortCodeVo){
public R getList(@RequestBody ShortCodeVo shortCodeVo, HttpServletRequest request){
boolean captcha = sysCaptchaService.validate(shortCodeVo.getUuid(), shortCodeVo.getCaptcha());
if(!captcha){
return R.error("验证码不正确");
}
SearchgtinlogEntity searchgtinlogEntity = new SearchgtinlogEntity();
searchgtinlogEntity.setCreatedate(new Date());
searchgtinlogEntity.setIp(IPUtils.getIpAddr(request));
if(StringUtils.isNotBlank(shortCodeVo.getShortCode())) {
searchgtinlogEntity.setKeyword(shortCodeVo.getShortCode());
searchgtinlogEntity.setClassStr("缩短码查询:缩短码查询");
}
if(StringUtils.isNotBlank(shortCodeVo.getFirmName())) {
searchgtinlogEntity.setKeyword(shortCodeVo.getFirmName());
searchgtinlogEntity.setClassStr("缩短码查询:厂商名称查询");
}
if(StringUtils.isNotBlank(shortCodeVo.getRegisterAddress())) {
searchgtinlogEntity.setKeyword(shortCodeVo.getRegisterAddress());
searchgtinlogEntity.setClassStr("缩短码查询:厂商地址查询");
}
searchgtinlogEntity.setSearchsource(0);
//新增查询日志
searchgtinlogService.save(searchgtinlogEntity);
return R.ok().put("data",shortCodeService.getList(shortCodeVo));
}
......
package io.office.modules.manage.dao;
import io.office.modules.manage.entity.FirmEntity;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import io.office.modules.manage.vo.request.DomesticCodeDetailRequest;
import io.office.modules.manage.vo.response.DomesticCodeDetailVo;
import io.office.modules.manage.vo.response.DomesticCodeResponse;
import io.office.modules.manage.vo.response.DomesticCodeUpdateResponse;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-29 18:30:59
*/
@Mapper
public interface FirmDao extends BaseMapper<FirmEntity> {
DomesticCodeDetailVo getDetail(DomesticCodeDetailRequest domesticCodeDetailRequest);
DomesticCodeUpdateResponse domesticCodeUpdateList(@Param(value = "firmId") String firmId);
}
package io.office.modules.manage.entity;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.math.BigDecimal;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-29 18:30:59
*/
@Data
@TableName("firm")
public class FirmEntity implements Serializable {
private static final long serialVersionUID = 1L;
/**
* $column.comments
*/
@TableId
private Integer fId;
/**
* $column.comments
*/
private Date loginDate;
/**
* $column.comments
*/
private String dm;
/**
* $column.comments
*/
private String tJDm;
/**
* $column.comments
*/
private String firmType;
/**
* $column.comments
*/
private String firmName;
/**
* $column.comments
*/
private String firmName1;
/**
* $column.comments
*/
private String registerAddress;
/**
* $column.comments
*/
private String registerAddress1;
/**
* $column.comments
*/
private String registerPostalcode;
/**
* $column.comments
*/
private String address;
/**
* $column.comments
*/
private String address1;
/**
* $column.comments
*/
private String postcode;
/**
* $column.comments
*/
private String certificateCode;
/**
* $column.comments
*/
private String political;
/**
* $column.comments
*/
private BigDecimal registerPrincipal;
/**
* $column.comments
*/
private String coinType;
/**
* $column.comments
*/
private String firmCode;
/**
* $column.comments
*/
private String leader;
/**
* $column.comments
*/
private String leaderTele;
/**
* $column.comments
*/
private String leaderHandset;
/**
* $column.comments
*/
private String contactman;
/**
* $column.comments
*/
private String tele;
/**
* $column.comments
*/
private String fax;
/**
* $column.comments
*/
private String email;
/**
* $column.comments
*/
private String netStation;
/**
* $column.comments
*/
private Integer wishusedNum;
/**
* $column.comments
*/
private Integer usedNum;
/**
* $column.comments
*/
private String branchCode;
/**
* $column.comments
*/
private String logoutFlag;
/**
* $column.comments
*/
private String inFlag;
}
package io.office.modules.manage.service;
import com.baomidou.mybatisplus.extension.service.IService;
import io.office.common.utils.PageUtils;
import io.office.modules.manage.entity.FirmEntity;
import io.office.modules.manage.vo.request.DomesticCodeDetailRequest;
import io.office.modules.manage.vo.response.DomesticCodeDetailVo;
import io.office.modules.manage.vo.response.DomesticCodeUpdateResponse;
import org.apache.ibatis.annotations.Param;
import java.util.Map;
/**
* ${comments}
*
* @author wudi
* @email
* @date 2021-11-29 18:30:59
*/
public interface FirmService extends IService<FirmEntity> {
PageUtils queryPage(Map<String, Object> params);
DomesticCodeDetailVo getDetail(DomesticCodeDetailRequest domesticCodeDetailRequest);
DomesticCodeUpdateResponse domesticCodeUpdateList(String firmId);
}
package io.office.modules.manage.service.impl;
import io.office.modules.manage.vo.request.DomesticCodeDetailRequest;
import io.office.modules.manage.vo.response.DomesticCodeDetailVo;
import io.office.modules.manage.vo.response.DomesticCodeResponse;
import io.office.modules.manage.vo.response.DomesticCodeUpdateResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import io.office.common.utils.PageUtils;
import io.office.common.utils.Query;
import io.office.modules.manage.dao.FirmDao;
import io.office.modules.manage.entity.FirmEntity;
import io.office.modules.manage.service.FirmService;
@Service("firmService")
public class FirmServiceImpl extends ServiceImpl<FirmDao, FirmEntity> implements FirmService {
@Autowired
FirmDao firmDao;
@Override
public PageUtils queryPage(Map<String, Object> params) {
IPage<FirmEntity> page = this.page(
new Query<FirmEntity>().getPage(params),
new QueryWrapper<FirmEntity>()
);
return new PageUtils(page);
}
@Override
public DomesticCodeDetailVo getDetail(DomesticCodeDetailRequest domesticCodeDetailRequest) {
return firmDao.getDetail(domesticCodeDetailRequest);
}
@Override
public DomesticCodeUpdateResponse domesticCodeUpdateList(String firmId) {
return firmDao.domesticCodeUpdateList(firmId.trim());
}
}
\ No newline at end of file
......@@ -33,7 +33,6 @@ public class ShortCodeServiceImpl extends ServiceImpl<ShortCodeDao, ShortCodeEnt
@Override
public List<ShortCodeVo> getList(ShortCodeVo shortCodeVo) {
return baseMapper.getList(shortCodeVo);
}
......
package io.office.modules.manage.utils;
import cn.hutool.json.JSONUtil;
import io.office.modules.manage.vo.response.DomesticCodeResponse;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.ResponseEntity;
import org.springframework.web.client.RestTemplate;
/**
* 
 @description:
*
* @author wudi
* @date 16:40 2021/11/29
*/
public class ESSearchUtils {
private static final String ES_URL = "http://192.168.100.136:9200/ancc_search/_search";
public static DomesticCodeResponse getInfoByCode(String keyword) {
String addressTemplate = "{\n" +
"\t\"query\": {\n" +
"\t\t\"bool\": {\n" +
"\t\t\t\"must\": [{\n" +
"\t\t\t\t\"match\": {\n" +
"\t\t\t\t\t\"code\":\"${queryString}\"\n" +
"\t\t\t\t}\n" +
"\t\t\t}, {\n" +
"\t\t\t\t\"range\": {\n" +
"\t\t\t\t\t\"login_date\": {\n" +
"\t\t\t\t\t\t\"lt\":\""+DateUtils.getAfterDayDate("-3", "yyyy-MM-dd")+"\" \n" +
"\t\t\t\t\t}\n" +
"\t\t\t\t}\n" +
"\t\t\t}],\n" +
"\t\t\t\"must_not\": [{\n" +
"\t\t\t\t\"term\": {\n" +
"\t\t\t\t\t\"code\": \"6901234\"\n" +
"\t\t\t\t}\n" +
"\t\t\t}, {\n" +
"\t\t\t\t\"term\": {\n" +
"\t\t\t\t\t\"code\": \"69290200\"\n" +
"\t\t\t\t}\n" +
"\t\t\t}, {\n" +
"\t\t\t\t\"term\": {\n" +
"\t\t\t\t\t\"code\": \"6900000\"\n" +
"\t\t\t\t}\n" +
"\t\t\t}],\n" +
"\t\t\t\"should\": []\n" +
"\t\t}\n" +
"\t},\n" +
"\t\"from\": 0,\n" +
"\t\"size\": 10,\n" +
"\t\"sort\": [],\n" +
"\t\"aggs\": {}\n" +
"}";
String smsTemplateXml = addressTemplate.replaceAll("\\$\\{queryString\\}", keyword);
RestTemplate restTemplate = new RestTemplate();
//创建请求头
//创建请求头
HttpHeaders headers = new HttpHeaders();
headers.set("Content-Type", "application/json; charset=utf-8");
HttpEntity<String> entity = new HttpEntity<>(smsTemplateXml, headers);
System.out.println(smsTemplateXml);
ResponseEntity<String> responseEntity = restTemplate.postForEntity(ES_URL, entity, String.class);
if (responseEntity.getStatusCode().value() == 200) {
System.out.println(responseEntity.getBody());
return JSONUtil.toBean(responseEntity.getBody(), DomesticCodeResponse.class);
}
return null;
}
public static DomesticCodeResponse getInfoByName(String keyword) {
String nameTemplate = "{\n" +
"\t\"query\": {\n" +
"\t\t\"bool\": {\n" +
"\t\t\t\"must\": [{\n" +
"\t\t\t\t\"match\": {\n" +
"\t\t\t\t\t\"firm_name\": \"${queryString}\"\n" +
"\t\t\t\t}\n" +
"\t\t\t}, {\n" +
"\t\t\t\t\"range\": {\n" +
"\t\t\t\t\t\"login_date\": {\n" +
"\t\t\t\t\t\t\"lt\":\""+DateUtils.getAfterDayDate("-3", "yyyy-MM-dd")+"\"\n" +
"\t\t\t\t\t}\n" +
"\t\t\t\t}\n" +
"\t\t\t}],\n" +
"\t\t\t\"must_not\": [{\n" +
"\t\t\t\t\"term\": {\n" +
"\t\t\t\t\t\"code\": \"6901234\"\n" +
"\t\t\t\t}\n" +
"\t\t\t}, {\n" +
"\t\t\t\t\"term\": {\n" +
"\t\t\t\t\t\"code\": \"69290200\"\n" +
"\t\t\t\t}\n" +
"\t\t\t}, {\n" +
"\t\t\t\t\"term\": {\n" +
"\t\t\t\t\t\"code\": \"6900000\"\n" +
"\t\t\t\t}\n" +
"\t\t\t}],\n" +
"\t\t\t\"should\": []\n" +
"\t\t}\n" +
"\t},\n" +
"\t\"from\": 0,\n" +
"\t\"size\": 10,\n" +
"\t\"sort\": [],\n" +
"\t\"aggs\": {}\n" +
"}";
String smsTemplateXml = nameTemplate.replaceAll("\\$\\{queryString\\}", keyword);
RestTemplate restTemplate = new RestTemplate();
//创建请求头
//创建请求头
HttpHeaders headers = new HttpHeaders();
headers.set("Content-Type", "application/json; charset=utf-8");
HttpEntity<String> entity = new HttpEntity<>(smsTemplateXml, headers);
System.out.println(smsTemplateXml);
ResponseEntity<String> responseEntity = restTemplate.postForEntity(ES_URL, entity, String.class);
if (responseEntity.getStatusCode().value() == 200) {
System.out.println(responseEntity.getBody());
return JSONUtil.toBean(responseEntity.getBody(), DomesticCodeResponse.class);
}
return null;
}
public static DomesticCodeResponse getInfoByAddress(String keyword) {
String addressTemplate = "{\n" +
"\t\"query\": {\n" +
"\t\t\"bool\": {\n" +
"\t\t\t\"must\": [{\n" +
"\t\t\t\t\"match\": {\n" +
"\t\t\t\t\t\"address\": \"${queryString}\"\n" +
"\t\t\t\t}\n" +
"\t\t\t}, {\n" +
"\t\t\t\t\"range\": {\n" +
"\t\t\t\t\t\"login_date\": {\n" +
"\t\t\t\t\t\t\"lt\":\""+DateUtils.getAfterDayDate("-3", "yyyy-MM-dd")+"\"\n" +
"\t\t\t\t\t}\n" +
"\t\t\t\t}\n" +
"\t\t\t}],\n" +
"\t\t\t\"must_not\": [{\n" +
"\t\t\t\t\"term\": {\n" +
"\t\t\t\t\t\"code\": \"6901234\"\n" +
"\t\t\t\t}\n" +
"\t\t\t}, {\n" +
"\t\t\t\t\"term\": {\n" +
"\t\t\t\t\t\"code\": \"69290200\"\n" +
"\t\t\t\t}\n" +
"\t\t\t}, {\n" +
"\t\t\t\t\"term\": {\n" +
"\t\t\t\t\t\"code\": \"6900000\"\n" +
"\t\t\t\t}\n" +
"\t\t\t}],\n" +
"\t\t\t\"should\": []\n" +
"\t\t}\n" +
"\t},\n" +
"\t\"from\": 0,\n" +
"\t\"size\": 10,\n" +
"\t\"sort\": [],\n" +
"\t\"aggs\": {}\n" +
"}";
String smsTemplateXml = addressTemplate.replaceAll("\\$\\{queryString\\}", keyword);
RestTemplate restTemplate = new RestTemplate();
//创建请求头
//创建请求头
HttpHeaders headers = new HttpHeaders();
headers.set("Content-Type", "application/json; charset=utf-8");
HttpEntity<String> entity = new HttpEntity<>(smsTemplateXml, headers);
System.out.println(smsTemplateXml);
ResponseEntity<String> responseEntity = restTemplate.postForEntity(ES_URL, entity, String.class);
if (responseEntity.getStatusCode().value() == 200) {
System.out.println(responseEntity.getBody());
return JSONUtil.toBean(responseEntity.getBody(), DomesticCodeResponse.class);
}
return null;
}
}
package io.office.modules.manage.utils;
/**
*
* 
 @description:
*
* @author wudi
* @date 17:55 2021/11/29
*/
public class IdCardUtils {
public static boolean isIDNumber(String IDNumber) {
if (IDNumber == null || "".equals(IDNumber)) {
return false;
}
// 定义判别用户身份证号的正则表达式(15位或者18位,最后一位可以为字母)
String regularExpression = "^\\d{17}(\\d|x|X)$";
boolean matches = IDNumber.matches(regularExpression);
return matches;
}
}
package io.office.modules.manage.vo.request;
import lombok.Data;
import java.io.Serializable;
/**
*
* 
 @description:
*
* @author wudi
* @date 18:38 2021/11/29
*/
@Data
public class DomesticCodeDetailRequest implements Serializable {
private String f_id;
private String code;
}
package io.office.modules.manage.vo.request;
import lombok.Data;
import java.io.Serializable;
/**
*
* 
 @description:
*
* @author wudi
* @date 16:27 2021/11/29
*/
@Data
public class DomesticCodeVo implements Serializable {
private static final long serialVersionUID = 1L;
private String captcha;
private String uuid;
private String type;
private String code;
}
package io.office.modules.manage.vo.request;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
*
* 
 @description:
*
* @author wudi
* @date 14:29 2021/11/23
*/
@Data
public class GlossaryVo implements Serializable {
private static final long serialVersionUID = 1L;
private String captcha;
private String uuid;
private Integer id;
/**
* $column.comments
*/
private String titleEn;
/**
* $column.comments
*/
private String titleCn;
/**
* $column.comments
*/
private String keyword;
/**
* $column.comments
*/
private String brief;
/**
* $column.comments
*/
private Date releasedate;
/**
* $column.comments
*/
private Date updatedate;
/**
* $column.comments
*/
private String author;
/**
* $column.comments
*/
private String content;
/**
* $column.comments
*/
private Integer hits;
/**
* $column.comments
*/
private String editor;
/**
* $column.comments
*/
private String lasteditor;
}
......@@ -72,8 +72,6 @@ public class ShortCodeVo implements Serializable {
*/
private Date issueDate;
private String fireName;
......
package io.office.modules.manage.vo.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
*
* 
 @description:
*
* @author wudi
* @date 18:35 2021/11/29
*/
@Data
public class DomesticCodeDetailVo implements Serializable {
private String firmName;
private String registerAddress;
private String postcode;
private String code;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date validDate;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date loginDate;
private String logoutFlag;
private String fId;
private String logoutDate;
}
package io.office.modules.manage.vo.response;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
*
* 
 @description:
*
* @author wudi
* @date 11:07 2021/11/30
*/
@Data
public class DomesticCodeUpdateResponse implements Serializable {
private String firmName;
private String firmNameNow;
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date auditDate;
}
<?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="io.office.modules.manage.dao.FirmDao">
<!-- 可根据自己的需求,是否要使用 -->
<resultMap type="io.office.modules.manage.entity.FirmEntity" id="firmMap">
<result property="fId" column="f_id"/>
<result property="loginDate" column="login_date"/>
<result property="dm" column="dm"/>
<result property="tJDm" column="t_j_dm"/>
<result property="firmType" column="firm_type"/>
<result property="firmName" column="firm_name"/>
<result property="firmName1" column="firm_name1"/>
<result property="registerAddress" column="register_address"/>
<result property="registerAddress1" column="register_address1"/>
<result property="registerPostalcode" column="register_postalcode"/>
<result property="address" column="address"/>
<result property="address1" column="address1"/>
<result property="postcode" column="postcode"/>
<result property="certificateCode" column="certificate_code"/>
<result property="political" column="political"/>
<result property="registerPrincipal" column="register_principal"/>
<result property="coinType" column="coin_type"/>
<result property="firmCode" column="firm_code"/>
<result property="leader" column="leader"/>
<result property="leaderTele" column="leader_tele"/>
<result property="leaderHandset" column="leader_handset"/>
<result property="contactman" column="contactman"/>
<result property="tele" column="tele"/>
<result property="fax" column="fax"/>
<result property="email" column="email"/>
<result property="netStation" column="net_station"/>
<result property="wishusedNum" column="wishused_num"/>
<result property="usedNum" column="used_num"/>
<result property="branchCode" column="branch_code"/>
<result property="logoutFlag" column="logout_flag"/>
<result property="inFlag" column="in_flag"/>
</resultMap>
<select id="getDetail" parameterType="io.office.modules.manage.vo.request.DomesticCodeDetailRequest" resultType="io.office.modules.manage.vo.response.DomesticCodeDetailVo">
SELECT
a.firm_name,
a.register_address,
a.postcode,
b.code,
b.valid_date,
b.login_date,
b.logout_flag,
b.f_id,
b.logout_date
FROM
firm a
LEFT JOIN ean_upc b ON a.f_id = b.f_id
LEFT JOIN center_outer.dbo.bulletin c ON c.code = b.code
WHERE
a.f_id = #{f_id}
AND b.code = #{code}
ORDER BY
c.Id DESC
</select>
<select id="domesticCodeUpdateList" parameterType="string" resultType="io.office.modules.manage.vo.response.DomesticCodeUpdateResponse">
SELECT
FIRM_NAME,
FIRM_NAME_NOW,
AUDIT_DATE
FROM
center_outer.dbo.CHANGE_HISTORY
WHERE
(FIRM_NAME &lt;&gt; FIRM_NAME_now)
AND (
(CHANGE_TYPE = '0')
OR (CHANGE_TYPE = '01')
)
and ltrim(rtrim(code))= #{firmId}
</select>
</mapper>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment