高质量运营
This commit is contained in:
5
pom.xml
5
pom.xml
@ -95,6 +95,11 @@
|
|||||||
<scope>system</scope>
|
<scope>system</scope>
|
||||||
<systemPath>${basedir}/lib/bcprov-jdk15to18-1.65.jar</systemPath>
|
<systemPath>${basedir}/lib/bcprov-jdk15to18-1.65.jar</systemPath>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.aliyun.oss</groupId>
|
||||||
|
<artifactId>aliyun-sdk-oss</artifactId>
|
||||||
|
<version>3.10.2</version>
|
||||||
|
</dependency>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
|
|
||||||
<repositories>
|
<repositories>
|
||||||
|
@ -0,0 +1,75 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.entity.*;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.service.*;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityQueryInVO;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.MockDataValue;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import io.swagger.annotations.ApiParam;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "高质量运营客户端")
|
||||||
|
@RequestMapping("/v1/highqualityclient")
|
||||||
|
public class HighQualityClientController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private HighQualityMockDataService highQualityMockDataService;
|
||||||
|
@Resource
|
||||||
|
private HighQualityStyleService highQualityStyleService;
|
||||||
|
@Resource
|
||||||
|
private HighQualityContactService highQualityContactService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("右侧专业线数据")
|
||||||
|
@GetMapping("/data/list")
|
||||||
|
public BaseResponse<List<HighQualityMockData>> getProfessionalDataList() {
|
||||||
|
return BaseResponse.success(highQualityMockDataService.getProfessionalDataList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("活动风采轮播列表")
|
||||||
|
@GetMapping("/eventStyle/banner")
|
||||||
|
public BaseResponse<List<HighQualityStyle>> getHighQualityStyleBanner() {
|
||||||
|
return BaseResponse.success(highQualityStyleService.getHighQualityStyle("banner",null));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("活动联系人列表-按公司分组")
|
||||||
|
@PostMapping("/eventContact/group")
|
||||||
|
public BaseResponse<Map<String, List<HighQualityContact>>> getHighQualityContactGroup(@RequestBody(required = false) HighQualityQueryInVO inVO) {
|
||||||
|
return BaseResponse.success(highQualityContactService.getHighQualityContactGroup(inVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("活动联系人列表")
|
||||||
|
@GetMapping("/eventContact/list")
|
||||||
|
public BaseResponse<List<HighQualityContact>> getHighQualityContactList() {
|
||||||
|
return BaseResponse.success(highQualityContactService.getHighQualityContactList());
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("活动课题列表")
|
||||||
|
@PostMapping("/eventSubject/list")
|
||||||
|
public BaseResponse<List<HighQualityStyle>> getHighQualitySubjectList(@RequestBody(required = false) HighQualityQueryInVO inVO) {
|
||||||
|
return BaseResponse.success(highQualityStyleService.getHighQualitySubjectList(inVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("活动风采列表")
|
||||||
|
@PostMapping("/eventStyle/list")
|
||||||
|
public BaseResponse<List<HighQualityStyle>> getHighQualityStyleList(@RequestBody(required = false) HighQualityQueryInVO inVO) {
|
||||||
|
return BaseResponse.success(highQualityStyleService.getHighQualityStyle("list", inVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("保存联系人")
|
||||||
|
@PostMapping("/save/contact")
|
||||||
|
public BaseResponse<Boolean> saveContact(@RequestBody HighQualityContact inVO) {
|
||||||
|
return BaseResponse.success(highQualityContactService.saveContact(inVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,138 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.controller;
|
||||||
|
|
||||||
|
|
||||||
|
import com.chinaunicom.mall.ebtp.common.base.entity.BasePageResponse;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.poiExport.constant.ExportConstant;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.poiExport.entity.ExcelTable;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.entity.*;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.service.*;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityMaintainInVO;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityMaintainOutVO;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityRightDataVO;
|
||||||
|
import io.swagger.annotations.Api;
|
||||||
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
import org.springframework.web.context.request.RequestContextHolder;
|
||||||
|
import org.springframework.web.context.request.ServletRequestAttributes;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import javax.servlet.http.HttpServletResponse;
|
||||||
|
import java.io.*;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@Api(tags = "高质量运营运维接口")
|
||||||
|
@Slf4j
|
||||||
|
@RequestMapping("/v1/highqualitymaintain")
|
||||||
|
public class HighQualityMaintainController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private HighQualityMockDataService highQualityMockDataService;
|
||||||
|
@Resource
|
||||||
|
private HighQualityStyleService highQualityStyleService;
|
||||||
|
@Resource
|
||||||
|
private HighQualityContactService highQualityContactService;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("保存联系人")
|
||||||
|
@PostMapping("/save/contact")
|
||||||
|
public BaseResponse<Boolean> saveContact(@RequestBody HighQualityContact inVO) {
|
||||||
|
return BaseResponse.success(highQualityContactService.saveContact(inVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("保存攻坚项目")
|
||||||
|
@PostMapping("/save/subject")
|
||||||
|
public BaseResponse<Boolean> saveSubject(@RequestBody HighQualityStyle inVO) {
|
||||||
|
return BaseResponse.success(highQualityStyleService.saveSubject(inVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("保存活动风采")
|
||||||
|
@PostMapping("/save/style")
|
||||||
|
public BaseResponse<Boolean> saveStyle(@RequestBody HighQualityStyle inVO) {
|
||||||
|
return BaseResponse.success(highQualityStyleService.saveStyle(inVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("更新右侧栏数据")
|
||||||
|
@PostMapping("/save/rightData")
|
||||||
|
public BaseResponse<Boolean> saveRightData(@RequestBody HighQualityRightDataVO inVO) {
|
||||||
|
return BaseResponse.success(highQualityMockDataService.saveRightData(inVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("查询右侧栏数据")
|
||||||
|
@PostMapping("/query/rightData")
|
||||||
|
public BaseResponse<HighQualityRightDataVO> queryRightData() {
|
||||||
|
return BaseResponse.success(highQualityMockDataService.queryRightData());
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("后台查询列表")
|
||||||
|
@PostMapping("/styleProject/list")
|
||||||
|
public BasePageResponse<HighQualityMaintainOutVO> queryStyleAndProject(@RequestBody(required = false) HighQualityMaintainInVO inVO) {
|
||||||
|
return BasePageResponse.success(highQualityStyleService.queryStyleAndProject(inVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ApiOperation("保存风采或项目")
|
||||||
|
@PostMapping("/styleProject/save")
|
||||||
|
public BaseResponse<Boolean> saveStyleOrProject(@RequestBody HighQualityMaintainOutVO inVO) {
|
||||||
|
return BaseResponse.success(highQualityStyleService.saveStyleOrProject(inVO));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("发送风采或项目")
|
||||||
|
@GetMapping("/styleProject/send")
|
||||||
|
public BaseResponse<Boolean> sendStyleOrProject(@RequestParam("id") String id,@RequestParam("status") String status) {
|
||||||
|
return BaseResponse.success(highQualityStyleService.sendStyleOrProject(id, status));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("删除风采或项目")
|
||||||
|
@GetMapping("/styleProject/delete")
|
||||||
|
public BaseResponse<Boolean> deleteStyleOrProject(@RequestParam("id") String id) {
|
||||||
|
return BaseResponse.success(highQualityStyleService.deleteStyleOrProject(id));
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
public void exportGetlist(HttpServletResponse response, ExcelTable table) {
|
||||||
|
|
||||||
|
OutputStream out = null;
|
||||||
|
InputStream is = null;
|
||||||
|
File file = null;
|
||||||
|
try {
|
||||||
|
file = ExportConstant.generateExcelByTable(table);
|
||||||
|
response.addHeader("content-disposition", "attachment;filename="
|
||||||
|
+ java.net.URLEncoder.encode(file.getName(), "utf-8"));
|
||||||
|
out = response.getOutputStream();
|
||||||
|
is = new FileInputStream(file);
|
||||||
|
|
||||||
|
byte[] b = new byte[4096];
|
||||||
|
int size = is.read(b);
|
||||||
|
while (size > 0) {
|
||||||
|
out.write(b, 0, size);
|
||||||
|
size = is.read(b);
|
||||||
|
}
|
||||||
|
out.close();
|
||||||
|
is.close();
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error("error: {}, {}", table.toString(), e.getMessage());
|
||||||
|
} finally {
|
||||||
|
try {
|
||||||
|
if (is != null) {
|
||||||
|
is.close();
|
||||||
|
}
|
||||||
|
if (out != null) {
|
||||||
|
out.close();
|
||||||
|
}
|
||||||
|
} catch (IOException e) {
|
||||||
|
log.error("error: {}, {}", table.toString(), e.getMessage());
|
||||||
|
}
|
||||||
|
if (file != null) {
|
||||||
|
boolean delete = file.delete();
|
||||||
|
log.info("delete:{}", delete);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.entity.HighQualityContact;
|
||||||
|
|
||||||
|
public interface HighQualityContactMapper extends BaseMapper<HighQualityContact> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.entity.HighQualityMockData;
|
||||||
|
|
||||||
|
public interface HighQualityMockDataMapper extends BaseMapper<HighQualityMockData> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.dao;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.entity.HighQualityStyle;
|
||||||
|
|
||||||
|
public interface HighQualityStyleMapper extends BaseMapper<HighQualityStyle> {
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,25 @@
|
|||||||
|
<?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.chinaunicom.mall.ebtp.extend.highquality.dao.HighQualityContactMapper">
|
||||||
|
<resultMap id="BaseResultMap"
|
||||||
|
type="com.chinaunicom.mall.ebtp.extend.highquality.entity.HighQualityContact">
|
||||||
|
<result column="id" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="contact_name" jdbcType="VARCHAR" property="contactName"/>
|
||||||
|
<result column="contact_id" jdbcType="VARCHAR" property="contactId"/>
|
||||||
|
<result column="contact_code" jdbcType="VARCHAR" property="contactCode"/>
|
||||||
|
<result column="image" jdbcType="VARCHAR" property="image"/>
|
||||||
|
<result column="sort" jdbcType="INTEGER" property="sort"/>
|
||||||
|
<result column="status" jdbcType="VARCHAR" property="status"/>
|
||||||
|
<result column="contact_unit" jdbcType="VARCHAR" property="contactUnit"/>
|
||||||
|
<result column="contact_unit_code" jdbcType="VARCHAR" property="contactUnitCode"/>
|
||||||
|
<result column="contact_department" jdbcType="VARCHAR" property="contactDepartment"/>
|
||||||
|
<result column="contact_department_code" jdbcType="VARCHAR" property="contactDepartmentCode"/>
|
||||||
|
<result column="contact_class" jdbcType="VARCHAR" property="contactClass"/>
|
||||||
|
<result column="contact_mobiphone" jdbcType="VARCHAR" property="contactMobiphone"/>
|
||||||
|
<result column="contact_email" jdbcType="VARCHAR" property="contactEmail"/>
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,19 @@
|
|||||||
|
<?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.chinaunicom.mall.ebtp.extend.highquality.dao.HighQualityMockDataMapper">
|
||||||
|
<resultMap id="BaseResultMap"
|
||||||
|
type="com.chinaunicom.mall.ebtp.extend.highquality.entity.HighQualityMockData">
|
||||||
|
<result column="id" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="data_class" jdbcType="VARCHAR" property="dataClass"/>
|
||||||
|
<result column="parent_class" jdbcType="VARCHAR" property="parentClass"/>
|
||||||
|
<result column="data_py" jdbcType="VARCHAR" property="dataPy"/>
|
||||||
|
<result column="data_value" jdbcType="VARCHAR" property="dataValue"/>
|
||||||
|
<result column="data_type" jdbcType="VARCHAR" property="dataType"/>
|
||||||
|
<result column="data_name" jdbcType="VARCHAR" property="dataName"/>
|
||||||
|
<result column="data_compare" jdbcType="VARCHAR" property="dataCompare"/>
|
||||||
|
<result column="status" jdbcType="VARCHAR" property="status"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,23 @@
|
|||||||
|
<?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.chinaunicom.mall.ebtp.extend.highquality.dao.HighQualityStyleMapper">
|
||||||
|
<resultMap id="BaseResultMap"
|
||||||
|
type="com.chinaunicom.mall.ebtp.extend.highquality.entity.HighQualityStyle">
|
||||||
|
<result column="id" jdbcType="BIGINT" property="id"/>
|
||||||
|
<result column="title" jdbcType="VARCHAR" property="title"/>
|
||||||
|
<result column="secord_title" jdbcType="VARCHAR" property="secordTitle"/>
|
||||||
|
<result column="image_word" jdbcType="VARCHAR" property="imageWord"/>
|
||||||
|
<result column="title_image" jdbcType="VARCHAR" property="titleImage"/>
|
||||||
|
<result column="category" jdbcType="VARCHAR" property="category"/>
|
||||||
|
<result column="content" jdbcType="VARCHAR" property="content"/>
|
||||||
|
<result column="image" jdbcType="VARCHAR" property="image"/>
|
||||||
|
<result column="sort" jdbcType="INTEGER" property="sort"/>
|
||||||
|
<result column="banner" jdbcType="VARCHAR" property="banner"/>
|
||||||
|
<result column="status" jdbcType="VARCHAR" property="status"/>
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="send_time" jdbcType="TIMESTAMP" property="sendTime"/>
|
||||||
|
</resultMap>
|
||||||
|
|
||||||
|
|
||||||
|
</mapper>
|
@ -0,0 +1,130 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类 EventContact
|
||||||
|
*
|
||||||
|
* @auto.generated
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel
|
||||||
|
@TableName(value = "high_quality_contact", autoResultMap = true)
|
||||||
|
public class HighQualityContact implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系人名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "联系人名称")
|
||||||
|
private String contactName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系人id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "联系人id")
|
||||||
|
private String contactId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系人编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "联系人编码")
|
||||||
|
private String contactCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头像
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "头像")
|
||||||
|
private String image;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "排序")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 0-无效 1-有效
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "状态 0-无效 1-有效")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户单位
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户单位")
|
||||||
|
private String contactUnit;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户单位编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户单位编码")
|
||||||
|
private String contactUnitCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门/处室
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "部门/处室")
|
||||||
|
private String contactDepartment;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 部门/处室编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "部门/处室编码")
|
||||||
|
private String contactDepartmentCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 用户类别
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "用户类别")
|
||||||
|
private String contactClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系电话
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "联系电话")
|
||||||
|
private String contactMobiphone;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 联系邮箱
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "联系邮箱")
|
||||||
|
private String contactEmail;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "备注")
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@TableField(typeHandler = CustomLocalDateTimeTypeHandler.class)
|
||||||
|
private java.time.LocalDateTime createTime;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,88 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.MockDataValue;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类 EventMockData
|
||||||
|
*
|
||||||
|
* @auto.generated
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel
|
||||||
|
@TableName(value = "high_quality_mock_data", autoResultMap = true)
|
||||||
|
public class HighQualityMockData implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据归类
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "数据归类")
|
||||||
|
private String dataClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据父类
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "数据父类")
|
||||||
|
private String parentClass;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据拼音
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "数据拼音")
|
||||||
|
private String dataPy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据值
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "数据值")
|
||||||
|
private String dataValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据单位
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "数据单位")
|
||||||
|
private String dataType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数据名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "数据名称")
|
||||||
|
private String dataName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同比
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "同比")
|
||||||
|
private String dataCompare;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 同比
|
||||||
|
*/
|
||||||
|
@TableField(exist = false)
|
||||||
|
@ApiModelProperty(value = "同比")
|
||||||
|
private List<MockDataValue> data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态 0-无效 1-有效
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "状态 0-无效 1-有效")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,148 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.entity;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类 EventStyle
|
||||||
|
*
|
||||||
|
* @auto.generated
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel
|
||||||
|
@TableName(value = "high_quality_style", autoResultMap = true)
|
||||||
|
public class HighQualityStyle implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@TableId
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 二级标题
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "二级标题")
|
||||||
|
private String secordTitle;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片文字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "图片文字")
|
||||||
|
private String imageWord;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 头图
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "头图")
|
||||||
|
private String titleImage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "类别 1-首页,2-工作风采,3-高质量运营标杆项目,4-运营小课堂")
|
||||||
|
private String category;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动内容正文
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "活动内容正文")
|
||||||
|
private String content;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动图片
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "活动图片")
|
||||||
|
private String image;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "显示排序")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否轮播广告:0-否,1-是
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否轮播广告:0-否,1-是")
|
||||||
|
private String banner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面显示状态: 0-隐藏 1-显示
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "页面显示状态: 0-隐藏 1-显示")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@TableField(typeHandler = CustomLocalDateTimeTypeHandler.class)
|
||||||
|
private java.time.LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发布时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@TableField(typeHandler = CustomLocalDateTimeTypeHandler.class)
|
||||||
|
private java.time.LocalDateTime sendTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件地址")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String filePath;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发布人")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标识
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "删除标识")
|
||||||
|
private String deleteFlag;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正文图片id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "正文图片id")
|
||||||
|
private String contentImageId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文件
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文件")
|
||||||
|
@TableField(exist = false)
|
||||||
|
private MultipartFile file;
|
||||||
|
}
|
@ -0,0 +1,32 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.enums;
|
||||||
|
|
||||||
|
import com.chinaunicom.mall.ebtp.common.exception.service.BusinessExceptionAssert;
|
||||||
|
import lombok.AllArgsConstructor;
|
||||||
|
import lombok.Getter;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@AllArgsConstructor
|
||||||
|
public enum HighQualityExceptionEnum implements BusinessExceptionAssert {
|
||||||
|
/**
|
||||||
|
* 没有党支部信息
|
||||||
|
*/
|
||||||
|
FRAME_EXCEPTION_NO(2200001, ""),
|
||||||
|
FRAME_EXCEPTION_NO_IMAGE_INFO_FAIL(2200002, "文档中心异常!"),
|
||||||
|
FRAME_EXCEPTION_PARAM_IS_NULL_FAIL(2200003, "缺少必要参数!"),
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 判断接口返回是否有数据
|
||||||
|
*/
|
||||||
|
IS_SUCCESS(2200002, "接口返回异常");
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 返回码
|
||||||
|
*/
|
||||||
|
private final int code;
|
||||||
|
/**
|
||||||
|
* 返回消息
|
||||||
|
*/
|
||||||
|
private final String message;
|
||||||
|
}
|
@ -0,0 +1,24 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.entity.HighQualityContact;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityQueryInVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对数据表 high_quality_contact 操作的 service
|
||||||
|
* @author Auto create
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface HighQualityContactService extends IService<HighQualityContact>{
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Map<String, List<HighQualityContact>> getHighQualityContactGroup(HighQualityQueryInVO inVO);
|
||||||
|
|
||||||
|
List<HighQualityContact> getHighQualityContactList();
|
||||||
|
|
||||||
|
boolean saveContact(HighQualityContact inVO);
|
||||||
|
}
|
@ -0,0 +1,22 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.entity.HighQualityMockData;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityRightDataVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对数据表 high_quality_mock_data 操作的 service
|
||||||
|
* @author Auto create
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface HighQualityMockDataService extends IService<HighQualityMockData>{
|
||||||
|
|
||||||
|
|
||||||
|
List<HighQualityMockData> getProfessionalDataList();
|
||||||
|
|
||||||
|
boolean saveRightData(HighQualityRightDataVO inVO);
|
||||||
|
|
||||||
|
HighQualityRightDataVO queryRightData();
|
||||||
|
}
|
@ -0,0 +1,35 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.service;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.IService;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.entity.HighQualityStyle;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityMaintainInVO;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityMaintainOutVO;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityQueryInVO;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对数据表 high_quality_style 操作的 service
|
||||||
|
* @author Auto create
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public interface HighQualityStyleService extends IService<HighQualityStyle>{
|
||||||
|
|
||||||
|
|
||||||
|
List<HighQualityStyle> getHighQualityStyle(String type, HighQualityQueryInVO inVO);
|
||||||
|
|
||||||
|
boolean saveStyle(HighQualityStyle inVO);
|
||||||
|
|
||||||
|
IPage<HighQualityMaintainOutVO> queryStyleAndProject(HighQualityMaintainInVO inVO);
|
||||||
|
|
||||||
|
boolean saveStyleOrProject(HighQualityMaintainOutVO inVO);
|
||||||
|
|
||||||
|
boolean sendStyleOrProject(String id,String status);
|
||||||
|
|
||||||
|
boolean deleteStyleOrProject(String id);
|
||||||
|
|
||||||
|
List<HighQualityStyle> getHighQualitySubjectList(HighQualityQueryInVO inVO);
|
||||||
|
|
||||||
|
boolean saveSubject(HighQualityStyle inVO);
|
||||||
|
}
|
@ -0,0 +1,60 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.dao.HighQualityContactMapper;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.entity.HighQualityContact;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.service.HighQualityContactService;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityQueryInVO;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.*;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对数据表 event_contact 操作的 serviceImpl
|
||||||
|
* @author Auto create
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class HighQualityContactServiceImpl extends ServiceImpl<HighQualityContactMapper, HighQualityContact> implements HighQualityContactService {
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Map<String, List<HighQualityContact>> getHighQualityContactGroup(HighQualityQueryInVO inVO) {
|
||||||
|
LambdaQueryWrapper<HighQualityContact> query = Wrappers.lambdaQuery();
|
||||||
|
query.eq(HighQualityContact::getStatus, "1");
|
||||||
|
if (ObjectUtil.isNotNull(inVO) && StrUtil.isNotBlank(inVO.getParam())) {
|
||||||
|
query.eq(HighQualityContact::getContactUnit, inVO.getParam());
|
||||||
|
}
|
||||||
|
return this.list(query).stream().sorted(Comparator.comparing(HighQualityContact::getSort)).collect(Collectors.groupingBy(HighQualityContact::getContactUnit,LinkedHashMap::new,Collectors.toList()));
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<HighQualityContact> getHighQualityContactList() {
|
||||||
|
LambdaQueryWrapper<HighQualityContact> query = Wrappers.lambdaQuery();
|
||||||
|
query.eq(HighQualityContact::getStatus, "1");
|
||||||
|
return this.list(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean saveContact(HighQualityContact inVO) {
|
||||||
|
if (StrUtil.isNotBlank(inVO.getId())) {
|
||||||
|
return this.updateById(inVO);
|
||||||
|
}
|
||||||
|
inVO.setId(PropertyUtils.getSnowflakeId());
|
||||||
|
inVO.setStatus("1");
|
||||||
|
inVO.setSort(99);
|
||||||
|
inVO.setCreateTime(LocalDateTime.now());
|
||||||
|
return this.save(inVO);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,112 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.service.impl;
|
||||||
|
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.dao.HighQualityMockDataMapper;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.entity.HighQualityMockData;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.service.HighQualityMockDataService;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityRightDataVO;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.entity.MockDataValue;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.partyMemberEvent.service.EventPartyBranchService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对数据表 high_quality_mock_data 操作的 serviceImpl
|
||||||
|
* @author Auto create
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class HighQualityMockDataServiceImpl extends ServiceImpl<HighQualityMockDataMapper, HighQualityMockData> implements HighQualityMockDataService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private EventPartyBranchService eventPartyBranchService;
|
||||||
|
@Override
|
||||||
|
public List<HighQualityMockData> getProfessionalDataList() {
|
||||||
|
LambdaQueryWrapper<HighQualityMockData> wrapper = Wrappers.lambdaQuery();
|
||||||
|
wrapper.eq(HighQualityMockData::getStatus, "1");
|
||||||
|
List<HighQualityMockData> list = this.list(wrapper);
|
||||||
|
List<HighQualityMockData> returnList = list.stream().filter(f -> StrUtil.isBlank(f.getParentClass()) ).collect(Collectors.toList());
|
||||||
|
|
||||||
|
Map<String, List<HighQualityMockData>> map = list.stream().filter(f -> StrUtil.isNotBlank(f.getParentClass())).collect(Collectors.groupingBy(HighQualityMockData::getParentClass));
|
||||||
|
Map<String, Integer> partyBranchMemberCount = eventPartyBranchService.getPartyBranchMemberCount();
|
||||||
|
|
||||||
|
returnList.forEach(f -> {
|
||||||
|
if ("dysl".equals(f.getDataPy())) {
|
||||||
|
f.setDataValue(partyBranchMemberCount.get("member").toString());
|
||||||
|
}
|
||||||
|
if ("dzbsl".equals(f.getDataPy())) {
|
||||||
|
f.setDataValue(partyBranchMemberCount.get("branch").toString());
|
||||||
|
}
|
||||||
|
List<HighQualityMockData> dataList = map.get(f.getDataPy());
|
||||||
|
if (ObjectUtil.isNotNull(dataList) && !dataList.isEmpty()) {
|
||||||
|
List<MockDataValue> newList = new ArrayList<>();
|
||||||
|
dataList.forEach(l -> newList.add(MockDataValue.builder().name(l.getDataName()).value(l.getDataValue()).build()));
|
||||||
|
f.setData(newList);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return returnList;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean saveRightData(HighQualityRightDataVO inVO) {
|
||||||
|
LambdaQueryWrapper<HighQualityMockData> query = Wrappers.lambdaQuery();
|
||||||
|
List<HighQualityMockData> list = this.list(query.eq(HighQualityMockData::getStatus, "1"));
|
||||||
|
list.forEach(l -> {
|
||||||
|
String dataPy = l.getDataPy();
|
||||||
|
if ("ddjyze".equals(dataPy) && StrUtil.isNotBlank(inVO.getDdjyze())) {
|
||||||
|
l.setDataValue(inVO.getDdjyze());
|
||||||
|
}
|
||||||
|
if ("ddzsl".equals(dataPy) && StrUtil.isNotBlank(inVO.getDdzsl())) {
|
||||||
|
l.setDataValue(inVO.getDdzsl());
|
||||||
|
}
|
||||||
|
if ("spsl".equals(dataPy) && StrUtil.isNotBlank(inVO.getSpsl())) {
|
||||||
|
l.setDataValue(inVO.getSpsl());
|
||||||
|
}
|
||||||
|
if ("xysl".equals(dataPy) && StrUtil.isNotBlank(inVO.getXysl())) {
|
||||||
|
l.setDataValue(inVO.getXysl());
|
||||||
|
}
|
||||||
|
if ("yxdy".equals(dataPy) && StrUtil.isNotBlank(inVO.getYxdy())) {
|
||||||
|
l.setDataValue(inVO.getYxdy());
|
||||||
|
}
|
||||||
|
if ("ftrs".equals(dataPy) && StrUtil.isNotBlank(inVO.getFtrs())) {
|
||||||
|
l.setDataValue(inVO.getFtrs());
|
||||||
|
}
|
||||||
|
if ("bzxq".equals(dataPy) && StrUtil.isNotBlank(inVO.getBzxq())) {
|
||||||
|
l.setDataValue(inVO.getBzxq());
|
||||||
|
}
|
||||||
|
if ("gjknxm".equals(dataPy) && StrUtil.isNotBlank(inVO.getGjknxm())) {
|
||||||
|
l.setDataValue(inVO.getGjknxm());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
return this.saveOrUpdateBatch(list);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public HighQualityRightDataVO queryRightData() {
|
||||||
|
LambdaQueryWrapper<HighQualityMockData> query = Wrappers.lambdaQuery();
|
||||||
|
List<HighQualityMockData> list = this.list(query.eq(HighQualityMockData::getStatus, "1"));
|
||||||
|
Map<String, HighQualityMockData> dataMap = list.stream().collect(Collectors.toMap(HighQualityMockData::getDataPy, Function.identity()));
|
||||||
|
HighQualityRightDataVO dataVO = new HighQualityRightDataVO();
|
||||||
|
dataVO.setDdjyze(dataMap.get("ddjyze").getDataValue());
|
||||||
|
dataVO.setDdzsl(dataMap.get("ddzsl").getDataValue());
|
||||||
|
dataVO.setSpsl(dataMap.get("spsl").getDataValue());
|
||||||
|
dataVO.setXysl(dataMap.get("xysl").getDataValue());
|
||||||
|
dataVO.setYxdy(dataMap.get("yxdy").getDataValue());
|
||||||
|
dataVO.setFtrs(dataMap.get("ftrs").getDataValue());
|
||||||
|
dataVO.setBzxq(dataMap.get("bzxq").getDataValue());
|
||||||
|
dataVO.setGjknxm(dataMap.get("gjknxm").getDataValue());
|
||||||
|
|
||||||
|
return dataVO;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,230 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.base.entity.BaseResponse;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.feign.client.DocumentCenterService;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.feign.entity.DocumentDataVO;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.dao.HighQualityStyleMapper;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.entity.HighQualityStyle;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.enums.HighQualityExceptionEnum;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.service.HighQualityStyleService;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityMaintainInVO;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityMaintainOutVO;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.highquality.vo.HighQualityQueryInVO;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.uploadOss.service.IUploadOssService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.function.Function;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 对数据表 event_style 操作的 serviceImpl
|
||||||
|
* @author Auto create
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class HighQualityStyleServiceImpl extends ServiceImpl<HighQualityStyleMapper, HighQualityStyle> implements HighQualityStyleService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private DocumentCenterService documentCenterService;
|
||||||
|
@Resource
|
||||||
|
private IUploadOssService iUploadOssService;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public List<HighQualityStyle> getHighQualityStyle(String type, HighQualityQueryInVO inVO) {
|
||||||
|
LambdaQueryWrapper<HighQualityStyle> query = Wrappers.lambdaQuery();
|
||||||
|
if (ObjectUtil.isNotNull(inVO) && StrUtil.isNotBlank(inVO.getParam())) {
|
||||||
|
query.like(HighQualityStyle::getTitle, inVO.getParam());
|
||||||
|
}
|
||||||
|
query.orderByDesc(HighQualityStyle::getCreateTime);
|
||||||
|
List<HighQualityStyle> list;
|
||||||
|
if ("banner".equals(type)) {
|
||||||
|
query.eq(HighQualityStyle::getCategory, "1").eq(HighQualityStyle::getStatus, "1").orderByAsc(HighQualityStyle::getSort);
|
||||||
|
} else {
|
||||||
|
query.eq(HighQualityStyle::getCategory, "2").eq(HighQualityStyle::getStatus, "1").orderByAsc(HighQualityStyle::getSort);
|
||||||
|
}
|
||||||
|
query.ne(HighQualityStyle::getDeleteFlag, "1");
|
||||||
|
list = this.list(query);
|
||||||
|
List<String> imageIdList = list.stream().map(HighQualityStyle::getImage).filter(StrUtil::isNotBlank).distinct().collect(Collectors.toList());
|
||||||
|
BaseResponse<List<DocumentDataVO>> queryReturn = documentCenterService.queryReturn(imageIdList);
|
||||||
|
log.info("文档中心返回:{}", queryReturn.toString());
|
||||||
|
HighQualityExceptionEnum.FRAME_EXCEPTION_NO_IMAGE_INFO_FAIL.customValid(!queryReturn.isSuccess());
|
||||||
|
Map<String, DocumentDataVO> collect = queryReturn.getData().stream().collect(Collectors.toMap(DocumentDataVO::getObjectId, Function.identity(),(o1,o2) -> o1));
|
||||||
|
|
||||||
|
list.forEach(l -> l.setFilePath(collect.get(l.getImage()) == null ? "" : collect.get(l.getImage()).getFilePath()));
|
||||||
|
return list;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean saveStyle(HighQualityStyle inVO) {
|
||||||
|
if(inVO.getCategory().equals("4")){
|
||||||
|
try {
|
||||||
|
String filepath=iUploadOssService.uploadFile(inVO.getFile(),"oss/highquality");
|
||||||
|
inVO.setImage(filepath);
|
||||||
|
} catch (IOException e) {
|
||||||
|
HighQualityExceptionEnum.FRAME_EXCEPTION_NO.customValidName("文件上传失败",true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(inVO.getId())) {
|
||||||
|
return this.updateById(inVO);
|
||||||
|
}
|
||||||
|
if(!inVO.getCategory().equals("4")){
|
||||||
|
if (StrUtil.isNotBlank(inVO.getImage())) {
|
||||||
|
inVO.setTitleImage(inVO.getImage());
|
||||||
|
} else {
|
||||||
|
inVO.setImage(inVO.getTitleImage());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
inVO.setId(PropertyUtils.getSnowflakeId());
|
||||||
|
inVO.setStatus("1");
|
||||||
|
inVO.setCreateTime(LocalDateTime.now());
|
||||||
|
|
||||||
|
return this.save(inVO);
|
||||||
|
}
|
||||||
|
@Override
|
||||||
|
public List<HighQualityStyle> getHighQualitySubjectList(HighQualityQueryInVO inVO) {
|
||||||
|
LambdaQueryWrapper<HighQualityStyle> query = Wrappers.lambdaQuery();
|
||||||
|
query.eq(HighQualityStyle::getStatus, "1");
|
||||||
|
query.eq(HighQualityStyle::getCategory, "3");
|
||||||
|
if (ObjectUtil.isNotNull(inVO)) {
|
||||||
|
query.like(StrUtil.isNotBlank(inVO.getParam()), HighQualityStyle::getTitle, inVO.getParam());
|
||||||
|
}
|
||||||
|
query.ne(HighQualityStyle::getDeleteFlag, "1");
|
||||||
|
query.orderByDesc(HighQualityStyle::getCreateTime);
|
||||||
|
|
||||||
|
return this.list(query);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean saveSubject(HighQualityStyle inVO) {
|
||||||
|
if (StrUtil.isNotBlank(inVO.getId())) {
|
||||||
|
return this.updateById(inVO);
|
||||||
|
}
|
||||||
|
inVO.setId(PropertyUtils.getSnowflakeId());
|
||||||
|
inVO.setStatus("1");
|
||||||
|
inVO.setCreateTime(LocalDateTime.now());
|
||||||
|
return this.save(inVO);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public IPage<HighQualityMaintainOutVO> queryStyleAndProject(HighQualityMaintainInVO inVO) {
|
||||||
|
|
||||||
|
LambdaQueryWrapper<HighQualityStyle> queryStyle = Wrappers.lambdaQuery();
|
||||||
|
queryStyle.ne(HighQualityStyle::getDeleteFlag, "1");
|
||||||
|
|
||||||
|
if (StrUtil.isNotBlank(inVO.getTitle())) {
|
||||||
|
queryStyle.like(HighQualityStyle::getTitle, inVO.getTitle());
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(inVO.getType())) {
|
||||||
|
queryStyle.eq(HighQualityStyle::getCategory, inVO.getType());
|
||||||
|
}
|
||||||
|
if (StrUtil.isNotBlank(inVO.getStatus())) {
|
||||||
|
queryStyle.eq(HighQualityStyle::getStatus, inVO.getStatus());
|
||||||
|
}
|
||||||
|
if (ObjectUtil.isNotNull(inVO.getStartTime())) {
|
||||||
|
queryStyle.gt(HighQualityStyle::getSendTime, inVO.getStartTime());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (ObjectUtil.isNotNull(inVO.getEndTime())) {
|
||||||
|
queryStyle.lt(HighQualityStyle::getSendTime, inVO.getEndTime());
|
||||||
|
}
|
||||||
|
queryStyle.orderByDesc(HighQualityStyle::getCreateTime);
|
||||||
|
Page<HighQualityStyle> page = new Page<>(inVO.getPageNo(), inVO.getPageSize());
|
||||||
|
|
||||||
|
Page<HighQualityStyle> stylePage = this.page(page, queryStyle);
|
||||||
|
|
||||||
|
List<HighQualityMaintainOutVO> outVOList = new ArrayList<>();
|
||||||
|
|
||||||
|
if (!stylePage.getRecords().isEmpty()) {
|
||||||
|
stylePage.getRecords().forEach(s -> outVOList.add(
|
||||||
|
HighQualityMaintainOutVO.builder()
|
||||||
|
.id(s.getId())
|
||||||
|
.sort(s.getSort())
|
||||||
|
.status(s.getStatus())
|
||||||
|
.image(s.getImage())
|
||||||
|
.title(s.getTitle())
|
||||||
|
.secordTitle(s.getSecordTitle())
|
||||||
|
.content(s.getContent())
|
||||||
|
.type(s.getCategory())
|
||||||
|
.createTime(s.getCreateTime())
|
||||||
|
.createBy(s.getCreateBy())
|
||||||
|
.sendTime(s.getSendTime())
|
||||||
|
.build()));
|
||||||
|
}
|
||||||
|
IPage<HighQualityMaintainOutVO> iPage = new Page<>();
|
||||||
|
iPage.setTotal(stylePage.getTotal());
|
||||||
|
iPage.setPages(stylePage.getPages());
|
||||||
|
iPage.setCurrent(stylePage.getCurrent());
|
||||||
|
iPage.setSize(stylePage.getSize());
|
||||||
|
iPage.setRecords(outVOList);
|
||||||
|
return iPage;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean saveStyleOrProject(HighQualityMaintainOutVO inVO) {
|
||||||
|
if (ObjectUtil.isNull(inVO) || StrUtil.isBlank(inVO.getType())) {
|
||||||
|
HighQualityExceptionEnum.FRAME_EXCEPTION_PARAM_IS_NULL_FAIL.customValid(true);
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (StrUtil.isBlank(inVO.getId())) {
|
||||||
|
inVO.setId(PropertyUtils.getSnowflakeId());
|
||||||
|
}
|
||||||
|
|
||||||
|
HighQualityStyle style = new HighQualityStyle();
|
||||||
|
style.setId(inVO.getId());
|
||||||
|
style.setTitle(inVO.getTitle());
|
||||||
|
style.setSecordTitle(inVO.getSecordTitle());
|
||||||
|
style.setImageWord(inVO.getTitle());
|
||||||
|
style.setTitleImage(inVO.getImage());
|
||||||
|
style.setCategory(inVO.getType());
|
||||||
|
style.setContent(inVO.getContent());
|
||||||
|
style.setImage(inVO.getImage());
|
||||||
|
style.setSort(1);
|
||||||
|
style.setBanner("1".equals(inVO.getType()) ? "1" : "0");
|
||||||
|
style.setStatus("0");
|
||||||
|
style.setCreateTime(LocalDateTime.now());
|
||||||
|
style.setCreateBy(inVO.getCreateBy());
|
||||||
|
style.setContentImageId(inVO.getContentImageId());
|
||||||
|
style.setDeleteFlag("0");
|
||||||
|
return this.saveOrUpdate(style);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean sendStyleOrProject(String id, String status) {
|
||||||
|
|
||||||
|
HighQualityStyle style = this.getById(id);
|
||||||
|
if (ObjectUtil.isNotNull(style) && StrUtil.isNotBlank(style.getId())) {
|
||||||
|
style.setStatus(status);
|
||||||
|
style.setSendTime(LocalDateTime.now());
|
||||||
|
return this.updateById(style);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean deleteStyleOrProject(String id) {
|
||||||
|
|
||||||
|
HighQualityStyle style = this.getById(id);
|
||||||
|
if (ObjectUtil.isNotNull(style) && StrUtil.isNotBlank(style.getId())) {
|
||||||
|
style.setDeleteFlag("1");
|
||||||
|
return this.updateById(style);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,84 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.vo;
|
||||||
|
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.config.CustomLocalDateTimeTypeHandler;
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import javax.validation.constraints.Min;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类 EventMaintainInVO
|
||||||
|
*
|
||||||
|
* @auto.generated
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel
|
||||||
|
public class HighQualityMaintainInVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "类别 1-首页,2-活动风采,3-攻坚克难")
|
||||||
|
private String type;
|
||||||
|
/**
|
||||||
|
* 意见类型:1-指导型 2-建设型 3-规划型 4-政策型
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "意见类型:1-指导型 2-建设型 3-规划型 4-政策型")
|
||||||
|
private String suggestionType;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面显示状态: 0-隐藏 1-显示
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "页面显示状态: 0-草稿 1-发布")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "开始时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@TableField(typeHandler = CustomLocalDateTimeTypeHandler.class)
|
||||||
|
private java.time.LocalDateTime startTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "结束时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
@TableField(typeHandler = CustomLocalDateTimeTypeHandler.class)
|
||||||
|
private LocalDateTime endTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("当前页")
|
||||||
|
@NotNull
|
||||||
|
@Min(0L)
|
||||||
|
private Integer pageNo;
|
||||||
|
@ApiModelProperty("每页显示条数")
|
||||||
|
@NotNull
|
||||||
|
@Min(0L)
|
||||||
|
private Integer pageSize;
|
||||||
|
}
|
@ -0,0 +1,108 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.vo;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonFormat;
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
import org.springframework.format.annotation.DateTimeFormat;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类 EventMaintainOutVO
|
||||||
|
*
|
||||||
|
* @auto.generated
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel
|
||||||
|
@Builder
|
||||||
|
public class HighQualityMaintainOutVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "id")
|
||||||
|
private String id;
|
||||||
|
/**
|
||||||
|
* 标题
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "标题")
|
||||||
|
private String title;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 类别
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "类别 1-首页,2-活动风采,3-攻坚克难")
|
||||||
|
private String type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 活动内容正文
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "活动内容正文")
|
||||||
|
private String content;
|
||||||
|
/**
|
||||||
|
* 二级标题
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "二级标题")
|
||||||
|
private String secordTitle;
|
||||||
|
/**
|
||||||
|
* 活动图片
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "活动图片")
|
||||||
|
private String image;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 显示排序
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "显示排序")
|
||||||
|
private Integer sort;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 是否轮播广告:0-否,1-是
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "是否轮播广告:0-否,1-是")
|
||||||
|
private String banner;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 页面显示状态: 0-隐藏 1-显示
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "页面显示状态: 0-草稿 1-发布")
|
||||||
|
private String status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "创建时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 发布时间
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发布时间")
|
||||||
|
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
|
||||||
|
@DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
|
||||||
|
private LocalDateTime sendTime;
|
||||||
|
/**
|
||||||
|
* 发布人
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "发布人")
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 正文图片id
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "正文图片id")
|
||||||
|
private String contentImageId;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类 MockDataValue
|
||||||
|
*
|
||||||
|
* @auto.generated
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Builder
|
||||||
|
public class HighQualityMockDataValue implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 数量
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "数量")
|
||||||
|
private String value;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "名称")
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 文字
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "文字")
|
||||||
|
private String text;
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,45 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Builder;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类 EventQHighQualityQueryInVOueryInVO
|
||||||
|
*
|
||||||
|
* @auto.generated
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@Builder
|
||||||
|
public class HighQualityQueryInVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 党支部编码
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "党支部编码")
|
||||||
|
private String belongBranch;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 参数
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "参数")
|
||||||
|
private String param;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属党支部名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "所属党支部名称")
|
||||||
|
private String belongBranchName;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 所属省名称
|
||||||
|
*/
|
||||||
|
@ApiModelProperty(value = "所属省名称")
|
||||||
|
private String branchName;
|
||||||
|
}
|
@ -0,0 +1,42 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.highquality.vo;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModel;
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 实体类 EventRightDataOutVO
|
||||||
|
*
|
||||||
|
* @auto.generated
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@Accessors(chain = true)
|
||||||
|
@ApiModel
|
||||||
|
public class HighQualityRightDataVO implements Serializable {
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "订单交易总额")
|
||||||
|
private String ddjyze;
|
||||||
|
@ApiModelProperty(value = "订单总数量")
|
||||||
|
private String ddzsl;
|
||||||
|
@ApiModelProperty(value = "商品数量")
|
||||||
|
private String spsl;
|
||||||
|
@ApiModelProperty(value = "协议数量")
|
||||||
|
private String xysl;
|
||||||
|
@ApiModelProperty(value = "一线调研")
|
||||||
|
private String yxdy;
|
||||||
|
@ApiModelProperty(value = "访谈人数")
|
||||||
|
private String ftrs;
|
||||||
|
@ApiModelProperty(value = "保障需求")
|
||||||
|
private String bzxq;
|
||||||
|
@ApiModelProperty(value = "攻坚克难项目")
|
||||||
|
private String gjknxm;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
@ -0,0 +1,9 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.uploadOss.service;
|
||||||
|
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.IOException;
|
||||||
|
|
||||||
|
public interface IUploadOssService {
|
||||||
|
String uploadFile(MultipartFile file, String prefix) throws IOException;
|
||||||
|
}
|
@ -0,0 +1,44 @@
|
|||||||
|
package com.chinaunicom.mall.ebtp.extend.uploadOss.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.RandomUtil;
|
||||||
|
import com.aliyun.oss.OSS;
|
||||||
|
import com.aliyun.oss.OSSClientBuilder;
|
||||||
|
import com.aliyun.oss.model.ObjectMetadata;
|
||||||
|
import com.aliyun.oss.model.PutObjectRequest;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.uploadOss.service.IUploadOssService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.beans.factory.annotation.Value;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
|
import java.io.File;
|
||||||
|
import java.io.IOException;
|
||||||
|
import java.text.DateFormat;
|
||||||
|
import java.text.SimpleDateFormat;
|
||||||
|
import java.util.Date;
|
||||||
|
import java.util.Locale;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Service
|
||||||
|
public class UploadOssServiceImpl implements IUploadOssService {
|
||||||
|
@Value("${oss.endpoint}")
|
||||||
|
private String endpoint;
|
||||||
|
@Value("${oss.accessKeyId}")
|
||||||
|
private String accessKeyId;
|
||||||
|
@Value("${oss.accessKeySecret}")
|
||||||
|
private String accessKeySecret;
|
||||||
|
@Value("${oss.bucketName}")
|
||||||
|
private String bucketName;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String uploadFile(MultipartFile file, String prefix) throws IOException {
|
||||||
|
OSS client = new OSSClientBuilder().build(endpoint, accessKeyId, accessKeySecret);
|
||||||
|
String fileType = file.getName().substring(file.getName().lastIndexOf(".") + 1);
|
||||||
|
DateFormat yearMonthPath = new SimpleDateFormat("yyyy/MM/dd");
|
||||||
|
String filePathPrefix = prefix + File.separator + yearMonthPath.format(new Date((System.currentTimeMillis())));
|
||||||
|
String objectName = filePathPrefix + File.separator + RandomUtil.randomString(32).toUpperCase(Locale.ROOT) + "." + fileType;
|
||||||
|
client.putObject(new PutObjectRequest(bucketName, objectName, file.getInputStream(), new ObjectMetadata()));
|
||||||
|
return objectName;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Reference in New Issue
Block a user