修改代码
This commit is contained in:
@ -5,6 +5,8 @@ public enum CustomerQandaConstant {
|
||||
REPLY(1L), // 回复状态
|
||||
WAIT_REPLY(0L); // 待回复状态
|
||||
|
||||
|
||||
|
||||
private final Long status;
|
||||
|
||||
CustomerQandaConstant(Long status) {
|
||||
|
@ -25,4 +25,12 @@ public interface UpConstant {
|
||||
* 禁用
|
||||
*/
|
||||
public static final Long DISABLE = 1L;
|
||||
/**
|
||||
* 发布
|
||||
*/
|
||||
public static final Long RELEASE = 1L;
|
||||
/**
|
||||
* 未发布
|
||||
*/
|
||||
public static final Long UNRELEASE = 0L;
|
||||
}
|
||||
|
@ -27,16 +27,19 @@
|
||||
<result property="updateTime" column="update_time"/>
|
||||
<result property="lastUpdateTime" column="last_update_time"/>
|
||||
<result property="addressImg" column="address_img"/>
|
||||
|
||||
<result property="status" column="status"/>
|
||||
<result property="isTop" column="is_top"/>
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCoscoPortalsCustomerQandaVo">
|
||||
select id,
|
||||
title,
|
||||
is_top,
|
||||
address_img,
|
||||
content,
|
||||
ask_time,
|
||||
type,
|
||||
status,
|
||||
full_name,
|
||||
company_name,
|
||||
user_name,
|
||||
@ -189,6 +192,8 @@
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="lastUpdateTime != null">last_update_time,</if>
|
||||
<if test="addressImg != null">address_img,</if>
|
||||
<if test="status != null">status,</if>
|
||||
<if test="isTop != null">is_top,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="id != null">#{id},</if>
|
||||
@ -212,7 +217,8 @@
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="lastUpdateTime != null">#{lastUpdateTime},</if>
|
||||
<if test="addressImg != null">#{addressImg},</if>
|
||||
|
||||
<if test="status != null">#{status},</if>
|
||||
<if test="isTop != null">#{isTop},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
<insert id="batchCoscoPortalsCustomerQanda" parameterType="java.util.List">
|
||||
@ -292,6 +298,12 @@
|
||||
<if test="addressImg != null">address_img =
|
||||
#{addressImg},
|
||||
</if>
|
||||
<if test="status != null">status =
|
||||
#{status},
|
||||
</if>
|
||||
<if test="isTop != null">is_top =
|
||||
#{isTop},
|
||||
</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -71,6 +71,10 @@ public class CoscoPortalsCustomerQanda extends BaseEntity {
|
||||
|
||||
private Date updateTime;
|
||||
|
||||
private Long status;
|
||||
|
||||
private Long isTop;
|
||||
|
||||
@ApiModelProperty(value = "分页对象信息")
|
||||
private BasePageRequest basePageRequest;
|
||||
|
||||
|
@ -1,6 +1,7 @@
|
||||
package com.chinaunicom.zyhy.ebtp.supplier.portals.service;
|
||||
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsHelpcenterQanda;
|
||||
|
||||
import java.util.List;
|
||||
@ -80,4 +81,10 @@ public interface ICoscoPortalsHelpcenterQandaService {
|
||||
* @return
|
||||
*/
|
||||
int down(String id);
|
||||
|
||||
/**
|
||||
* 发布添加帮助中心_问答
|
||||
* @param coscoPortalsCustomerQanda
|
||||
*/
|
||||
void addHelpcenterQanda(CoscoPortalsCustomerQanda coscoPortalsCustomerQanda);
|
||||
}
|
||||
|
@ -7,11 +7,11 @@ import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
|
||||
import com.chinaunicom.mall.ebtp.common.base.util.TokenUtil;
|
||||
import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.CustomerQandaConstant;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UserConstant;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UpConstant;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsCustomerQandaMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsHelpcenterQanda;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.service.ICoscoPortalsCustomerQandaService;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.service.ICoscoPortalsHelpcenterQandaService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@ -28,6 +28,8 @@ import java.util.List;
|
||||
public class CoscoPortalsCustomerQandaServiceImpl extends BaseServiceImpl<CoscoPortalsCustomerQandaMapper, CoscoPortalsCustomerQanda> implements ICoscoPortalsCustomerQandaService {
|
||||
@Autowired
|
||||
private CoscoPortalsCustomerQandaMapper coscoPortalsCustomerQandaMapper;
|
||||
@Autowired
|
||||
private ICoscoPortalsHelpcenterQandaService coscoPortalsHelpcenterQandaService;
|
||||
|
||||
/**
|
||||
* 查询中远门户_用户提问_问答
|
||||
@ -66,7 +68,11 @@ public class CoscoPortalsCustomerQandaServiceImpl extends BaseServiceImpl<CoscoP
|
||||
coscoPortalsCustomerQanda.setAskTime(date);
|
||||
BaseCacheUser currentUser = TokenUtil.getCurrentUser();
|
||||
coscoPortalsCustomerQanda.setCreateBy(currentUser.getUserId());
|
||||
return coscoPortalsCustomerQandaMapper.insertCoscoPortalsCustomerQanda(coscoPortalsCustomerQanda);
|
||||
coscoPortalsCustomerQandaMapper.insertCoscoPortalsCustomerQanda(coscoPortalsCustomerQanda);
|
||||
if(UpConstant.RELEASE.equals(coscoPortalsCustomerQanda.getStatus())){
|
||||
coscoPortalsHelpcenterQandaService.addHelpcenterQanda(coscoPortalsCustomerQanda);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -86,7 +92,11 @@ public class CoscoPortalsCustomerQandaServiceImpl extends BaseServiceImpl<CoscoP
|
||||
coscoPortalsCustomerQanda.setAnswerBy(currentUser.getUserId());
|
||||
coscoPortalsCustomerQanda.setAnswerTime(date);
|
||||
}
|
||||
return coscoPortalsCustomerQandaMapper.updateCoscoPortalsCustomerQanda(coscoPortalsCustomerQanda);
|
||||
coscoPortalsCustomerQandaMapper.updateCoscoPortalsCustomerQanda(coscoPortalsCustomerQanda);
|
||||
if(UpConstant.RELEASE.equals(coscoPortalsCustomerQanda.getStatus())){
|
||||
coscoPortalsHelpcenterQandaService.addHelpcenterQanda(coscoPortalsCustomerQanda);
|
||||
}
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -9,6 +9,7 @@ import com.chinaunicom.mall.ebtp.common.util.PropertyUtils;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UpConstant;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.base.constant.UserConstant;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.dao.CoscoPortalsHelpcenterQandaMapper;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsCustomerQanda;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.entity.CoscoPortalsHelpcenterQanda;
|
||||
import com.chinaunicom.zyhy.ebtp.supplier.portals.service.ICoscoPortalsHelpcenterQandaService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
@ -68,6 +69,17 @@ public class CoscoPortalsHelpcenterQandaServiceImpl extends BaseServiceImpl<Cosc
|
||||
return coscoPortalsHelpcenterQandaMapper.insertCoscoPortalsHelpcenterQanda(coscoPortalsHelpcenterQanda);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addHelpcenterQanda(CoscoPortalsCustomerQanda coscoPortalsCustomerQanda) {
|
||||
CoscoPortalsHelpcenterQanda coscoPortalsHelpcenterQanda = new CoscoPortalsHelpcenterQanda();
|
||||
coscoPortalsHelpcenterQanda.setTitle(coscoPortalsCustomerQanda.getTitle());
|
||||
coscoPortalsHelpcenterQanda.setContent(coscoPortalsCustomerQanda.getContent());
|
||||
coscoPortalsHelpcenterQanda.setAnswerContent(coscoPortalsCustomerQanda.getAnswerContent());
|
||||
coscoPortalsHelpcenterQanda.setType(coscoPortalsCustomerQanda.getType());
|
||||
coscoPortalsHelpcenterQanda.setIsTop(coscoPortalsCustomerQanda.getIsTop());
|
||||
insertCoscoPortalsHelpcenterQanda(coscoPortalsHelpcenterQanda);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改中远门户_帮助中心_问答
|
||||
*
|
||||
@ -137,4 +149,6 @@ public class CoscoPortalsHelpcenterQandaServiceImpl extends BaseServiceImpl<Cosc
|
||||
qanda.setUpdateBy(currentUser.getUserId());
|
||||
return coscoPortalsHelpcenterQandaMapper.updateCoscoPortalsHelpcenterQanda(qanda);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
@ -54,8 +54,8 @@ spring:
|
||||
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||
username: root
|
||||
password: Unicom@2024
|
||||
jdbc-url: jdbc:mysql://59.110.10.99:53306/cosco_supplier_manager?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
||||
url: jdbc:mysql://59.110.10.99:53306/cosco_supplier_manager?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
||||
jdbc-url: jdbc:mysql://59.110.10.99:53306/cosco_portals_manage?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
||||
url: jdbc:mysql://59.110.10.99:53306/cosco_portals_manage?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&useSSL=false&allowPublicKeyRetrieval=true
|
||||
filters: stat,wall,log4j
|
||||
maxActive: 20
|
||||
initialSize: 1
|
||||
@ -134,7 +134,7 @@ mybatis-plus:
|
||||
auto-mapping-behavior: full
|
||||
# 这个配置会将执行的sql打印出来,在开发或测试的时候可以用
|
||||
# log-impl: org.apache.ibatis.logging.stdout.StdOutImpl
|
||||
mapper-locations: classpath*:com/chinaunicom/**/mapper/*Mapper.xml
|
||||
mapper-locations: classpath*:com/chinaunicom/**/*Mapper.xml
|
||||
global-config:
|
||||
# 逻辑删除配置
|
||||
db-config:
|
||||
|
Reference in New Issue
Block a user