询价发行--询价投资者确定

master
@t2652009480 1 year ago
parent 82bc5b7226
commit 6cd1be684d

@ -0,0 +1,98 @@
package com.sztzjy.fund_investment.controller;
import cn.hutool.core.util.IdUtil;
import com.alibaba.fastjson.JSONObject;
import com.github.pagehelper.PageInfo;
import com.nimbusds.jose.shaded.gson.JsonObject;
import com.sztzjy.fund_investment.annotation.AnonymousAccess;
import com.sztzjy.fund_investment.entity.AllotmentObject;
import com.sztzjy.fund_investment.entity.AllotmentObjectExample;
import com.sztzjy.fund_investment.entity.dto.AllotmentObjectDTO;
import com.sztzjy.fund_investment.mapper.AllotmentObjectMapper;
import com.sztzjy.fund_investment.service.InquiryIssuanceService;
import com.sztzjy.fund_investment.util.ResultEntity;
import com.sztzjy.fund_investment.util.excel.FilePortUtil;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.checkerframework.checker.units.qual.A;
import org.springframework.data.domain.PageImpl;
import org.springframework.http.HttpStatus;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
* @author tz
* @date 2023/12/5 8:46
*/
@RestController
@RequestMapping("/inquiryIssuance")
@Api(tags = "学生端--询价发行")
public class InquiryIssuanceController {
@Resource
InquiryIssuanceService inquiryIssuanceService;
@Resource
AllotmentObjectMapper allotmentObjectMapper;
@AnonymousAccess
@GetMapping("/queryInquiryInvestors")
@ApiOperation("询价投资者查看")
public ResultEntity<PageInfo<AllotmentObjectDTO>> queryInquiryInvestors(@ApiParam("流程ID") String flowId,
@ApiParam("每页条数") Integer size,
@ApiParam("当前页") Integer index){
PageInfo<AllotmentObjectDTO> pageInfo=inquiryIssuanceService.queryInquiryInvestors(flowId,size,index);
return new ResultEntity<>(HttpStatus.OK,"成功",pageInfo);
}
// @AnonymousAccess
// @GetMapping("/queryBuiltIn")
// @ApiOperation("内置数据查看")
// public ResultEntity<List<AllotmentObject>> queryBuiltIn(String flowId){
// List<AllotmentObject> list=inquiryIssuanceService.queryBuiltIn(flowId);
// return new ResultEntity<>(HttpStatus.OK,"成功",list);
// }
@AnonymousAccess
@GetMapping("/insertInquiryInvestors")
@ApiOperation("询价咨询者增加所选")
public ResultEntity insertInquiryInvestors(@ApiParam("所选ID") String[] ids,
@ApiParam("流程ID") String flowId){
inquiryIssuanceService.insertInquiryInvestors(ids,flowId);
return new ResultEntity<>(HttpStatus.OK,"新增成功");
}
@AnonymousAccess
@GetMapping("/deleteInquiryInvestors")
@ApiOperation("询价咨询者删除所选")
public ResultEntity deleteInquiryInvestors(@ApiParam("所选ID") String[] ids,
@ApiParam("流程ID") String flowId){
inquiryIssuanceService.deleteInquiryInvestors(ids,flowId);
return new ResultEntity<>(HttpStatus.OK,"删除成功");
}
@AnonymousAccess
@GetMapping("/identifiedInvestorsExport")
@ApiOperation("导出已确定投资者")
public void filePort(HttpServletResponse response, @RequestParam String flowId) {
//导出的表名
String title = IdUtil.simpleUUID();
//表中第一行表头字段
String[] headers = {"配售对象编码", "配售对象名称", "配售对象类型", "投资者编码","投资者名称","投资者类型"};
//实际数据结果集
AllotmentObjectExample allotmentObjectExample = new AllotmentObjectExample();
allotmentObjectExample.createCriteria().andFlowIdEqualTo(flowId).andLogicEqualTo(1);
List<AllotmentObject> allotmentObjectList = allotmentObjectMapper.selectByExample(allotmentObjectExample);
//具体需要写入excel需要哪些字段这些字段取自UserReward类也就是上面的实际数据结果集的泛型
List<String> listColumn = Arrays.asList("name", "studentId", "className", "invoiceScore");
try {
FilePortUtil.exportExcel(response, title, headers, allotmentObjectList, listColumn);
} catch (Exception e) {
e.printStackTrace();
}
}
}

@ -1,5 +1,7 @@
package com.sztzjy.fund_investment.entity;
import java.util.Date;
import io.swagger.annotations.ApiModelProperty;
/**
*
@ -7,6 +9,9 @@ import io.swagger.annotations.ApiModelProperty;
* allotment_object
*/
public class AllotmentObject {
@ApiModelProperty("询价ID")
private String id;
@ApiModelProperty("配售对象编码")
private String allotmentObjectCode;
@ -28,6 +33,20 @@ public class AllotmentObject {
@ApiModelProperty("投资者类型")
private String investorType;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("逻辑删除(0、不展示 1、展示)")
private Integer logic;
public String getId() {
return id;
}
public void setId(String id) {
this.id = id == null ? null : id.trim();
}
public String getAllotmentObjectCode() {
return allotmentObjectCode;
}
@ -83,4 +102,20 @@ public class AllotmentObject {
public void setInvestorType(String investorType) {
this.investorType = investorType == null ? null : investorType.trim();
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Integer getLogic() {
return logic;
}
public void setLogic(Integer logic) {
this.logic = logic;
}
}

@ -1,6 +1,7 @@
package com.sztzjy.fund_investment.entity;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
public class AllotmentObjectExample {
@ -104,6 +105,76 @@ public class AllotmentObjectExample {
criteria.add(new Criterion(condition, value1, value2));
}
public Criteria andIdIsNull() {
addCriterion("id is null");
return (Criteria) this;
}
public Criteria andIdIsNotNull() {
addCriterion("id is not null");
return (Criteria) this;
}
public Criteria andIdEqualTo(String value) {
addCriterion("id =", value, "id");
return (Criteria) this;
}
public Criteria andIdNotEqualTo(String value) {
addCriterion("id <>", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThan(String value) {
addCriterion("id >", value, "id");
return (Criteria) this;
}
public Criteria andIdGreaterThanOrEqualTo(String value) {
addCriterion("id >=", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThan(String value) {
addCriterion("id <", value, "id");
return (Criteria) this;
}
public Criteria andIdLessThanOrEqualTo(String value) {
addCriterion("id <=", value, "id");
return (Criteria) this;
}
public Criteria andIdLike(String value) {
addCriterion("id like", value, "id");
return (Criteria) this;
}
public Criteria andIdNotLike(String value) {
addCriterion("id not like", value, "id");
return (Criteria) this;
}
public Criteria andIdIn(List<String> values) {
addCriterion("id in", values, "id");
return (Criteria) this;
}
public Criteria andIdNotIn(List<String> values) {
addCriterion("id not in", values, "id");
return (Criteria) this;
}
public Criteria andIdBetween(String value1, String value2) {
addCriterion("id between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andIdNotBetween(String value1, String value2) {
addCriterion("id not between", value1, value2, "id");
return (Criteria) this;
}
public Criteria andAllotmentObjectCodeIsNull() {
addCriterion("allotment_object_code is null");
return (Criteria) this;
@ -583,6 +654,126 @@ public class AllotmentObjectExample {
addCriterion("investor_type not between", value1, value2, "investorType");
return (Criteria) this;
}
public Criteria andCreateTimeIsNull() {
addCriterion("create_time is null");
return (Criteria) this;
}
public Criteria andCreateTimeIsNotNull() {
addCriterion("create_time is not null");
return (Criteria) this;
}
public Criteria andCreateTimeEqualTo(Date value) {
addCriterion("create_time =", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotEqualTo(Date value) {
addCriterion("create_time <>", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThan(Date value) {
addCriterion("create_time >", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeGreaterThanOrEqualTo(Date value) {
addCriterion("create_time >=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThan(Date value) {
addCriterion("create_time <", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeLessThanOrEqualTo(Date value) {
addCriterion("create_time <=", value, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeIn(List<Date> values) {
addCriterion("create_time in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotIn(List<Date> values) {
addCriterion("create_time not in", values, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeBetween(Date value1, Date value2) {
addCriterion("create_time between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andCreateTimeNotBetween(Date value1, Date value2) {
addCriterion("create_time not between", value1, value2, "createTime");
return (Criteria) this;
}
public Criteria andLogicIsNull() {
addCriterion("logic is null");
return (Criteria) this;
}
public Criteria andLogicIsNotNull() {
addCriterion("logic is not null");
return (Criteria) this;
}
public Criteria andLogicEqualTo(Integer value) {
addCriterion("logic =", value, "logic");
return (Criteria) this;
}
public Criteria andLogicNotEqualTo(Integer value) {
addCriterion("logic <>", value, "logic");
return (Criteria) this;
}
public Criteria andLogicGreaterThan(Integer value) {
addCriterion("logic >", value, "logic");
return (Criteria) this;
}
public Criteria andLogicGreaterThanOrEqualTo(Integer value) {
addCriterion("logic >=", value, "logic");
return (Criteria) this;
}
public Criteria andLogicLessThan(Integer value) {
addCriterion("logic <", value, "logic");
return (Criteria) this;
}
public Criteria andLogicLessThanOrEqualTo(Integer value) {
addCriterion("logic <=", value, "logic");
return (Criteria) this;
}
public Criteria andLogicIn(List<Integer> values) {
addCriterion("logic in", values, "logic");
return (Criteria) this;
}
public Criteria andLogicNotIn(List<Integer> values) {
addCriterion("logic not in", values, "logic");
return (Criteria) this;
}
public Criteria andLogicBetween(Integer value1, Integer value2) {
addCriterion("logic between", value1, value2, "logic");
return (Criteria) this;
}
public Criteria andLogicNotBetween(Integer value1, Integer value2) {
addCriterion("logic not between", value1, value2, "logic");
return (Criteria) this;
}
}
public static class Criteria extends GeneratedCriteria {

@ -0,0 +1,46 @@
package com.sztzjy.fund_investment.entity.dto;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @author tz
* @date 2023/12/5 14:09
*/
@Data
public class AllotmentObjectDTO {
@ApiModelProperty("询价ID")
private String id;
@ApiModelProperty("配售对象编码")
private String allotmentObjectCode;
@ApiModelProperty("流程ID")
private String flowId;
@ApiModelProperty("配售对象名称")
private String allotmentObjectName;
@ApiModelProperty("配售对象类型")
private String allotmentObjectType;
@ApiModelProperty("投资者编码")
private Integer investorCode;
@ApiModelProperty("投资者名称")
private String investorName;
@ApiModelProperty("投资者类型")
private String investorType;
@ApiModelProperty("创建时间")
private Date createTime;
@ApiModelProperty("逻辑删除(0、不展示 1、展示)")
private Integer logic;
@ApiModelProperty("是否确定")
private String sure;
}

@ -6,14 +6,13 @@ import java.util.List;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface AllotmentObjectMapper {
long countByExample(AllotmentObjectExample example);
int deleteByExample(AllotmentObjectExample example);
int deleteByPrimaryKey(String allotmentObjectCode);
int deleteByPrimaryKey(String id);
int insert(AllotmentObject record);
@ -21,7 +20,7 @@ public interface AllotmentObjectMapper {
List<AllotmentObject> selectByExample(AllotmentObjectExample example);
AllotmentObject selectByPrimaryKey(String allotmentObjectCode);
AllotmentObject selectByPrimaryKey(String id);
int updateByExampleSelective(@Param("record") AllotmentObject record, @Param("example") AllotmentObjectExample example);

@ -0,0 +1,21 @@
package com.sztzjy.fund_investment.service;
import com.github.pagehelper.PageInfo;
import com.sztzjy.fund_investment.entity.AllotmentObject;
import com.sztzjy.fund_investment.entity.dto.AllotmentObjectDTO;
import java.util.List;
/**
* @author tz
* @date 2023/12/5 8:58
*/
public interface InquiryIssuanceService {
PageInfo<AllotmentObjectDTO> queryInquiryInvestors(String flowId, Integer size, Integer index);
// List<AllotmentObject> queryBuiltIn(String flowId);
void insertInquiryInvestors(String[] ids,String flowId);
void deleteInquiryInvestors(String[] ids, String flowId);
}

@ -0,0 +1,121 @@
package com.sztzjy.fund_investment.service.serviceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.sztzjy.fund_investment.entity.AllotmentObject;
import com.sztzjy.fund_investment.entity.AllotmentObjectExample;
import com.sztzjy.fund_investment.entity.dto.AllotmentObjectDTO;
import com.sztzjy.fund_investment.mapper.AllotmentObjectMapper;
import com.sztzjy.fund_investment.service.InquiryIssuanceService;
import com.sztzjy.fund_investment.util.ConvertUtil;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.UUID;
/**
* @author tz
* @date 2023/12/5 8:58
*/
@Service
public class InquiryIssuanceServiceImpl implements InquiryIssuanceService {
@Resource
AllotmentObjectMapper allotmentObjectMapper;
@Resource
ConvertUtil convertUtil;
@Override
public PageInfo<AllotmentObjectDTO> queryInquiryInvestors(String flowId, Integer size, Integer index) {
//开启分页
PageHelper.startPage(size,index);
AllotmentObjectExample allotmentObjectExample=new AllotmentObjectExample();
allotmentObjectExample.createCriteria().andFlowIdEqualTo(flowId);
List<AllotmentObject> allotmentObjects = allotmentObjectMapper.selectByExample(allotmentObjectExample);
List<AllotmentObjectDTO> allotmentObjectDTOS =new ArrayList<>();
if(allotmentObjects.isEmpty()){
AllotmentObjectExample allotmentObjectExample1=new AllotmentObjectExample();
allotmentObjectExample1.createCriteria().andFlowIdIsNull();
List<AllotmentObject> list = allotmentObjectMapper.selectByExample(allotmentObjectExample1);
if(list.size()>0){
for (int i = 0; i < list.size(); i++) {
list.get(i).setId(String.valueOf(UUID.randomUUID()));
list.get(i).setLogic(1);
list.get(i).setFlowId(flowId);
allotmentObjectMapper.insert(list.get(i));
AllotmentObjectDTO allotmentObjectDTO = convertUtil.entityToDTO(list.get(i), AllotmentObjectDTO.class);
allotmentObjectDTO.setSure("是");
allotmentObjectDTOS.add(allotmentObjectDTO);
}
}
PageInfo<AllotmentObjectDTO> pageInfo=new PageInfo<>(allotmentObjectDTOS);
return pageInfo;
}
for (int i = 0; i < allotmentObjects.size(); i++) {
AllotmentObjectDTO allotmentObjectDTO = convertUtil.entityToDTO(allotmentObjects.get(i), AllotmentObjectDTO.class);
if(allotmentObjects.get(i).getLogic()==1){
allotmentObjectDTO.setSure("是");
allotmentObjectDTOS.add(allotmentObjectDTO);
}
if(allotmentObjects.get(i).getLogic()==0){
allotmentObjectDTO.setSure("否");
allotmentObjectDTOS.add(allotmentObjectDTO);
}
}
PageInfo<AllotmentObjectDTO> pageInfo=new PageInfo<>(allotmentObjectDTOS);
return pageInfo;
}
// @Override
// public List<AllotmentObject> queryBuiltIn(String flowId) {
// AllotmentObjectExample allotmentObjectExample=new AllotmentObjectExample();
// allotmentObjectExample.createCriteria().andFlowIdEqualTo(flowId);
// List<AllotmentObject> allotmentObjects = allotmentObjectMapper.selectByExample(allotmentObjectExample);
// if (allotmentObjects.isEmpty()){ //判断是否有已操作过的数据 没有则展示默认数据
// allotmentObjectExample.createCriteria().andFlowIdIsNull();
// List<AllotmentObject> allotmentObjects1 = allotmentObjectMapper.selectByExample(allotmentObjectExample);
// return allotmentObjects1;
// }
// //有则配售对象编码在最近一次新增的基础上自增
// allotmentObjectExample.setOrderByClause("create_time desc");
// List<AllotmentObject> allotmentObjects1 = allotmentObjectMapper.selectByExample(allotmentObjectExample);
// if(allotmentObjects1.size()>0){
// AllotmentObject allotmentObject = allotmentObjects1.get(0);
// List<AllotmentObject> list=new ArrayList<>();
// //取到配售对象编码
// String allotmentObjectCode = allotmentObject.getAllotmentObjectCode();
// String substring = allotmentObjectCode.substring(1); //取到第二位
// String s = substring.replaceAll("^(0+)", ""); //从第一个不为0的开始截取
// Integer i = Integer.valueOf(s);
// i++; //第一个配售对象编码自增
// String number = String.format("I" + "%09d", i);
// allotmentObject.setAllotmentObjectCode(number);
// list.add(allotmentObject);
// i++; //第二个配售对象编码自增
// String number1 = String.format("I" + "%09d", i);
// allotmentObject.setAllotmentObjectCode(number1);
// list.add(allotmentObject);
// return list;
// }
// return null;
// }
@Override
public void insertInquiryInvestors(String[] ids,String flowId) {
for (int i = 0; i < ids.length; i++) {
AllotmentObject allotmentObject = allotmentObjectMapper.selectByPrimaryKey(ids[i]);
allotmentObject.setLogic(1);
allotmentObjectMapper.updateByPrimaryKey(allotmentObject);
}
}
@Override
public void deleteInquiryInvestors(String[] ids, String flowId) {
for (int i = 0; i < ids.length; i++) {
AllotmentObject allotmentObject = allotmentObjectMapper.selectByPrimaryKey(ids[i]);
allotmentObject.setLogic(0);
allotmentObjectMapper.updateByPrimaryKey(allotmentObject);
}
}
}

@ -0,0 +1,117 @@
package com.sztzjy.fund_investment.util;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Component;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
/**
* @Author tanzheng
* @Description : Entity - DTO
* @Date 2023/8/9
* @Param [params]
**/
@Component
public class ConvertUtil {
public static final Logger logger = LoggerFactory.getLogger(ConvertUtil.class);
/**
* EntityDTO
* @param source
* @param target
* @return
* @param <T>
*/
public <T> T entityToDTO(Object source, Class<T> target) {
if (source == null) {
return null;
}
T targetObject = null;
try {
targetObject = target.newInstance();
BeanUtils.copyProperties(source, targetObject);
} catch (Exception e) {
e.printStackTrace();
}
return targetObject;
}
/**
* DTOEntity
* @param source
* @param target
* @return
* @param <T>
*/
public <T> T DTOToEntity(Object source, Class<T> target) {
if (source == null) {
return null;
}
T targetObject = null;
try {
targetObject = target.newInstance();
BeanUtils.copyProperties(source, targetObject);
} catch (Exception e) {
e.printStackTrace();
}
return targetObject;
}
/**
* DTO
* @param sourceList
* @param target
* @return
* @param <T>
*/
public <T> List<T> entityToDTOList(Collection<?> sourceList, Class<T> target) {
if (sourceList == null) {
return null;
}
List<T> targetList = new ArrayList<>(sourceList.size());
try {
for (Object source : sourceList) {
T targetObject = target.newInstance();
BeanUtils.copyProperties(source, targetObject);
targetList.add(targetObject);
}
} catch (Exception e) {
logger.error("convert error ", e);
}
return targetList;
}
/**
* DTO
* @param sourceList
* @param target
* @return
* @param <T>
*/
public <T> List<T> DTOListToEntity(Collection<?> sourceList, Class<T> target) {
if (sourceList == null) {
return null;
}
List<T> targetList = new ArrayList<>(sourceList.size());
try {
for (Object source : sourceList) {
T targetObject = target.newInstance();
BeanUtils.copyProperties(source, targetObject);
targetList.add(targetObject);
}
} catch (Exception e) {
logger.error("convert error ", e);
}
return targetList;
}
}

@ -37,7 +37,7 @@
</javaClientGenerator>
<!-- 需要生成的表 -->
<!-- <table tableName="allotment_object" domainObjectName="AllotmentObject" />-->
<table tableName="allotment_object" domainObjectName="AllotmentObject" />
<!-- <table tableName="flow" domainObjectName="Flow" />-->
<!-- <table tableName="fundraising" domainObjectName="Fundraising" />-->
<!-- <table tableName="inquiry_participation" domainObjectName="InquiryParticipation" />-->
@ -48,7 +48,7 @@
<!-- <table tableName="profit_distribution" domainObjectName="ProfitDistribution" />-->
<!-- <table tableName="profit_management" domainObjectName="ProfitManagement" />-->
<!-- <table tableName="question_answer" domainObjectName="QuestionAnswer" />-->
<table tableName="sys_topics" domainObjectName="Topics" />
<!-- <table tableName="sys_topics" domainObjectName="Topics" />-->
<!-- <table tableName="topic_record" domainObjectName="TopicRecord" />-->
<!-- <table tableName="found_project" domainObjectName="FoundProject" />-->
<!-- <table tableName="training_report" domainObjectName="TrainingReport" />-->

@ -2,13 +2,16 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.sztzjy.fund_investment.mapper.AllotmentObjectMapper">
<resultMap id="BaseResultMap" type="com.sztzjy.fund_investment.entity.AllotmentObject">
<id column="allotment_object_code" jdbcType="VARCHAR" property="allotmentObjectCode" />
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="allotment_object_code" jdbcType="VARCHAR" property="allotmentObjectCode" />
<result column="flow_id" jdbcType="VARCHAR" property="flowId" />
<result column="allotment_object_name" jdbcType="VARCHAR" property="allotmentObjectName" />
<result column="allotment_object_type" jdbcType="VARCHAR" property="allotmentObjectType" />
<result column="investor_code" jdbcType="INTEGER" property="investorCode" />
<result column="investor_name" jdbcType="VARCHAR" property="investorName" />
<result column="investor_type" jdbcType="VARCHAR" property="investorType" />
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
<result column="logic" jdbcType="INTEGER" property="logic" />
</resultMap>
<sql id="Example_Where_Clause">
<where>
@ -69,8 +72,8 @@
</where>
</sql>
<sql id="Base_Column_List">
allotment_object_code, flow_id, allotment_object_name, allotment_object_type, investor_code,
investor_name, investor_type
id, allotment_object_code, flow_id, allotment_object_name, allotment_object_type,
investor_code, investor_name, investor_type, create_time, logic
</sql>
<select id="selectByExample" parameterType="com.sztzjy.fund_investment.entity.AllotmentObjectExample" resultMap="BaseResultMap">
select
@ -90,11 +93,11 @@
select
<include refid="Base_Column_List" />
from allotment_object
where allotment_object_code = #{allotmentObjectCode,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from allotment_object
where allotment_object_code = #{allotmentObjectCode,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</delete>
<delete id="deleteByExample" parameterType="com.sztzjy.fund_investment.entity.AllotmentObjectExample">
delete from allotment_object
@ -103,16 +106,21 @@
</if>
</delete>
<insert id="insert" parameterType="com.sztzjy.fund_investment.entity.AllotmentObject">
insert into allotment_object (allotment_object_code, flow_id, allotment_object_name,
allotment_object_type, investor_code, investor_name,
investor_type)
values (#{allotmentObjectCode,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR}, #{allotmentObjectName,jdbcType=VARCHAR},
#{allotmentObjectType,jdbcType=VARCHAR}, #{investorCode,jdbcType=INTEGER}, #{investorName,jdbcType=VARCHAR},
#{investorType,jdbcType=VARCHAR})
insert into allotment_object (id, allotment_object_code, flow_id,
allotment_object_name, allotment_object_type,
investor_code, investor_name, investor_type,
create_time, logic)
values (#{id,jdbcType=VARCHAR}, #{allotmentObjectCode,jdbcType=VARCHAR}, #{flowId,jdbcType=VARCHAR},
#{allotmentObjectName,jdbcType=VARCHAR}, #{allotmentObjectType,jdbcType=VARCHAR},
#{investorCode,jdbcType=INTEGER}, #{investorName,jdbcType=VARCHAR}, #{investorType,jdbcType=VARCHAR},
#{createTime,jdbcType=TIMESTAMP}, #{logic,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.sztzjy.fund_investment.entity.AllotmentObject">
insert into allotment_object
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="allotmentObjectCode != null">
allotment_object_code,
</if>
@ -134,8 +142,17 @@
<if test="investorType != null">
investor_type,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="logic != null">
logic,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="allotmentObjectCode != null">
#{allotmentObjectCode,jdbcType=VARCHAR},
</if>
@ -157,6 +174,12 @@
<if test="investorType != null">
#{investorType,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
#{createTime,jdbcType=TIMESTAMP},
</if>
<if test="logic != null">
#{logic,jdbcType=INTEGER},
</if>
</trim>
</insert>
<select id="countByExample" parameterType="com.sztzjy.fund_investment.entity.AllotmentObjectExample" resultType="java.lang.Long">
@ -168,6 +191,9 @@
<update id="updateByExampleSelective" parameterType="map">
update allotment_object
<set>
<if test="record.id != null">
id = #{record.id,jdbcType=VARCHAR},
</if>
<if test="record.allotmentObjectCode != null">
allotment_object_code = #{record.allotmentObjectCode,jdbcType=VARCHAR},
</if>
@ -189,6 +215,12 @@
<if test="record.investorType != null">
investor_type = #{record.investorType,jdbcType=VARCHAR},
</if>
<if test="record.createTime != null">
create_time = #{record.createTime,jdbcType=TIMESTAMP},
</if>
<if test="record.logic != null">
logic = #{record.logic,jdbcType=INTEGER},
</if>
</set>
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
@ -196,13 +228,16 @@
</update>
<update id="updateByExample" parameterType="map">
update allotment_object
set allotment_object_code = #{record.allotmentObjectCode,jdbcType=VARCHAR},
set id = #{record.id,jdbcType=VARCHAR},
allotment_object_code = #{record.allotmentObjectCode,jdbcType=VARCHAR},
flow_id = #{record.flowId,jdbcType=VARCHAR},
allotment_object_name = #{record.allotmentObjectName,jdbcType=VARCHAR},
allotment_object_type = #{record.allotmentObjectType,jdbcType=VARCHAR},
investor_code = #{record.investorCode,jdbcType=INTEGER},
investor_name = #{record.investorName,jdbcType=VARCHAR},
investor_type = #{record.investorType,jdbcType=VARCHAR}
investor_type = #{record.investorType,jdbcType=VARCHAR},
create_time = #{record.createTime,jdbcType=TIMESTAMP},
logic = #{record.logic,jdbcType=INTEGER}
<if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" />
</if>
@ -210,6 +245,9 @@
<update id="updateByPrimaryKeySelective" parameterType="com.sztzjy.fund_investment.entity.AllotmentObject">
update allotment_object
<set>
<if test="allotmentObjectCode != null">
allotment_object_code = #{allotmentObjectCode,jdbcType=VARCHAR},
</if>
<if test="flowId != null">
flow_id = #{flowId,jdbcType=VARCHAR},
</if>
@ -228,17 +266,26 @@
<if test="investorType != null">
investor_type = #{investorType,jdbcType=VARCHAR},
</if>
<if test="createTime != null">
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if test="logic != null">
logic = #{logic,jdbcType=INTEGER},
</if>
</set>
where allotment_object_code = #{allotmentObjectCode,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sztzjy.fund_investment.entity.AllotmentObject">
update allotment_object
set flow_id = #{flowId,jdbcType=VARCHAR},
set allotment_object_code = #{allotmentObjectCode,jdbcType=VARCHAR},
flow_id = #{flowId,jdbcType=VARCHAR},
allotment_object_name = #{allotmentObjectName,jdbcType=VARCHAR},
allotment_object_type = #{allotmentObjectType,jdbcType=VARCHAR},
investor_code = #{investorCode,jdbcType=INTEGER},
investor_name = #{investorName,jdbcType=VARCHAR},
investor_type = #{investorType,jdbcType=VARCHAR}
where allotment_object_code = #{allotmentObjectCode,jdbcType=VARCHAR}
investor_type = #{investorType,jdbcType=VARCHAR},
create_time = #{createTime,jdbcType=TIMESTAMP},
logic = #{logic,jdbcType=INTEGER}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>
Loading…
Cancel
Save