新增修改

master
dongdingding 2 years ago
parent eee5bf8459
commit becef3054e

@ -21,6 +21,13 @@
<groupId>com.github.xiaoymin</groupId> <groupId>com.github.xiaoymin</groupId>
<artifactId>knife4j-openapi2-spring-boot-starter</artifactId> <artifactId>knife4j-openapi2-spring-boot-starter</artifactId>
</dependency> </dependency>
<!-- mybatisPlus 核心库 -->
<dependency>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.5.3.1</version>
</dependency>
<!-- spring-boot-devtools --> <!-- spring-boot-devtools -->
<dependency> <dependency>

@ -63,8 +63,9 @@ public class BEventAccessController extends BaseController {
*/ */
@ApiOperation(value = "事件推送接⼝") @ApiOperation(value = "事件推送接⼝")
@PostMapping("/imports") @PostMapping("/imports")
public AjaxResult add(@RequestBody BEventAccess bEventAccess) { public AjaxResult add(@RequestBody List<BEventAccess> bEventAccess) {
return toAjax(bEventAccessService.insertBEventAccess(bEventAccess)); bEventAccessService.saveBatch(bEventAccess);
return AjaxResult.success();
} }
/** /**

@ -22,7 +22,7 @@ import java.util.List;
*/ */
@Api(tags = "事件进度推送") @Api(tags = "事件进度推送")
@RestController @RestController
@RequestMapping("/eventProgress") @RequestMapping("/gateway/event/event/eventData/eventProgress/")
public class BEventProgressPushController extends BaseController { public class BEventProgressPushController extends BaseController {
@Autowired @Autowired
private IBEventProgressPushService bEventProgressPushService; private IBEventProgressPushService bEventProgressPushService;
@ -63,8 +63,8 @@ public class BEventProgressPushController extends BaseController {
*/ */
@ApiOperation(value = "新增事件进度推送") @ApiOperation(value = "新增事件进度推送")
@PostMapping("/imports") @PostMapping("/imports")
public AjaxResult add(@RequestBody BEventProgressPush bEventProgressPush) { public AjaxResult add(@RequestBody List<BEventProgressPush> bEventProgressPush) {
return toAjax(bEventProgressPushService.insertBEventProgressPush(bEventProgressPush)); return toAjax(bEventProgressPushService.saveBatch(bEventProgressPush));
} }
/** /**

@ -1,11 +1,17 @@
package com.ruoyi.pt.domain; package com.ruoyi.pt.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
/** /**
* b_event_access * b_event_access
* *
@ -14,12 +20,14 @@ import lombok.Data;
*/ */
@Data @Data
@ApiModel("事件接⼊") @ApiModel("事件接⼊")
public class BEventAccess extends BaseEntity { @TableName("b_event_access")
private static final long serialVersionUID = 1L; public class BEventAccess implements Serializable {
/** /**
* id * id
*/ */
@TableId(type = IdType.AUTO)
private Long id; private Long id;
/** /**

@ -1,5 +1,8 @@
package com.ruoyi.pt.domain; package com.ruoyi.pt.domain;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.ruoyi.common.annotation.Excel; import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity; import com.ruoyi.common.core.domain.BaseEntity;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
@ -8,6 +11,8 @@ import lombok.Data;
import org.apache.commons.lang3.builder.ToStringBuilder; import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle; import org.apache.commons.lang3.builder.ToStringStyle;
import java.io.Serializable;
/** /**
* b_event_progress_push * b_event_progress_push
* *
@ -16,12 +21,14 @@ import org.apache.commons.lang3.builder.ToStringStyle;
*/ */
@Data @Data
@ApiModel("事件进度推送") @ApiModel("事件进度推送")
public class BEventProgressPush extends BaseEntity { @TableName("b_event_progress_push")
public class BEventProgressPush implements Serializable {
private static final long serialVersionUID = 1L; private static final long serialVersionUID = 1L;
/** /**
* id * id
*/ */
@TableId(type = IdType.AUTO)
private Long id; private Long id;
/** /**

@ -1,6 +1,8 @@
package com.ruoyi.pt.mapper; package com.ruoyi.pt.mapper;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.pt.domain.BEventAccess; import com.ruoyi.pt.domain.BEventAccess;
/** /**
@ -9,7 +11,7 @@ import com.ruoyi.pt.domain.BEventAccess;
* @author ruoyi * @author ruoyi
* @date 2023-12-06 * @date 2023-12-06
*/ */
public interface BEventAccessMapper public interface BEventAccessMapper extends BaseMapper<BEventAccess>
{ {
/** /**
* *
@ -33,7 +35,7 @@ public interface BEventAccessMapper
* @param bEventAccess * @param bEventAccess
* @return * @return
*/ */
public int insertBEventAccess(BEventAccess bEventAccess); public int insertBEventAccess(List<BEventAccess> bEventAccess);
/** /**
* *

@ -1,6 +1,9 @@
package com.ruoyi.pt.mapper; package com.ruoyi.pt.mapper;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.ruoyi.pt.domain.BEventAccess;
import com.ruoyi.pt.domain.BEventProgressPush; import com.ruoyi.pt.domain.BEventProgressPush;
/** /**
@ -9,7 +12,7 @@ import com.ruoyi.pt.domain.BEventProgressPush;
* @author ruoyi * @author ruoyi
* @date 2023-12-06 * @date 2023-12-06
*/ */
public interface BEventProgressPushMapper public interface BEventProgressPushMapper extends BaseMapper<BEventProgressPush>
{ {
/** /**
* *
@ -33,7 +36,7 @@ public interface BEventProgressPushMapper
* @param bEventProgressPush * @param bEventProgressPush
* @return * @return
*/ */
public int insertBEventProgressPush(BEventProgressPush bEventProgressPush); public int insertBEventProgressPush(List<BEventProgressPush> bEventProgressPush);
/** /**
* *

@ -1,6 +1,8 @@
package com.ruoyi.pt.service; package com.ruoyi.pt.service;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.pt.domain.BEventAccess; import com.ruoyi.pt.domain.BEventAccess;
/** /**
@ -9,7 +11,7 @@ import com.ruoyi.pt.domain.BEventAccess;
* @author ruoyi * @author ruoyi
* @date 2023-12-06 * @date 2023-12-06
*/ */
public interface IBEventAccessService public interface IBEventAccessService extends IService<BEventAccess>
{ {
/** /**
* *
@ -33,7 +35,7 @@ public interface IBEventAccessService
* @param bEventAccess * @param bEventAccess
* @return * @return
*/ */
public int insertBEventAccess(BEventAccess bEventAccess); public boolean insertBEventAccess(List<BEventAccess> bEventAccess);
/** /**
* *

@ -1,6 +1,9 @@
package com.ruoyi.pt.service; package com.ruoyi.pt.service;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.extension.service.IService;
import com.ruoyi.pt.domain.BEventAccess;
import com.ruoyi.pt.domain.BEventProgressPush; import com.ruoyi.pt.domain.BEventProgressPush;
/** /**
@ -9,7 +12,7 @@ import com.ruoyi.pt.domain.BEventProgressPush;
* @author ruoyi * @author ruoyi
* @date 2023-12-06 * @date 2023-12-06
*/ */
public interface IBEventProgressPushService public interface IBEventProgressPushService extends IService<BEventProgressPush>
{ {
/** /**
* *
@ -33,7 +36,7 @@ public interface IBEventProgressPushService
* @param bEventProgressPush * @param bEventProgressPush
* @return * @return
*/ */
public int insertBEventProgressPush(BEventProgressPush bEventProgressPush); public int insertBEventProgressPush(List<BEventProgressPush> bEventProgressPush);
/** /**
* *

@ -1,6 +1,8 @@
package com.ruoyi.pt.service.impl; package com.ruoyi.pt.service.impl;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.pt.mapper.BEventAccessMapper; import com.ruoyi.pt.mapper.BEventAccessMapper;
@ -14,10 +16,11 @@ import com.ruoyi.pt.service.IBEventAccessService;
* @date 2023-12-06 * @date 2023-12-06
*/ */
@Service @Service
public class BEventAccessServiceImpl implements IBEventAccessService public class BEventAccessServiceImpl extends ServiceImpl<BEventAccessMapper, BEventAccess> implements IBEventAccessService {
{
@Autowired @Autowired
private BEventAccessMapper bEventAccessMapper; private BEventAccessMapper bEventAccessMapper;
@Autowired
private IBEventAccessService ibEventAccessService;
/** /**
* *
@ -26,8 +29,7 @@ public class BEventAccessServiceImpl implements IBEventAccessService
* @return * @return
*/ */
@Override @Override
public BEventAccess selectBEventAccessById(Long id) public BEventAccess selectBEventAccessById(Long id) {
{
return bEventAccessMapper.selectBEventAccessById(id); return bEventAccessMapper.selectBEventAccessById(id);
} }
@ -38,8 +40,7 @@ public class BEventAccessServiceImpl implements IBEventAccessService
* @return * @return
*/ */
@Override @Override
public List<BEventAccess> selectBEventAccessList(BEventAccess bEventAccess) public List<BEventAccess> selectBEventAccessList(BEventAccess bEventAccess) {
{
return bEventAccessMapper.selectBEventAccessList(bEventAccess); return bEventAccessMapper.selectBEventAccessList(bEventAccess);
} }
@ -50,9 +51,8 @@ public class BEventAccessServiceImpl implements IBEventAccessService
* @return * @return
*/ */
@Override @Override
public int insertBEventAccess(BEventAccess bEventAccess) public boolean insertBEventAccess(List<BEventAccess> bEventAccess) {
{ return ibEventAccessService.saveBatch(bEventAccess);
return bEventAccessMapper.insertBEventAccess(bEventAccess);
} }
/** /**
@ -62,8 +62,7 @@ public class BEventAccessServiceImpl implements IBEventAccessService
* @return * @return
*/ */
@Override @Override
public int updateBEventAccess(BEventAccess bEventAccess) public int updateBEventAccess(BEventAccess bEventAccess) {
{
return bEventAccessMapper.updateBEventAccess(bEventAccess); return bEventAccessMapper.updateBEventAccess(bEventAccess);
} }
@ -74,8 +73,7 @@ public class BEventAccessServiceImpl implements IBEventAccessService
* @return * @return
*/ */
@Override @Override
public int deleteBEventAccessByIds(Long[] ids) public int deleteBEventAccessByIds(Long[] ids) {
{
return bEventAccessMapper.deleteBEventAccessByIds(ids); return bEventAccessMapper.deleteBEventAccessByIds(ids);
} }
@ -86,8 +84,7 @@ public class BEventAccessServiceImpl implements IBEventAccessService
* @return * @return
*/ */
@Override @Override
public int deleteBEventAccessById(Long id) public int deleteBEventAccessById(Long id) {
{
return bEventAccessMapper.deleteBEventAccessById(id); return bEventAccessMapper.deleteBEventAccessById(id);
} }
} }

@ -1,6 +1,11 @@
package com.ruoyi.pt.service.impl; package com.ruoyi.pt.service.impl;
import java.util.List; import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.pt.domain.BEventAccess;
import com.ruoyi.pt.mapper.BEventAccessMapper;
import com.ruoyi.pt.service.IBEventAccessService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import com.ruoyi.pt.mapper.BEventProgressPushMapper; import com.ruoyi.pt.mapper.BEventProgressPushMapper;
@ -14,7 +19,7 @@ import com.ruoyi.pt.service.IBEventProgressPushService;
* @date 2023-12-06 * @date 2023-12-06
*/ */
@Service @Service
public class BEventProgressPushServiceImpl implements IBEventProgressPushService public class BEventProgressPushServiceImpl extends ServiceImpl<BEventProgressPushMapper, BEventProgressPush> implements IBEventProgressPushService
{ {
@Autowired @Autowired
private BEventProgressPushMapper bEventProgressPushMapper; private BEventProgressPushMapper bEventProgressPushMapper;
@ -50,7 +55,7 @@ public class BEventProgressPushServiceImpl implements IBEventProgressPushService
* @return * @return
*/ */
@Override @Override
public int insertBEventProgressPush(BEventProgressPush bEventProgressPush) public int insertBEventProgressPush(List<BEventProgressPush> bEventProgressPush)
{ {
return bEventProgressPushMapper.insertBEventProgressPush(bEventProgressPush); return bEventProgressPushMapper.insertBEventProgressPush(bEventProgressPush);
} }

@ -99,8 +99,10 @@ token:
# 令牌有效期默认30分钟 # 令牌有效期默认30分钟
expireTime: 30 expireTime: 30
# MyBatis配置 # MyBatis配置
mybatis: mybatis-plus:
# 搜索指定包别名 # 搜索指定包别名
typeAliasesPackage: com.ruoyi.**.domain typeAliasesPackage: com.ruoyi.**.domain
# 配置mapper的扫描找到所有的mapper.xml映射文件 # 配置mapper的扫描找到所有的mapper.xml映射文件

@ -1,20 +1,8 @@
package com.ruoyi.framework.config; package com.ruoyi.framework.config;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
import javax.sql.DataSource;
import org.apache.ibatis.io.VFS;
import org.apache.ibatis.session.SqlSessionFactory;
import org.mybatis.spring.SqlSessionFactoryBean;
import org.mybatis.spring.boot.autoconfigure.SpringBootVFS;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.core.env.Environment; import org.springframework.core.env.Environment;
import org.springframework.core.io.DefaultResourceLoader;
import org.springframework.core.io.Resource; import org.springframework.core.io.Resource;
import org.springframework.core.io.support.PathMatchingResourcePatternResolver; import org.springframework.core.io.support.PathMatchingResourcePatternResolver;
import org.springframework.core.io.support.ResourcePatternResolver; import org.springframework.core.io.support.ResourcePatternResolver;
@ -22,7 +10,12 @@ import org.springframework.core.type.classreading.CachingMetadataReaderFactory;
import org.springframework.core.type.classreading.MetadataReader; import org.springframework.core.type.classreading.MetadataReader;
import org.springframework.core.type.classreading.MetadataReaderFactory; import org.springframework.core.type.classreading.MetadataReaderFactory;
import org.springframework.util.ClassUtils; import org.springframework.util.ClassUtils;
import com.ruoyi.common.utils.StringUtils;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.HashSet;
import java.util.List;
/** /**
* Mybatis* * Mybatis*
@ -30,103 +23,63 @@ import com.ruoyi.common.utils.StringUtils;
* @author ruoyi * @author ruoyi
*/ */
@Configuration @Configuration
public class MyBatisConfig public class MyBatisConfig {
{ static final String DEFAULT_RESOURCE_PATTERN = "**/*.class";
@Autowired @Autowired
private Environment env; private Environment env;
static final String DEFAULT_RESOURCE_PATTERN = "**/*.class"; public static String setTypeAliasesPackage(String typeAliasesPackage) {
public static String setTypeAliasesPackage(String typeAliasesPackage)
{
ResourcePatternResolver resolver = (ResourcePatternResolver) new PathMatchingResourcePatternResolver(); ResourcePatternResolver resolver = (ResourcePatternResolver) new PathMatchingResourcePatternResolver();
MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver); MetadataReaderFactory metadataReaderFactory = new CachingMetadataReaderFactory(resolver);
List<String> allResult = new ArrayList<String>(); List<String> allResult = new ArrayList<String>();
try try {
{ for (String aliasesPackage : typeAliasesPackage.split(",")) {
for (String aliasesPackage : typeAliasesPackage.split(","))
{
List<String> result = new ArrayList<String>(); List<String> result = new ArrayList<String>();
aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX aliasesPackage = ResourcePatternResolver.CLASSPATH_ALL_URL_PREFIX
+ ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN; + ClassUtils.convertClassNameToResourcePath(aliasesPackage.trim()) + "/" + DEFAULT_RESOURCE_PATTERN;
Resource[] resources = resolver.getResources(aliasesPackage); Resource[] resources = resolver.getResources(aliasesPackage);
if (resources != null && resources.length > 0) if (resources != null && resources.length > 0) {
{
MetadataReader metadataReader = null; MetadataReader metadataReader = null;
for (Resource resource : resources) for (Resource resource : resources) {
{ if (resource.isReadable()) {
if (resource.isReadable())
{
metadataReader = metadataReaderFactory.getMetadataReader(resource); metadataReader = metadataReaderFactory.getMetadataReader(resource);
try try {
{
result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName()); result.add(Class.forName(metadataReader.getClassMetadata().getClassName()).getPackage().getName());
} } catch (ClassNotFoundException e) {
catch (ClassNotFoundException e)
{
e.printStackTrace(); e.printStackTrace();
} }
} }
} }
} }
if (result.size() > 0) if (result.size() > 0) {
{
HashSet<String> hashResult = new HashSet<String>(result); HashSet<String> hashResult = new HashSet<String>(result);
allResult.addAll(hashResult); allResult.addAll(hashResult);
} }
} }
if (allResult.size() > 0) if (allResult.size() > 0) {
{
typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0])); typeAliasesPackage = String.join(",", (String[]) allResult.toArray(new String[0]));
} } else {
else
{
throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包"); throw new RuntimeException("mybatis typeAliasesPackage 路径扫描错误,参数typeAliasesPackage:" + typeAliasesPackage + "未找到任何包");
} }
} } catch (IOException e) {
catch (IOException e)
{
e.printStackTrace(); e.printStackTrace();
} }
return typeAliasesPackage; return typeAliasesPackage;
} }
public Resource[] resolveMapperLocations(String[] mapperLocations) public Resource[] resolveMapperLocations(String[] mapperLocations) {
{
ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver(); ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver();
List<Resource> resources = new ArrayList<Resource>(); List<Resource> resources = new ArrayList<Resource>();
if (mapperLocations != null) if (mapperLocations != null) {
{ for (String mapperLocation : mapperLocations) {
for (String mapperLocation : mapperLocations) try {
{
try
{
Resource[] mappers = resourceResolver.getResources(mapperLocation); Resource[] mappers = resourceResolver.getResources(mapperLocation);
resources.addAll(Arrays.asList(mappers)); resources.addAll(Arrays.asList(mappers));
} } catch (IOException e) {
catch (IOException e)
{
// ignore // ignore
} }
} }
} }
return resources.toArray(new Resource[resources.size()]); return resources.toArray(new Resource[resources.size()]);
} }
@Bean
public SqlSessionFactory sqlSessionFactory(DataSource dataSource) throws Exception
{
String typeAliasesPackage = env.getProperty("mybatis.typeAliasesPackage");
String mapperLocations = env.getProperty("mybatis.mapperLocations");
String configLocation = env.getProperty("mybatis.configLocation");
typeAliasesPackage = setTypeAliasesPackage(typeAliasesPackage);
VFS.addImplClass(SpringBootVFS.class);
final SqlSessionFactoryBean sessionFactory = new SqlSessionFactoryBean();
sessionFactory.setDataSource(dataSource);
sessionFactory.setTypeAliasesPackage(typeAliasesPackage);
sessionFactory.setMapperLocations(resolveMapperLocations(StringUtils.split(mapperLocations, ",")));
sessionFactory.setConfigLocation(new DefaultResourceLoader().getResource(configLocation));
return sessionFactory.getObject();
}
} }

@ -111,75 +111,87 @@
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertBEventAccess" parameterType="BEventAccess" useGeneratedKeys="true" keyProperty="id"> <!-- <insert id="insertBEventAccess" parameterType="java.util.List" >-->
insert into b_event_access <!-- insert into b_event_access-->
<trim prefix="(" suffix=")" suffixOverrides=","> <!-- (inner_event_id,area_code,community_code,grid_code,scence,title,content,event_time,event_coordinate,msg_type,msg_type_name,event_url-->
<if test="innerEventId != null">inner_event_id,</if> <!-- case_status,event_creator,event_creator_tel,event_place_name,event_duration,execute_type,remind_status,event_file,event_label-->
<if test="areaCode != null">area_code,</if> <!-- ,scence_type,scence_typename,acceptance_time,deal_time_limit,refuse_time_limit,feedback_time,-->
<if test="communityCode != null">community_code,</if> <!-- completion_time,main_organizer,enforce_law_organizer,co_organizer)-->
<if test="gridCode != null">grid_code,</if> <!-- values-->
<if test="scence != null">scence,</if> <!-- <foreach collection="list" item="bEventAccess" index="index" separator=",">-->
<if test="title != null">title,</if> <!-- (#{bEventAccess.innerEventId},#{bEventAccess.areaCode},#{bEventAccess.communityCode},#{bEventAccess.gridCode},#{bEventAccess.scence},#{bEventAccess.title},#{bEventAccess.content},#{bEventAccess.eventTime},#{bEventAccess.eventCoordinate},#{bEventAccess.msgType}-->
<if test="content != null">content,</if> <!-- ,#{bEventAccess.msgTypeName},#{bEventAccess.eventUrl},#{bEventAccess.caseStatus},#{bEventAccess.eventCreator},#{bEventAccess.eventCreatorTel},#{bEventAccess.eventPlaceName},#{bEventAccess.eventDuration},#{bEventAccess.executeType},#{bEventAccess.remindStatus}-->
<if test="eventTime != null">event_time,</if> <!-- ,#{bEventAccess.eventFile},#{bEventAccess.eventLabel},#{bEventAccess.scenceType},#{bEventAccess.scenceTypename},#{bEventAccess.acceptanceTime},#{bEventAccess.dealTimeLimit},#{bEventAccess.refuseTimeLimit}-->
<if test="eventCoordinate != null">event_coordinate,</if> <!-- ,#{bEventAccess.feedbackTime},#{bEventAccess.completionTime},#{bEventAccess.mainOrganizer},#{bEventAccess.enforceLawOrganizer},#{bEventAccess.coOrganizer})-->
<if test="msgType != null">msg_type,</if>
<if test="msgTypeName != null">msg_type_name,</if> <!-- </foreach>-->
<if test="eventUrl != null">event_url,</if> <!--&lt;!&ndash; <trim prefix="(" suffix=")" suffixOverrides=",">&ndash;&gt;-->
<if test="caseStatus != null">case_status,</if> <!--&lt;!&ndash; <if test="innerEventId != null">inner_event_id,</if>&ndash;&gt;-->
<if test="eventCreator != null">event_creator,</if> <!--&lt;!&ndash; <if test="areaCode != null">area_code,</if>&ndash;&gt;-->
<if test="eventCreatorTel != null">event_creator_tel,</if> <!--&lt;!&ndash; <if test="communityCode != null">community_code,</if>&ndash;&gt;-->
<if test="eventPlaceName != null">event_place_name,</if> <!--&lt;!&ndash; <if test="gridCode != null">grid_code,</if>&ndash;&gt;-->
<if test="eventDuration != null">event_duration,</if> <!--&lt;!&ndash; <if test="scence != null">scence,</if>&ndash;&gt;-->
<if test="executeType != null">execute_type,</if> <!--&lt;!&ndash; <if test="title != null">title,</if>&ndash;&gt;-->
<if test="remindStatus != null">remind_status,</if> <!--&lt;!&ndash; <if test="content != null">content,</if>&ndash;&gt;-->
<if test="eventFile != null">event_file,</if> <!--&lt;!&ndash; <if test="eventTime != null">event_time,</if>&ndash;&gt;-->
<if test="eventLabel != null">event_label,</if> <!--&lt;!&ndash; <if test="eventCoordinate != null">event_coordinate,</if>&ndash;&gt;-->
<if test="scenceType != null">scence_type,</if> <!--&lt;!&ndash; <if test="msgType != null">msg_type,</if>&ndash;&gt;-->
<if test="scenceTypename != null">scence_typename,</if> <!--&lt;!&ndash; <if test="msgTypeName != null">msg_type_name,</if>&ndash;&gt;-->
<if test="acceptanceTime != null">acceptance_time,</if> <!--&lt;!&ndash; <if test="eventUrl != null">event_url,</if>&ndash;&gt;-->
<if test="dealTimeLimit != null">deal_time_limit,</if> <!--&lt;!&ndash; <if test="caseStatus != null">case_status,</if>&ndash;&gt;-->
<if test="refuseTimeLimit != null">refuse_time_limit,</if> <!--&lt;!&ndash; <if test="eventCreator != null">event_creator,</if>&ndash;&gt;-->
<if test="feedbackTime != null">feedback_time,</if> <!--&lt;!&ndash; <if test="eventCreatorTel != null">event_creator_tel,</if>&ndash;&gt;-->
<if test="completionTime != null">completion_time,</if> <!--&lt;!&ndash; <if test="eventPlaceName != null">event_place_name,</if>&ndash;&gt;-->
<if test="mainOrganizer != null">main_organizer,</if> <!--&lt;!&ndash; <if test="eventDuration != null">event_duration,</if>&ndash;&gt;-->
<if test="enforceLawOrganizer != null">enforce_law_organizer,</if> <!--&lt;!&ndash; <if test="executeType != null">execute_type,</if>&ndash;&gt;-->
<if test="coOrganizer != null">co_organizer,</if> <!--&lt;!&ndash; <if test="remindStatus != null">remind_status,</if>&ndash;&gt;-->
</trim> <!--&lt;!&ndash; <if test="eventFile != null">event_file,</if>&ndash;&gt;-->
<trim prefix="values (" suffix=")" suffixOverrides=","> <!--&lt;!&ndash; <if test="eventLabel != null">event_label,</if>&ndash;&gt;-->
<if test="innerEventId != null">#{innerEventId},</if> <!--&lt;!&ndash; <if test="scenceType != null">scence_type,</if>&ndash;&gt;-->
<if test="areaCode != null">#{areaCode},</if> <!--&lt;!&ndash; <if test="scenceTypename != null">scence_typename,</if>&ndash;&gt;-->
<if test="communityCode != null">#{communityCode},</if> <!--&lt;!&ndash; <if test="acceptanceTime != null">acceptance_time,</if>&ndash;&gt;-->
<if test="gridCode != null">#{gridCode},</if> <!--&lt;!&ndash; <if test="dealTimeLimit != null">deal_time_limit,</if>&ndash;&gt;-->
<if test="scence != null">#{scence},</if> <!--&lt;!&ndash; <if test="refuseTimeLimit != null">refuse_time_limit,</if>&ndash;&gt;-->
<if test="title != null">#{title},</if> <!--&lt;!&ndash; <if test="feedbackTime != null">feedback_time,</if>&ndash;&gt;-->
<if test="content != null">#{content},</if> <!--&lt;!&ndash; <if test="completionTime != null">completion_time,</if>&ndash;&gt;-->
<if test="eventTime != null">#{eventTime},</if> <!--&lt;!&ndash; <if test="mainOrganizer != null">main_organizer,</if>&ndash;&gt;-->
<if test="eventCoordinate != null">#{eventCoordinate},</if> <!--&lt;!&ndash; <if test="enforceLawOrganizer != null">enforce_law_organizer,</if>&ndash;&gt;-->
<if test="msgType != null">#{msgType},</if> <!--&lt;!&ndash; <if test="coOrganizer != null">co_organizer,</if>&ndash;&gt;-->
<if test="msgTypeName != null">#{msgTypeName},</if> <!--&lt;!&ndash; </trim>&ndash;&gt;-->
<if test="eventUrl != null">#{eventUrl},</if> <!--&lt;!&ndash; <trim prefix="values (" suffix=")" suffixOverrides=",">&ndash;&gt;-->
<if test="caseStatus != null">#{caseStatus},</if> <!--&lt;!&ndash; <if test="innerEventId != null">#{innerEventId},</if>&ndash;&gt;-->
<if test="eventCreator != null">#{eventCreator},</if> <!--&lt;!&ndash; <if test="areaCode != null">#{areaCode},</if>&ndash;&gt;-->
<if test="eventCreatorTel != null">#{eventCreatorTel},</if> <!--&lt;!&ndash; <if test="communityCode != null">#{communityCode},</if>&ndash;&gt;-->
<if test="eventPlaceName != null">#{eventPlaceName},</if> <!--&lt;!&ndash; <if test="gridCode != null">#{gridCode},</if>&ndash;&gt;-->
<if test="eventDuration != null">#{eventDuration},</if> <!--&lt;!&ndash; <if test="scence != null">#{scence},</if>&ndash;&gt;-->
<if test="executeType != null">#{executeType},</if> <!--&lt;!&ndash; <if test="title != null">#{title},</if>&ndash;&gt;-->
<if test="remindStatus != null">#{remindStatus},</if> <!--&lt;!&ndash; <if test="content != null">#{content},</if>&ndash;&gt;-->
<if test="eventFile != null">#{eventFile},</if> <!--&lt;!&ndash; <if test="eventTime != null">#{eventTime},</if>&ndash;&gt;-->
<if test="eventLabel != null">#{eventLabel},</if> <!--&lt;!&ndash; <if test="eventCoordinate != null">#{eventCoordinate},</if>&ndash;&gt;-->
<if test="scenceType != null">#{scenceType},</if> <!--&lt;!&ndash; <if test="msgType != null">#{msgType},</if>&ndash;&gt;-->
<if test="scenceTypename != null">#{scenceTypename},</if> <!--&lt;!&ndash; <if test="msgTypeName != null">#{msgTypeName},</if>&ndash;&gt;-->
<if test="acceptanceTime != null">#{acceptanceTime},</if> <!--&lt;!&ndash; <if test="eventUrl != null">#{eventUrl},</if>&ndash;&gt;-->
<if test="dealTimeLimit != null">#{dealTimeLimit},</if> <!--&lt;!&ndash; <if test="caseStatus != null">#{caseStatus},</if>&ndash;&gt;-->
<if test="refuseTimeLimit != null">#{refuseTimeLimit},</if> <!--&lt;!&ndash; <if test="eventCreator != null">#{eventCreator},</if>&ndash;&gt;-->
<if test="feedbackTime != null">#{feedbackTime},</if> <!--&lt;!&ndash; <if test="eventCreatorTel != null">#{eventCreatorTel},</if>&ndash;&gt;-->
<if test="completionTime != null">#{completionTime},</if> <!--&lt;!&ndash; <if test="eventPlaceName != null">#{eventPlaceName},</if>&ndash;&gt;-->
<if test="mainOrganizer != null">#{mainOrganizer},</if> <!--&lt;!&ndash; <if test="eventDuration != null">#{eventDuration},</if>&ndash;&gt;-->
<if test="enforceLawOrganizer != null">#{enforceLawOrganizer},</if> <!--&lt;!&ndash; <if test="executeType != null">#{executeType},</if>&ndash;&gt;-->
<if test="coOrganizer != null">#{coOrganizer},</if> <!--&lt;!&ndash; <if test="remindStatus != null">#{remindStatus},</if>&ndash;&gt;-->
</trim> <!--&lt;!&ndash; <if test="eventFile != null">#{eventFile},</if>&ndash;&gt;-->
</insert> <!--&lt;!&ndash; <if test="eventLabel != null">#{eventLabel},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="scenceType != null">#{scenceType},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="scenceTypename != null">#{scenceTypename},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="acceptanceTime != null">#{acceptanceTime},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="dealTimeLimit != null">#{dealTimeLimit},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="refuseTimeLimit != null">#{refuseTimeLimit},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="feedbackTime != null">#{feedbackTime},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="completionTime != null">#{completionTime},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="mainOrganizer != null">#{mainOrganizer},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="enforceLawOrganizer != null">#{enforceLawOrganizer},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="coOrganizer != null">#{coOrganizer},</if>&ndash;&gt;-->
<!--&lt;!&ndash; </trim>&ndash;&gt;-->
<!-- </insert>-->
<update id="updateBEventAccess" parameterType="BEventAccess"> <update id="updateBEventAccess" parameterType="BEventAccess">
update b_event_access update b_event_access

@ -17,7 +17,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap> </resultMap>
<sql id="selectBEventProgressPushVo"> <sql id="selectBEventProgressPushVo">
select id, inner_event_id, detail, url, progress_time, event_progress_status, event_progress_executor, event_progress_executor_id, event_progress_executor_org from b_event_progress_push select id,
inner_event_id,
detail,
url,
progress_time,
event_progress_status,
event_progress_executor,
event_progress_executor_id,
event_progress_executor_org
from b_event_progress_push
</sql> </sql>
<select id="selectBEventProgressPushList" parameterType="BEventProgressPush" resultMap="BEventProgressPushResult"> <select id="selectBEventProgressPushList" parameterType="BEventProgressPush" resultMap="BEventProgressPushResult">
@ -27,10 +36,18 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="detail != null and detail != ''">and detail = #{detail}</if> <if test="detail != null and detail != ''">and detail = #{detail}</if>
<if test="url != null and url != ''">and url = #{url}</if> <if test="url != null and url != ''">and url = #{url}</if>
<if test="progressTime != null and progressTime != ''">and progress_time = #{progressTime}</if> <if test="progressTime != null and progressTime != ''">and progress_time = #{progressTime}</if>
<if test="eventProgressStatus != null and eventProgressStatus != ''"> and event_progress_status = #{eventProgressStatus}</if> <if test="eventProgressStatus != null and eventProgressStatus != ''">and event_progress_status =
<if test="eventProgressExecutor != null and eventProgressExecutor != ''"> and event_progress_executor = #{eventProgressExecutor}</if> #{eventProgressStatus}
<if test="eventProgressExecutorId != null and eventProgressExecutorId != ''"> and event_progress_executor_id = #{eventProgressExecutorId}</if> </if>
<if test="eventProgressExecutorOrg != null and eventProgressExecutorOrg != ''"> and event_progress_executor_org = #{eventProgressExecutorOrg}</if> <if test="eventProgressExecutor != null and eventProgressExecutor != ''">and event_progress_executor =
#{eventProgressExecutor}
</if>
<if test="eventProgressExecutorId != null and eventProgressExecutorId != ''">and event_progress_executor_id
= #{eventProgressExecutorId}
</if>
<if test="eventProgressExecutorOrg != null and eventProgressExecutorOrg != ''">and
event_progress_executor_org = #{eventProgressExecutorOrg}
</if>
</where> </where>
</select> </select>
@ -39,29 +56,35 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
where id = #{id} where id = #{id}
</select> </select>
<insert id="insertBEventProgressPush" parameterType="BEventProgressPush" useGeneratedKeys="true" keyProperty="id"> <!-- <insert id="insertBEventProgressPush" parameterType="java.util.List" >-->
insert into b_event_progress_push <!-- insert into b_event_progress_push (inner_event_id,detail,url,progress_time,event_progress_status,event_progress_executor-->
<trim prefix="(" suffix=")" suffixOverrides=","> <!-- ,event_progress_executor_id,event_progress_executor_org) values-->
<if test="innerEventId != null">inner_event_id,</if> <!-- <foreach collection="list" item="bEventProgressPush" index="index" separator=",">-->
<if test="detail != null">detail,</if> <!-- (#{bEventProgressPush.innerEventId},#{bEventProgressPush.detail},#{bEventProgressPush.url},#{bEventProgressPush.progressTime},#{bEventProgressPush.eventProgressStatus},-->
<if test="url != null">url,</if> <!-- #{bEventProgressPush.eventProgressExecutor},#{bEventProgressPush.eventProgressExecutorId},#{bEventProgressPush.eventProgressExecutorOrg})-->
<if test="progressTime != null">progress_time,</if>
<if test="eventProgressStatus != null">event_progress_status,</if> <!-- </foreach>-->
<if test="eventProgressExecutor != null">event_progress_executor,</if> <!--&lt;!&ndash; <trim prefix="(" suffix=")" suffixOverrides=",">&ndash;&gt;-->
<if test="eventProgressExecutorId != null">event_progress_executor_id,</if> <!--&lt;!&ndash; <if test="innerEventId != null">inner_event_id,</if>&ndash;&gt;-->
<if test="eventProgressExecutorOrg != null">event_progress_executor_org,</if> <!--&lt;!&ndash; <if test="detail != null">detail,</if>&ndash;&gt;-->
</trim> <!--&lt;!&ndash; <if test="url != null">url,</if>&ndash;&gt;-->
<trim prefix="values (" suffix=")" suffixOverrides=","> <!--&lt;!&ndash; <if test="progressTime != null">progress_time,</if>&ndash;&gt;-->
<if test="innerEventId != null">#{innerEventId},</if> <!--&lt;!&ndash; <if test="eventProgressStatus != null">event_progress_status,</if>&ndash;&gt;-->
<if test="detail != null">#{detail},</if> <!--&lt;!&ndash; <if test="eventProgressExecutor != null">event_progress_executor,</if>&ndash;&gt;-->
<if test="url != null">#{url},</if> <!--&lt;!&ndash; <if test="eventProgressExecutorId != null">event_progress_executor_id,</if>&ndash;&gt;-->
<if test="progressTime != null">#{progressTime},</if> <!--&lt;!&ndash; <if test="eventProgressExecutorOrg != null">event_progress_executor_org,</if>&ndash;&gt;-->
<if test="eventProgressStatus != null">#{eventProgressStatus},</if> <!--&lt;!&ndash; </trim>&ndash;&gt;-->
<if test="eventProgressExecutor != null">#{eventProgressExecutor},</if> <!--&lt;!&ndash; <trim prefix="values (" suffix=")" suffixOverrides=",">&ndash;&gt;-->
<if test="eventProgressExecutorId != null">#{eventProgressExecutorId},</if> <!--&lt;!&ndash; <if test="innerEventId != null">#{innerEventId},</if>&ndash;&gt;-->
<if test="eventProgressExecutorOrg != null">#{eventProgressExecutorOrg},</if> <!--&lt;!&ndash; <if test="detail != null">#{detail},</if>&ndash;&gt;-->
</trim> <!--&lt;!&ndash; <if test="url != null">#{url},</if>&ndash;&gt;-->
</insert> <!--&lt;!&ndash; <if test="progressTime != null">#{progressTime},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="eventProgressStatus != null">#{eventProgressStatus},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="eventProgressExecutor != null">#{eventProgressExecutor},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="eventProgressExecutorId != null">#{eventProgressExecutorId},</if>&ndash;&gt;-->
<!--&lt;!&ndash; <if test="eventProgressExecutorOrg != null">#{eventProgressExecutorOrg},</if>&ndash;&gt;-->
<!--&lt;!&ndash; </trim>&ndash;&gt;-->
<!-- </insert>-->
<update id="updateBEventProgressPush" parameterType="BEventProgressPush"> <update id="updateBEventProgressPush" parameterType="BEventProgressPush">
update b_event_progress_push update b_event_progress_push
@ -79,7 +102,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</update> </update>
<delete id="deleteBEventProgressPushById" parameterType="Long"> <delete id="deleteBEventProgressPushById" parameterType="Long">
delete from b_event_progress_push where id = #{id} delete
from b_event_progress_push
where id = #{id}
</delete> </delete>
<delete id="deleteBEventProgressPushByIds" parameterType="String"> <delete id="deleteBEventProgressPushByIds" parameterType="String">

Loading…
Cancel
Save