Compare commits
No commits in common. "a1d3c745539f8c717563f405430cf7cb028d25e9" and "e634c4c78972053a7736b089b3ce87396450602c" have entirely different histories.
a1d3c74553
...
e634c4c789
|
|
@ -90,7 +90,6 @@ public class PositionController extends ControllerBase {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
result.setLanguage(positionLanguageResult);
|
result.setLanguage(positionLanguageResult);
|
||||||
result.setTicketManage(ent.getTicketManage());
|
|
||||||
return ApiResult.success(result);
|
return ApiResult.success(result);
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -122,7 +121,6 @@ public class PositionController extends ControllerBase {
|
||||||
// ent.setDataModifyUserNo(AdminUserUtil.getUserNo());
|
// ent.setDataModifyUserNo(AdminUserUtil.getUserNo());
|
||||||
// ent.setDataModifyUserName(AdminUserUtil.getUserName());
|
// ent.setDataModifyUserName(AdminUserUtil.getUserName());
|
||||||
// ent.setDataModifyTime(LocalDateTime.now());
|
// ent.setDataModifyTime(LocalDateTime.now());
|
||||||
ent.setTicketManage(positionDetailDto.getTicketManage());
|
|
||||||
positionService.save(ent);
|
positionService.save(ent);
|
||||||
return ApiResult.success(true);
|
return ApiResult.success(true);
|
||||||
}
|
}
|
||||||
|
|
@ -138,7 +136,6 @@ public class PositionController extends ControllerBase {
|
||||||
ent.setDataModifyUserNo(AdminUserUtil.getUserNo());
|
ent.setDataModifyUserNo(AdminUserUtil.getUserNo());
|
||||||
ent.setDataModifyUserName(AdminUserUtil.getUserName());
|
ent.setDataModifyUserName(AdminUserUtil.getUserName());
|
||||||
ent.setDataModifyTime(LocalDateTime.now());
|
ent.setDataModifyTime(LocalDateTime.now());
|
||||||
ent.setTicketManage(positionDetailDto.getTicketManage());
|
|
||||||
positionService.updateById(ent);
|
positionService.updateById(ent);
|
||||||
return ApiResult.success(true);
|
return ApiResult.success(true);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -166,7 +166,7 @@ public class ProductBaseController extends ControllerBase{
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
*/
|
*/
|
||||||
@PostMapping("/publishHonor")
|
@PostMapping("/publishHonor")
|
||||||
public ApiResult<Void> publishHonor(@Valid @RequestBody BatchPublishRequest request) {
|
public ApiResult<Void> publishHonor(@Valid @RequestBody ProductPublishRequest request){
|
||||||
productHonorService.publish(request);
|
productHonorService.publish(request);
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
@ -233,7 +233,7 @@ public class ProductBaseController extends ControllerBase{
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
*/
|
*/
|
||||||
@PostMapping("/publishCase")
|
@PostMapping("/publishCase")
|
||||||
public ApiResult<Void> publishCase(@Valid @RequestBody BatchPublishRequest request) {
|
public ApiResult<Void> publishCase(@Valid @RequestBody ProductPublishRequest request){
|
||||||
productCaseService.publish(request);
|
productCaseService.publish(request);
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,9 @@ public class ProductModelController extends ControllerBase{
|
||||||
@Resource
|
@Resource
|
||||||
private IProductModelParamsItemService productModelParamsItemService;
|
private IProductModelParamsItemService productModelParamsItemService;
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IProductModelImageService productModelImageService;
|
||||||
|
|
||||||
@Resource
|
@Resource
|
||||||
private IProductModelVideoService productModelVideoService;
|
private IProductModelVideoService productModelVideoService;
|
||||||
|
|
||||||
|
|
@ -845,7 +848,7 @@ public class ProductModelController extends ControllerBase{
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
*/
|
*/
|
||||||
@PostMapping("/publishVideo")
|
@PostMapping("/publishVideo")
|
||||||
public ApiResult<Void> publishVideo(@Valid @RequestBody BatchPublishRequest request) {
|
public ApiResult<Void> publishVideo(@Valid @RequestBody ProductPublishRequest request){
|
||||||
productModelVideoService.publish(request);
|
productModelVideoService.publish(request);
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
@ -931,7 +934,7 @@ public class ProductModelController extends ControllerBase{
|
||||||
* @param request 请求参数
|
* @param request 请求参数
|
||||||
*/
|
*/
|
||||||
@PostMapping("/publishFile")
|
@PostMapping("/publishFile")
|
||||||
public ApiResult<Void> publishFile(@Valid @RequestBody BatchPublishRequest request) {
|
public ApiResult<Void> publishFile(@Valid @RequestBody ProductModelPublishRequest request) {
|
||||||
productModelFileService.publish(request);
|
productModelFileService.publish(request);
|
||||||
return ApiResult.success();
|
return ApiResult.success();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -49,10 +49,10 @@ public class TestController extends ControllerBase{
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// @GetMapping("test")
|
@GetMapping("test")
|
||||||
// public ApiResult<Boolean> test(@RequestParam Integer userId){
|
public ApiResult<Boolean> test(@RequestParam Integer userId){
|
||||||
// return ApiResult.success(ticketCallService.isInCall(userId));
|
return ApiResult.success(ticketCallService.isInCall(userId));
|
||||||
// }
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 翻译为日语
|
* 翻译为日语
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -30,11 +31,6 @@ public class PositionDetailDTO {
|
||||||
@NotNull(message = "属性不能为空")
|
@NotNull(message = "属性不能为空")
|
||||||
private Integer positionAttribute;
|
private Integer positionAttribute;
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否授予工单权限
|
|
||||||
*/
|
|
||||||
private Boolean ticketManage;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -28,11 +28,6 @@ public class PositionDetailVO {
|
||||||
*/
|
*/
|
||||||
private Integer positionAttribute;
|
private Integer positionAttribute;
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否授予工单权限
|
|
||||||
*/
|
|
||||||
private Boolean ticketManage;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 创建人-账号
|
* 创建人-账号
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,33 @@
|
||||||
|
package com.nflg.mobilebroken.admin.task;
|
||||||
|
|
||||||
|
import com.nflg.mobilebroken.repository.entity.ProductModel;
|
||||||
|
import com.nflg.mobilebroken.repository.service.IProductModelService;
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import org.springframework.scheduling.annotation.Scheduled;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
|
|
||||||
|
@Slf4j
|
||||||
|
@Component
|
||||||
|
public class ProductScheduledTasks {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
private IProductModelService productModelService;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 机型是否新版本设置
|
||||||
|
* 每天午夜12点执行一次
|
||||||
|
*/
|
||||||
|
@Scheduled(cron = "0 0 0 * * ?")
|
||||||
|
public void resetRecommend() {
|
||||||
|
log.info("【产品中心-机型-新品】开始执行");
|
||||||
|
productModelService.lambdaUpdate()
|
||||||
|
.set(ProductModel::getRecommend, false)
|
||||||
|
.eq(ProductModel::getRecommend, true)
|
||||||
|
.gt(ProductModel::getRecommendTime, LocalDateTime.now().minusYears(2))
|
||||||
|
.update();
|
||||||
|
log.info("【产品中心-机型-新品】执行完毕");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
package com.nflg.mobilebroken.common.constant;
|
package com.nflg.mobilebroken.common.constant;
|
||||||
|
|
||||||
|
import cn.hutool.core.collection.ListUtil;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
public class Constant {
|
public class Constant {
|
||||||
|
|
||||||
public static final String FROM_APP = "app";
|
public static final String FROM_APP = "app";
|
||||||
|
|
@ -108,8 +112,9 @@ public class Constant {
|
||||||
|
|
||||||
public static final String DICTIONARY_ITEM_ACCOUNT_HAS_EXPIRED="AccountHasExpired";
|
public static final String DICTIONARY_ITEM_ACCOUNT_HAS_EXPIRED="AccountHasExpired";
|
||||||
|
|
||||||
public static final String DICTIONARY_SOLUTION_MEASURES = "SolutionMeasures";
|
public static final List<String> ROLE_CODE_TICKET_MANAGERS = ListUtil.of(TITLE_DIRECTOROF_BUSINESS_UNIT,TITLE_TECHNICAL_MANAGER,TITLE_SALES_MANAGER,TITLE_TEST_MANAGER,TITLE_QUALITY_MANAGER,DICTIONARY_TYPE_TITLE_CQM);
|
||||||
|
|
||||||
|
public static final String DICTIONARY_SOLUTION_MEASURES = "SolutionMeasures";
|
||||||
public static final String DICTIONARY_SOLUTION_REVIEW_DEPARTMENT = "SolutionReviewDepartment";
|
public static final String DICTIONARY_SOLUTION_REVIEW_DEPARTMENT = "SolutionReviewDepartment";
|
||||||
|
|
||||||
public static final String DICTIONARY_DEVICE_STATE ="deviceState";
|
public static final String DICTIONARY_DEVICE_STATE ="deviceState";
|
||||||
|
|
|
||||||
|
|
@ -2,6 +2,7 @@ package com.nflg.mobilebroken.common.pojo.request;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import javax.validation.constraints.NotEmpty;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
@ -17,5 +18,6 @@ public class FileDefaultConfigRequest {
|
||||||
/**
|
/**
|
||||||
* 配置项
|
* 配置项
|
||||||
*/
|
*/
|
||||||
|
@NotEmpty
|
||||||
private List<FileDefaultConfigItemRequest> items;
|
private List<FileDefaultConfigItemRequest> items;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import lombok.Data;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class ProductModelAddRequest {
|
public class ProductModelAddRequest {
|
||||||
|
|
@ -49,11 +48,6 @@ public class ProductModelAddRequest {
|
||||||
*/
|
*/
|
||||||
private Boolean recommend;
|
private Boolean recommend;
|
||||||
|
|
||||||
/**
|
|
||||||
* 新品过期时间
|
|
||||||
*/
|
|
||||||
private LocalDateTime recommendExpireTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否发布
|
* 是否发布
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,15 +1,13 @@
|
||||||
package com.nflg.mobilebroken.common.pojo.request;
|
package com.nflg.mobilebroken.common.pojo.request;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
public class ProductModelPublishRequest {
|
||||||
public class BatchPublishRequest {
|
|
||||||
|
|
||||||
@NotEmpty
|
@NotEmpty
|
||||||
private List<Integer> ids;
|
private List<Integer> ids;
|
||||||
|
|
@ -3,9 +3,7 @@ package com.nflg.mobilebroken.common.pojo.vo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Accessors
|
@Accessors
|
||||||
|
|
@ -58,15 +56,6 @@ public class FrontendProductModelSearchVO {
|
||||||
*/
|
*/
|
||||||
private Boolean recommend;
|
private Boolean recommend;
|
||||||
|
|
||||||
public Boolean getRecommend() {
|
|
||||||
return recommend && (Objects.nonNull(recommendExpireTime) && LocalDateTime.now().isBefore(recommendExpireTime));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新品过期时间
|
|
||||||
*/
|
|
||||||
private LocalDateTime recommendExpireTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 机型介绍
|
* 机型介绍
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -54,11 +54,6 @@ public class ProductModelSearchVO {
|
||||||
*/
|
*/
|
||||||
private Boolean recommend;
|
private Boolean recommend;
|
||||||
|
|
||||||
/**
|
|
||||||
* 新品过期时间
|
|
||||||
*/
|
|
||||||
private LocalDateTime recommendExpireTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 是否启用
|
* 是否启用
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,7 @@ package com.nflg.mobilebroken.common.pojo.vo;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
@Accessors(chain = true)
|
@Accessors(chain = true)
|
||||||
|
|
@ -28,15 +26,6 @@ public class ProductModelVO {
|
||||||
*/
|
*/
|
||||||
private Boolean recommend;
|
private Boolean recommend;
|
||||||
|
|
||||||
public Boolean getRecommend() {
|
|
||||||
return recommend && (Objects.nonNull(recommendExpireTime) && LocalDateTime.now().isBefore(recommendExpireTime));
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* 新品过期时间
|
|
||||||
*/
|
|
||||||
private LocalDateTime recommendExpireTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 主要参数列表
|
* 主要参数列表
|
||||||
*/
|
*/
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
# Nacos 地址
|
# Nacos 地址
|
||||||
nacos.server-addr=${NACOS_SERVER_ADDR:192.168.0.194:8848}
|
nacos.server-addr=${NACOS_SERVER_ADDR:112.74.186.154:8848}
|
||||||
#nacos.server-addr=192.168.0.194:8848
|
#nacos.server-addr=192.168.0.194:8848
|
||||||
#spring.cloud.nacos.discovery.username=nacos
|
#spring.cloud.nacos.discovery.username=nacos
|
||||||
#spring.cloud.nacos.discovery.password=ZLQ8vgmjoJ4?EPJ4]fs_
|
#spring.cloud.nacos.discovery.password=ZLQ8vgmjoJ4?EPJ4]fs_
|
||||||
|
|
|
||||||
|
|
@ -65,9 +65,9 @@ public class ProductModel implements Serializable {
|
||||||
private Boolean recommend;
|
private Boolean recommend;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新品过期时间
|
* 设置为新品的时间
|
||||||
*/
|
*/
|
||||||
private LocalDateTime recommendExpireTime;
|
private LocalDateTime recommendTime;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 排序
|
* 排序
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@ public class ProductModelFileItem implements Serializable {
|
||||||
private Integer modelId;
|
private Integer modelId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 产品机型文件id
|
* 产品机型id
|
||||||
*/
|
*/
|
||||||
private Integer modelFileId;
|
private Integer modelFileId;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -3,13 +3,12 @@ package com.nflg.mobilebroken.repository.entity;
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.time.LocalDateTime;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
import lombok.Setter;
|
import lombok.Setter;
|
||||||
import lombok.experimental.Accessors;
|
import lombok.experimental.Accessors;
|
||||||
|
|
||||||
import java.io.Serializable;
|
|
||||||
import java.time.LocalDateTime;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
* 职位管理
|
* 职位管理
|
||||||
|
|
@ -86,9 +85,4 @@ public class TBasePosition implements Serializable {
|
||||||
* 语言-json
|
* 语言-json
|
||||||
*/
|
*/
|
||||||
private String positionLanguage;
|
private String positionLanguage;
|
||||||
|
|
||||||
/**
|
|
||||||
* 是否授予工单权限
|
|
||||||
*/
|
|
||||||
private Boolean ticketManage;
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.nflg.mobilebroken.repository.entity;
|
package com.nflg.mobilebroken.repository.entity;
|
||||||
|
|
||||||
import com.baomidou.mybatisplus.annotation.IdType;
|
import com.baomidou.mybatisplus.annotation.IdType;
|
||||||
|
import com.baomidou.mybatisplus.annotation.TableField;
|
||||||
import com.baomidou.mybatisplus.annotation.TableId;
|
import com.baomidou.mybatisplus.annotation.TableId;
|
||||||
import com.baomidou.mybatisplus.annotation.TableName;
|
import com.baomidou.mybatisplus.annotation.TableName;
|
||||||
import lombok.Getter;
|
import lombok.Getter;
|
||||||
|
|
@ -34,16 +35,16 @@ public class TicketCall implements Serializable {
|
||||||
*/
|
*/
|
||||||
private Integer ticketId;
|
private Integer ticketId;
|
||||||
|
|
||||||
// /**
|
/**
|
||||||
// * 呼叫来源,app或者admin
|
* 呼叫来源,app或者admin
|
||||||
// */
|
*/
|
||||||
// @TableField("`from`")
|
@TableField("`from`")
|
||||||
// private String from;
|
private String from;
|
||||||
//
|
|
||||||
// /**
|
/**
|
||||||
// * 呼叫人id
|
* 呼叫人id
|
||||||
// */
|
*/
|
||||||
// private Integer callerUserId;
|
private Integer callerUserId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 状态,0-呼叫中;1-通话中;2-已结束
|
* 状态,0-呼叫中;1-通话中;2-已结束
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,5 @@ public interface AdminUserMapper extends BaseMapper<AdminUser> {
|
||||||
|
|
||||||
List<AdminUserSimpleVO> getSimples(List<Integer> userIds);
|
List<AdminUserSimpleVO> getSimples(List<Integer> userIds);
|
||||||
|
|
||||||
List<Integer> getTickerMangagers();
|
List<Integer> getTickerMangagers(List<String> titleCodes);
|
||||||
|
|
||||||
List<Integer> getCQMIds(String titleCode);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -13,5 +13,5 @@ import com.nflg.mobilebroken.repository.entity.TicketCallJoin;
|
||||||
*/
|
*/
|
||||||
public interface TicketCallJoinMapper extends BaseMapper<TicketCallJoin> {
|
public interface TicketCallJoinMapper extends BaseMapper<TicketCallJoin> {
|
||||||
|
|
||||||
boolean isInCall(Integer ticketId, String from, Integer userId);
|
boolean isInCall(Integer userId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -34,7 +34,7 @@ public interface IProductCaseService extends IService<ProductCase> {
|
||||||
|
|
||||||
void delete(@Valid BatchDeleteRequest request);
|
void delete(@Valid BatchDeleteRequest request);
|
||||||
|
|
||||||
void publish(@Valid BatchPublishRequest request);
|
void publish(@Valid ProductPublishRequest request);
|
||||||
|
|
||||||
ProductCaseInfoVO getInfo(@Valid @NotNull Integer caseId);
|
ProductCaseInfoVO getInfo(@Valid @NotNull Integer caseId);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -30,7 +30,7 @@ public interface IProductHonorService extends IService<ProductHonor> {
|
||||||
|
|
||||||
List<ProductHonorVO> get(String language);
|
List<ProductHonorVO> get(String language);
|
||||||
|
|
||||||
void publish(@Valid BatchPublishRequest request);
|
void publish(@Valid ProductPublishRequest request);
|
||||||
|
|
||||||
void delete(@Valid BatchDeleteRequest request);
|
void delete(@Valid BatchDeleteRequest request);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@ import com.nflg.mobilebroken.common.pojo.request.FileDefaultConfigRequest;
|
||||||
import com.nflg.mobilebroken.common.pojo.request.ProductModelFileItemAddRequest;
|
import com.nflg.mobilebroken.common.pojo.request.ProductModelFileItemAddRequest;
|
||||||
import com.nflg.mobilebroken.repository.entity.ProductModelFileItem;
|
import com.nflg.mobilebroken.repository.entity.ProductModelFileItem;
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
@ -25,6 +24,4 @@ public interface IProductModelFileItemService extends IService<ProductModelFileI
|
||||||
void setFileDefaultCondig(FileDefaultConfigRequest request);
|
void setFileDefaultCondig(FileDefaultConfigRequest request);
|
||||||
|
|
||||||
List<ProductModelFileItem> getPublishedByLanguage(Integer modelId);
|
List<ProductModelFileItem> getPublishedByLanguage(Integer modelId);
|
||||||
|
|
||||||
void removeByFileIds(@NotEmpty List<Integer> ids);
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -31,7 +31,7 @@ public interface IProductModelFileService extends IService<ProductModelFile> {
|
||||||
|
|
||||||
void delete(@Valid BatchDeleteRequest request);
|
void delete(@Valid BatchDeleteRequest request);
|
||||||
|
|
||||||
void publish(@Valid BatchPublishRequest request);
|
void publish(@Valid ProductModelPublishRequest request);
|
||||||
|
|
||||||
IPage<ProductModelFile> getList(@Valid ProductModelImageSearchRequest request);
|
IPage<ProductModelFile> getList(@Valid ProductModelImageSearchRequest request);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -39,5 +39,5 @@ public interface IProductModelHotimageService extends IService<ProductModelHotim
|
||||||
|
|
||||||
void copyTo(Integer oldId, Integer newId);
|
void copyTo(Integer oldId, Integer newId);
|
||||||
|
|
||||||
ProductHotImageInfoVO getListByLanguage(Integer modelId, String language);
|
ProductHotImageInfoVO getListByLanguage(Integer modelId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -27,7 +27,7 @@ public interface IProductModelImageService extends IService<ProductModelImage> {
|
||||||
|
|
||||||
void delete(@Valid BatchDeleteRequest request);
|
void delete(@Valid BatchDeleteRequest request);
|
||||||
|
|
||||||
void publish(@Valid BatchPublishRequest request);
|
void publish(@Valid ProductPublishRequest request);
|
||||||
|
|
||||||
IPage<ProductModelImage> getList(@Valid ProductModelImageSearchRequest request);
|
IPage<ProductModelImage> getList(@Valid ProductModelImageSearchRequest request);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,7 +29,7 @@ public interface IProductModelVideoService extends IService<ProductModelVideo> {
|
||||||
|
|
||||||
void delete(@Valid BatchDeleteRequest request);
|
void delete(@Valid BatchDeleteRequest request);
|
||||||
|
|
||||||
void publish(@Valid BatchPublishRequest request);
|
void publish(@Valid ProductPublishRequest request);
|
||||||
|
|
||||||
IPage<ProductModelVideo> getList(@Valid ProductModelImageSearchRequest request);
|
IPage<ProductModelVideo> getList(@Valid ProductModelImageSearchRequest request);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ import javax.validation.constraints.NotNull;
|
||||||
*/
|
*/
|
||||||
public interface ITicketCallJoinService extends IService<TicketCallJoin> {
|
public interface ITicketCallJoinService extends IService<TicketCallJoin> {
|
||||||
|
|
||||||
boolean isInCall(Integer ticketId, String from, Integer userId);
|
boolean isInCall(Integer userId);
|
||||||
|
|
||||||
void join(@Valid @NotNull Integer ticketId, Integer userId, String from);
|
void join(@Valid @NotNull Integer ticketId, Integer userId, String from);
|
||||||
|
|
||||||
|
|
@ -25,4 +25,6 @@ public interface ITicketCallJoinService extends IService<TicketCallJoin> {
|
||||||
boolean hangUp(Integer callId, Integer userId, String from, boolean reject);
|
boolean hangUp(Integer callId, Integer userId, String from, boolean reject);
|
||||||
|
|
||||||
void add(Integer callId, Integer userId, String from);
|
void add(Integer callId, Integer userId, String from);
|
||||||
|
|
||||||
|
void hangUpAll(Integer id);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,11 +15,11 @@ import javax.validation.constraints.NotNull;
|
||||||
*/
|
*/
|
||||||
public interface ITicketCallService extends IService<TicketCall> {
|
public interface ITicketCallService extends IService<TicketCall> {
|
||||||
|
|
||||||
// boolean isInCall(Integer userId);
|
boolean isInCall(Integer userId);
|
||||||
|
|
||||||
void add(Integer ticketId, Integer callerUserId,String callerUserFrom, Integer calledUserId, String calledUserFrom);
|
void add(Integer ticketId, Integer callerUserId,String callerUserFrom, Integer calledUserId, String calledUserFrom);
|
||||||
|
|
||||||
// boolean hangUp(@NotNull Integer ticketId, Integer userId, String from, boolean reject);
|
boolean hangUp(@NotNull Integer ticketId, Integer userId, String from, boolean reject);
|
||||||
|
|
||||||
TicketCall getLast(@NotNull Integer ticketId);
|
TicketCall getLast(@NotNull Integer ticketId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package com.nflg.mobilebroken.repository.service.impl;
|
package com.nflg.mobilebroken.repository.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.collection.ListUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
|
|
@ -350,12 +351,12 @@ public class AdminUserServiceImpl extends ServiceImpl<AdminUserMapper, AdminUser
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> getTickerMangagers() {
|
public List<Integer> getTickerMangagers() {
|
||||||
return baseMapper.getTickerMangagers();
|
return baseMapper.getTickerMangagers(Constant.ROLE_CODE_TICKET_MANAGERS);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<Integer> getCQMIds() {
|
public List<Integer> getCQMIds() {
|
||||||
return baseMapper.getCQMIds(Constant.DICTIONARY_TYPE_TITLE_CQM);
|
return baseMapper.getTickerMangagers(ListUtil.of(Constant.DICTIONARY_TYPE_TITLE_CQM));
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getDepartmentName(Long departmentId) {
|
private String getDepartmentName(Long departmentId) {
|
||||||
|
|
|
||||||
|
|
@ -1,9 +1,7 @@
|
||||||
package com.nflg.mobilebroken.repository.service.impl;
|
package com.nflg.mobilebroken.repository.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import cn.hutool.core.convert.Convert;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.util.RandomUtil;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
|
@ -29,7 +27,6 @@ import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -57,8 +54,8 @@ public class ProductCaseServiceImpl extends ServiceImpl<ProductCaseMapper, Produ
|
||||||
.setCreateTime(LocalDateTime.now());
|
.setCreateTime(LocalDateTime.now());
|
||||||
save(entity);
|
save(entity);
|
||||||
if (request.getPublish()) {
|
if (request.getPublish()) {
|
||||||
publish(new BatchPublishRequest()
|
publish(new ProductPublishRequest()
|
||||||
.setIds(List.of(entity.getId()))
|
.setId(entity.getId())
|
||||||
.setState(PublishState.Published.getState()));
|
.setState(PublishState.Published.getState()));
|
||||||
}
|
}
|
||||||
productCaseInfoService.add(entity.getId(), request.getItems());
|
productCaseInfoService.add(entity.getId(), request.getItems());
|
||||||
|
|
@ -82,8 +79,8 @@ public class ProductCaseServiceImpl extends ServiceImpl<ProductCaseMapper, Produ
|
||||||
info.setUpdateTime(LocalDateTime.now());
|
info.setUpdateTime(LocalDateTime.now());
|
||||||
updateById(info);
|
updateById(info);
|
||||||
if (request.getPublish()) {
|
if (request.getPublish()) {
|
||||||
publish(new BatchPublishRequest()
|
publish(new ProductPublishRequest()
|
||||||
.setIds(List.of(info.getId()))
|
.setId(info.getId())
|
||||||
.setState(PublishState.Published.getState()));
|
.setState(PublishState.Published.getState()));
|
||||||
}
|
}
|
||||||
productCaseInfoService.update(request.getItems());
|
productCaseInfoService.update(request.getItems());
|
||||||
|
|
@ -148,20 +145,14 @@ public class ProductCaseServiceImpl extends ServiceImpl<ProductCaseMapper, Produ
|
||||||
productCaseInfoService.delete(request.getIds());
|
productCaseInfoService.delete(request.getIds());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
|
||||||
@Override
|
@Override
|
||||||
public void publish(BatchPublishRequest request) {
|
public void publish(ProductPublishRequest request) {
|
||||||
List<ProductCase> list = listByIds(request.getIds());
|
ProductCase info = getById(request.getId());
|
||||||
|
VUtils.trueThrowBusinessError(Objects.isNull(info)).throwMessage("无效的数据");
|
||||||
|
VUtils.trueThrowBusinessError(Objects.equals(info.getState(), request.getState()))
|
||||||
|
.throwMessage("请勿重复操作");
|
||||||
if (Objects.equals(request.getState(), PublishState.Published.getState())) {
|
if (Objects.equals(request.getState(), PublishState.Published.getState())) {
|
||||||
List<String> names = list.stream().filter(ph -> !ph.getEnable()).map(ProductCase::getTitle).collect(Collectors.toList());
|
VUtils.trueThrowBusinessError(!info.getEnable()).throwMessage("不能发布已禁用的数据");
|
||||||
VUtils.trueThrowBusinessError(CollectionUtil.isNotEmpty(names)).throwMessage("以下案例被禁用不能发布:" + StrUtil.join(",", names));
|
|
||||||
}
|
|
||||||
list.forEach(it -> publish(it, request.getState()));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void publish(ProductCase info, Integer state) {
|
|
||||||
if (Objects.equals(state, info.getState())) return;
|
|
||||||
if (Objects.equals(state, PublishState.Published.getState())) {
|
|
||||||
info.setState(PublishState.Published.getState());
|
info.setState(PublishState.Published.getState());
|
||||||
info.setPublishBy(AdminUserUtil.getUserName());
|
info.setPublishBy(AdminUserUtil.getUserName());
|
||||||
info.setPublishTime(LocalDateTime.now());
|
info.setPublishTime(LocalDateTime.now());
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.nflg.mobilebroken.repository.service.impl;
|
package com.nflg.mobilebroken.repository.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
@ -24,7 +23,6 @@ import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -57,8 +55,8 @@ public class ProductHonorServiceImpl extends ServiceImpl<ProductHonorMapper, Pro
|
||||||
.setCreateTime(LocalDateTime.now());
|
.setCreateTime(LocalDateTime.now());
|
||||||
save(productHonor);
|
save(productHonor);
|
||||||
if (request.getPublish()) {
|
if (request.getPublish()) {
|
||||||
publish(new BatchPublishRequest()
|
publish(new ProductPublishRequest()
|
||||||
.setIds(List.of(productHonor.getId()))
|
.setId(productHonor.getId())
|
||||||
.setState(PublishState.Published.getState()));
|
.setState(PublishState.Published.getState()));
|
||||||
}
|
}
|
||||||
productHonorInfoService.add(productHonor.getId(), request.getItems());
|
productHonorInfoService.add(productHonor.getId(), request.getItems());
|
||||||
|
|
@ -88,8 +86,8 @@ public class ProductHonorServiceImpl extends ServiceImpl<ProductHonorMapper, Pro
|
||||||
.eq(ProductHonor::getId, request.getId())
|
.eq(ProductHonor::getId, request.getId())
|
||||||
.update();
|
.update();
|
||||||
if (request.getPublish()) {
|
if (request.getPublish()) {
|
||||||
publish(new BatchPublishRequest()
|
publish(new ProductPublishRequest()
|
||||||
.setIds(List.of(request.getId()))
|
.setId(request.getId())
|
||||||
.setState(PublishState.Published.getState()));
|
.setState(PublishState.Published.getState()));
|
||||||
}
|
}
|
||||||
productHonorInfoService.update(request.getItems());
|
productHonorInfoService.update(request.getItems());
|
||||||
|
|
@ -107,20 +105,14 @@ public class ProductHonorServiceImpl extends ServiceImpl<ProductHonorMapper, Pro
|
||||||
return baseMapper.get(language);
|
return baseMapper.get(language);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
|
||||||
@Override
|
@Override
|
||||||
public void publish(BatchPublishRequest request) {
|
public void publish(ProductPublishRequest request) {
|
||||||
List<ProductHonor> list = listByIds(request.getIds());
|
ProductHonor info = getById(request.getId());
|
||||||
|
VUtils.trueThrowBusinessError(Objects.isNull(info)).throwMessage("无效的数据");
|
||||||
|
VUtils.trueThrowBusinessError(Objects.equals(info.getState(), request.getState()))
|
||||||
|
.throwMessage("请勿重复操作");
|
||||||
if (Objects.equals(request.getState(), PublishState.Published.getState())) {
|
if (Objects.equals(request.getState(), PublishState.Published.getState())) {
|
||||||
List<String> names = list.stream().filter(ph -> !ph.getEnable()).map(ProductHonor::getTitle).collect(Collectors.toList());
|
VUtils.trueThrowBusinessError(!info.getEnable()).throwMessage("不能发布已禁用的数据");
|
||||||
VUtils.trueThrowBusinessError(CollectionUtil.isNotEmpty(names)).throwMessage("以下荣誉被禁用不能发布:" + StrUtil.join(",", names));
|
|
||||||
}
|
|
||||||
list.forEach(it -> publish(it, request.getState()));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void publish(ProductHonor info, Integer state) {
|
|
||||||
if (Objects.equals(state, info.getState())) return;
|
|
||||||
if (Objects.equals(state, PublishState.Published.getState())) {
|
|
||||||
info.setState(PublishState.Published.getState());
|
info.setState(PublishState.Published.getState());
|
||||||
info.setPublishBy(AdminUserUtil.getUserName());
|
info.setPublishBy(AdminUserUtil.getUserName());
|
||||||
info.setPublishTime(LocalDateTime.now());
|
info.setPublishTime(LocalDateTime.now());
|
||||||
|
|
|
||||||
|
|
@ -72,27 +72,18 @@ public class ProductModelFileItemServiceImpl extends ServiceImpl<ProductModelFil
|
||||||
.set(ProductModelFileItem::getShowInList, false)
|
.set(ProductModelFileItem::getShowInList, false)
|
||||||
.eq(ProductModelFileItem::getModelId, request.getModelId())
|
.eq(ProductModelFileItem::getModelId, request.getModelId())
|
||||||
.update();
|
.update();
|
||||||
if (CollectionUtil.isNotEmpty(request.getItems())) {
|
request.getItems().forEach(item -> {
|
||||||
request.getItems().forEach(item -> {
|
if (Objects.nonNull(item.getFileItemId())) {
|
||||||
if (Objects.nonNull(item.getFileItemId())) {
|
lambdaUpdate()
|
||||||
lambdaUpdate()
|
.set(ProductModelFileItem::getShowInList, true)
|
||||||
.set(ProductModelFileItem::getShowInList, true)
|
.eq(ProductModelFileItem::getId, item.getFileItemId())
|
||||||
.eq(ProductModelFileItem::getId, item.getFileItemId())
|
.update();
|
||||||
.update();
|
}
|
||||||
}
|
});
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<ProductModelFileItem> getPublishedByLanguage(Integer modelId) {
|
public List<ProductModelFileItem> getPublishedByLanguage(Integer modelId) {
|
||||||
return baseMapper.getPublishedByLanguage(modelId);
|
return baseMapper.getPublishedByLanguage(modelId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
|
||||||
public void removeByFileIds(List<Integer> ids) {
|
|
||||||
remove(new LambdaQueryWrapper<ProductModelFileItem>()
|
|
||||||
.in(ProductModelFileItem::getModelFileId, ids)
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
@ -116,7 +116,6 @@ public class ProductModelFileServiceImpl extends ServiceImpl<ProductModelFileMap
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
|
||||||
@Override
|
@Override
|
||||||
public void delete(BatchDeleteRequest request) {
|
public void delete(BatchDeleteRequest request) {
|
||||||
VUtils.trueThrowBusinessError(lambdaQuery()
|
VUtils.trueThrowBusinessError(lambdaQuery()
|
||||||
|
|
@ -129,12 +128,11 @@ public class ProductModelFileServiceImpl extends ServiceImpl<ProductModelFileMap
|
||||||
.ne(ProductModelFile::getCreateBy, AdminUserUtil.getUserName())
|
.ne(ProductModelFile::getCreateBy, AdminUserUtil.getUserName())
|
||||||
.exists()).throwMessage("不能删除其他人创建的数据");
|
.exists()).throwMessage("不能删除其他人创建的数据");
|
||||||
removeByIds(request.getIds());
|
removeByIds(request.getIds());
|
||||||
productModelFileItemService.removeByFileIds(request.getIds());
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public void publish(BatchPublishRequest request) {
|
public void publish(ProductModelPublishRequest request) {
|
||||||
List<ProductModelFile> datas = listByIds(request.getIds());
|
List<ProductModelFile> datas = listByIds(request.getIds());
|
||||||
datas.removeIf(item -> !item.getEnable());
|
datas.removeIf(item -> !item.getEnable());
|
||||||
datas.forEach(info -> {
|
datas.forEach(info -> {
|
||||||
|
|
@ -249,12 +247,12 @@ public class ProductModelFileServiceImpl extends ServiceImpl<ProductModelFileMap
|
||||||
.setLanguageCode(language.getCode())
|
.setLanguageCode(language.getCode())
|
||||||
.setLanguageName(language.getName())
|
.setLanguageName(language.getName())
|
||||||
.setItems(list.stream().filter(item -> StrUtil.equals(language.getCode(), item.getLanguageCode()))
|
.setItems(list.stream().filter(item -> StrUtil.equals(language.getCode(), item.getLanguageCode()))
|
||||||
.map(item -> new FileDefaultConfigItemVO()
|
.map(item -> {
|
||||||
.setId(item.getId())
|
return new FileDefaultConfigItemVO()
|
||||||
.setName(item.getName())
|
.setId(item.getId())
|
||||||
.setSelected(item.getShowInList())
|
.setName(item.getName())
|
||||||
).collect(Collectors.toList())
|
.setSelected(item.getShowInList());
|
||||||
);
|
}).collect(Collectors.toList()));
|
||||||
vos.add(vo);
|
vos.add(vo);
|
||||||
});
|
});
|
||||||
return vos;
|
return vos;
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,6 @@
|
||||||
package com.nflg.mobilebroken.repository.service.impl;
|
package com.nflg.mobilebroken.repository.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.convert.Convert;
|
||||||
import cn.hutool.core.util.StrUtil;
|
|
||||||
import cn.hutool.json.JSONArray;
|
|
||||||
import cn.hutool.json.JSONObject;
|
|
||||||
import cn.hutool.json.JSONUtil;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
|
@ -15,15 +11,11 @@ import com.nflg.mobilebroken.common.pojo.vo.ProductHotImageInfoVO;
|
||||||
import com.nflg.mobilebroken.common.util.AdminUserUtil;
|
import com.nflg.mobilebroken.common.util.AdminUserUtil;
|
||||||
import com.nflg.mobilebroken.common.util.VUtils;
|
import com.nflg.mobilebroken.common.util.VUtils;
|
||||||
import com.nflg.mobilebroken.repository.entity.ProductModelHotimage;
|
import com.nflg.mobilebroken.repository.entity.ProductModelHotimage;
|
||||||
import com.nflg.mobilebroken.repository.entity.ProductPartInfo;
|
|
||||||
import com.nflg.mobilebroken.repository.mapper.ProductModelHotimageMapper;
|
import com.nflg.mobilebroken.repository.mapper.ProductModelHotimageMapper;
|
||||||
import com.nflg.mobilebroken.repository.service.IProductModelHotimageService;
|
import com.nflg.mobilebroken.repository.service.IProductModelHotimageService;
|
||||||
import com.nflg.mobilebroken.repository.service.IProductPartInfoService;
|
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.ArrayList;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
|
|
||||||
|
|
@ -38,9 +30,6 @@ import java.util.Objects;
|
||||||
@Service
|
@Service
|
||||||
public class ProductModelHotimageServiceImpl extends ServiceImpl<ProductModelHotimageMapper, ProductModelHotimage> implements IProductModelHotimageService {
|
public class ProductModelHotimageServiceImpl extends ServiceImpl<ProductModelHotimageMapper, ProductModelHotimage> implements IProductModelHotimageService {
|
||||||
|
|
||||||
@Resource
|
|
||||||
private IProductPartInfoService productPartInfoService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Integer add(ProductModelHotImageAddRequest request) {
|
public Integer add(ProductModelHotImageAddRequest request) {
|
||||||
ProductModelHotimage info=new ProductModelHotimage()
|
ProductModelHotimage info=new ProductModelHotimage()
|
||||||
|
|
@ -154,33 +143,10 @@ public class ProductModelHotimageServiceImpl extends ServiceImpl<ProductModelHot
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public ProductHotImageInfoVO getListByLanguage(Integer modelId, String language) {
|
public ProductHotImageInfoVO getListByLanguage(Integer modelId) {
|
||||||
ProductModelHotimage info = lambdaQuery()
|
return Convert.convert(ProductHotImageInfoVO.class,lambdaQuery()
|
||||||
.eq(ProductModelHotimage::getModelId, modelId)
|
.eq(ProductModelHotimage::getModelId, modelId)
|
||||||
.eq(ProductModelHotimage::getState, PublishState.Published.getState())
|
.eq(ProductModelHotimage::getState, PublishState.Published.getState())
|
||||||
.one();
|
.one());
|
||||||
if (Objects.isNull(info)) return null;
|
|
||||||
JSONArray jsonArray = JSONUtil.parseArray(info.getData());
|
|
||||||
List<JSONObject> jsonObjects = new ArrayList<>();
|
|
||||||
if (CollectionUtil.isNotEmpty(jsonArray)) {
|
|
||||||
List<Integer> ids = new ArrayList<>();
|
|
||||||
jsonArray.forEach(item -> {
|
|
||||||
JSONObject jsonObject = JSONUtil.parseObj(item);
|
|
||||||
ids.add(jsonObject.getInt("id"));
|
|
||||||
});
|
|
||||||
List<ProductPartInfo> partInfos = productPartInfoService.lambdaQuery().eq(ProductPartInfo::getLanguageCode, language).in(ProductPartInfo::getPartId, ids).list();
|
|
||||||
jsonArray.forEach(obj -> {
|
|
||||||
JSONObject jsonObject = (JSONObject) obj;
|
|
||||||
ProductPartInfo pi = partInfos.stream().filter(partInfo -> Objects.equals(partInfo.getPartId(), jsonObject.getInt("id"))).findFirst().orElse(null);
|
|
||||||
if (Objects.nonNull(pi) && StrUtil.isNotBlank(pi.getName()) && Objects.equals(jsonObject.getInt("id"), pi.getPartId())) {
|
|
||||||
jsonObject.set("name", pi.getName());
|
|
||||||
}
|
|
||||||
jsonObjects.add(jsonObject);
|
|
||||||
});
|
|
||||||
}
|
|
||||||
return new ProductHotImageInfoVO()
|
|
||||||
.setImage(info.getImage())
|
|
||||||
.setImgRect(info.getImgRect())
|
|
||||||
.setData(JSONUtil.toJsonStr(jsonObjects));
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.nflg.mobilebroken.repository.service.impl;
|
package com.nflg.mobilebroken.repository.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import cn.hutool.core.util.RandomUtil;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|
@ -26,7 +25,6 @@ import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -91,18 +89,13 @@ public class ProductModelImageServiceImpl extends ServiceImpl<ProductModelImageM
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void publish(BatchPublishRequest request) {
|
public void publish(ProductPublishRequest request) {
|
||||||
List<ProductModelImage> list = listByIds(request.getIds());
|
ProductModelImage info = getById(request.getId());
|
||||||
|
VUtils.trueThrowBusinessError(Objects.isNull(info)).throwMessage("无效的数据");
|
||||||
|
VUtils.trueThrowBusinessError(Objects.equals(info.getState(), request.getState()))
|
||||||
|
.throwMessage("请勿重复操作");
|
||||||
if (Objects.equals(request.getState(), PublishState.Published.getState())) {
|
if (Objects.equals(request.getState(), PublishState.Published.getState())) {
|
||||||
List<String> names = list.stream().filter(ph -> !ph.getEnable()).map(ProductModelImage::getName).collect(Collectors.toList());
|
VUtils.trueThrowBusinessError(!info.getEnable()).throwMessage("不能发布已禁用的数据");
|
||||||
VUtils.trueThrowBusinessError(CollectionUtil.isNotEmpty(names)).throwMessage("以下图片被禁用不能发布:" + StrUtil.join(",", names));
|
|
||||||
}
|
|
||||||
list.forEach(it -> publish(it, request.getState()));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void publish(ProductModelImage info, Integer state) {
|
|
||||||
if (Objects.equals(state, info.getState())) return;
|
|
||||||
if (Objects.equals(state, PublishState.Published.getState())) {
|
|
||||||
info.setState(PublishState.Published.getState());
|
info.setState(PublishState.Published.getState());
|
||||||
info.setPublishBy(AdminUserUtil.getUserName());
|
info.setPublishBy(AdminUserUtil.getUserName());
|
||||||
info.setPublishTime(LocalDateTime.now());
|
info.setPublishTime(LocalDateTime.now());
|
||||||
|
|
|
||||||
|
|
@ -67,11 +67,13 @@ public class ProductModelServiceImpl extends ServiceImpl<ProductModelMapper, Pro
|
||||||
// .setBatchNumber(request.getBatchNumber())
|
// .setBatchNumber(request.getBatchNumber())
|
||||||
.setNo(request.getNo())
|
.setNo(request.getNo())
|
||||||
.setRecommend(request.getRecommend())
|
.setRecommend(request.getRecommend())
|
||||||
.setRecommendExpireTime(request.getRecommendExpireTime())
|
|
||||||
.setSort(RandomUtil.randomInt(0,10000))
|
.setSort(RandomUtil.randomInt(0,10000))
|
||||||
.setImage(request.getImage())
|
.setImage(request.getImage())
|
||||||
.setCreateBy(AdminUserUtil.getUserName())
|
.setCreateBy(AdminUserUtil.getUserName())
|
||||||
.setCreateTime(LocalDateTime.now());
|
.setCreateTime(LocalDateTime.now());
|
||||||
|
if (request.getRecommend()){
|
||||||
|
productModel.setRecommendTime(LocalDateTime.now());
|
||||||
|
}
|
||||||
save(productModel);
|
save(productModel);
|
||||||
if (request.getPublish()) {
|
if (request.getPublish()) {
|
||||||
publish(new ProductPublishRequest()
|
publish(new ProductPublishRequest()
|
||||||
|
|
@ -93,8 +95,15 @@ public class ProductModelServiceImpl extends ServiceImpl<ProductModelMapper, Pro
|
||||||
} else {
|
} else {
|
||||||
info.setNo(request.getNo());
|
info.setNo(request.getNo());
|
||||||
// info.setSort(request.getSort());
|
// info.setSort(request.getSort());
|
||||||
info.setRecommend(request.getRecommend());
|
if (request.getRecommend()) {
|
||||||
info.setRecommendExpireTime(request.getRecommendExpireTime());
|
if (!info.getRecommend()) {
|
||||||
|
info.setRecommend(true);
|
||||||
|
info.setRecommendTime(LocalDateTime.now());
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
info.setRecommend(false);
|
||||||
|
info.setRecommendTime(null);
|
||||||
|
}
|
||||||
info.setModuleId(request.getModuleId());
|
info.setModuleId(request.getModuleId());
|
||||||
info.setSeriesNumber(request.getSeriesNumber());
|
info.setSeriesNumber(request.getSeriesNumber());
|
||||||
info.setTypeNumber(request.getTypeNumber());
|
info.setTypeNumber(request.getTypeNumber());
|
||||||
|
|
@ -196,7 +205,6 @@ public class ProductModelServiceImpl extends ServiceImpl<ProductModelMapper, Pro
|
||||||
.setId(item.getId())
|
.setId(item.getId())
|
||||||
.setNo(item.getNo())
|
.setNo(item.getNo())
|
||||||
.setRecommend(item.getRecommend())
|
.setRecommend(item.getRecommend())
|
||||||
.setRecommendExpireTime(item.getRecommendExpireTime())
|
|
||||||
.setImage(item.getImage())
|
.setImage(item.getImage())
|
||||||
.setParams(productPartParamsService.getMainListByLanguage(item.getId(), language))
|
.setParams(productPartParamsService.getMainListByLanguage(item.getId(), language))
|
||||||
.setFile(productModelFileService.getDefaultByLanguage(item.getId(), language)))
|
.setFile(productModelFileService.getDefaultByLanguage(item.getId(), language)))
|
||||||
|
|
@ -298,7 +306,7 @@ public class ProductModelServiceImpl extends ServiceImpl<ProductModelMapper, Pro
|
||||||
.setDesc(Objects.isNull(intro)?"":intro.getDesc())
|
.setDesc(Objects.isNull(intro)?"":intro.getDesc())
|
||||||
.setFeature(Objects.isNull(intro)?"":intro.getFeature())
|
.setFeature(Objects.isNull(intro)?"":intro.getFeature())
|
||||||
.setMerits(Objects.isNull(intro)?"":intro.getMerits())
|
.setMerits(Objects.isNull(intro)?"":intro.getMerits())
|
||||||
.setHotImage(productModelHotimageService.getListByLanguage(modelId, language))
|
.setHotImage(productModelHotimageService.getListByLanguage(modelId))
|
||||||
.setParams(productPartParamsService.getAListByLanguage(modelId, language))
|
.setParams(productPartParamsService.getAListByLanguage(modelId, language))
|
||||||
.setMainParams(productPartParamsService.getMainListByLanguage(modelId, language))
|
.setMainParams(productPartParamsService.getMainListByLanguage(modelId, language))
|
||||||
.setImportantParams(productPartParamsService.getImportantListByLanguage(modelId, language))
|
.setImportantParams(productPartParamsService.getImportantListByLanguage(modelId, language))
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.nflg.mobilebroken.repository.service.impl;
|
package com.nflg.mobilebroken.repository.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
|
||||||
import cn.hutool.core.util.RandomUtil;
|
import cn.hutool.core.util.RandomUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
|
|
@ -26,7 +25,6 @@ import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Objects;
|
import java.util.Objects;
|
||||||
import java.util.stream.Collectors;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -112,31 +110,26 @@ public class ProductModelVideoServiceImpl extends ServiceImpl<ProductModelVideoM
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void publish(BatchPublishRequest request) {
|
public void publish(ProductPublishRequest request) {
|
||||||
List<ProductModelVideo> list = listByIds(request.getIds());
|
ProductModelVideo info = getById(request.getId());
|
||||||
|
VUtils.trueThrowBusinessError(Objects.isNull(info)).throwMessage("无效的数据");
|
||||||
|
VUtils.trueThrowBusinessError(Objects.equals(info.getState(), request.getState()))
|
||||||
|
.throwMessage("请勿重复操作");
|
||||||
if (Objects.equals(request.getState(), PublishState.Published.getState())) {
|
if (Objects.equals(request.getState(), PublishState.Published.getState())) {
|
||||||
List<String> names = list.stream().filter(ph -> !ph.getEnable()).map(ProductModelVideo::getName).collect(Collectors.toList());
|
VUtils.trueThrowBusinessError(!info.getEnable()).throwMessage("不能发布已禁用的数据");
|
||||||
VUtils.trueThrowBusinessError(CollectionUtil.isNotEmpty(names)).throwMessage("以下视频被禁用不能发布:" + StrUtil.join(",", names));
|
|
||||||
}
|
|
||||||
list.forEach(it -> publish(it, request.getState()));
|
|
||||||
}
|
|
||||||
|
|
||||||
private void publish(ProductModelVideo info, Integer state) {
|
|
||||||
if (Objects.equals(state, info.getState())) return;
|
|
||||||
if (Objects.equals(state, PublishState.Published.getState())) {
|
|
||||||
info.setState(PublishState.Published.getState());
|
info.setState(PublishState.Published.getState());
|
||||||
info.setPublishBy(AdminUserUtil.getUserName());
|
info.setPublishBy(AdminUserUtil.getUserName());
|
||||||
info.setPublishTime(LocalDateTime.now());
|
info.setPublishTime(LocalDateTime.now());
|
||||||
lambdaUpdate()
|
lambdaUpdate()
|
||||||
.set(ProductModelVideo::getState, PublishState.Obsolete.getState())
|
.set(ProductModelVideo::getState, PublishState.Obsolete.getState())
|
||||||
.eq(ProductModelVideo::getModelId, info.getModelId())
|
.eq(ProductModelVideo::getModelId, info.getModelId())
|
||||||
.eq(ProductModelVideo::getBatchNumber, info.getBatchNumber())
|
.eq(ProductModelVideo::getBatchNumber,info.getBatchNumber())
|
||||||
.eq(ProductModelVideo::getState, PublishState.Published.getState())
|
.eq(ProductModelVideo::getState, PublishState.Published.getState())
|
||||||
.update();
|
.update();
|
||||||
} else {
|
} else {
|
||||||
ProductModelVideo obsolete = lambdaQuery()
|
ProductModelVideo obsolete = lambdaQuery()
|
||||||
.eq(ProductModelVideo::getModelId, info.getModelId())
|
.eq(ProductModelVideo::getModelId, info.getModelId())
|
||||||
.eq(ProductModelVideo::getBatchNumber, info.getBatchNumber())
|
.eq(ProductModelVideo::getBatchNumber,info.getBatchNumber())
|
||||||
.eq(ProductModelVideo::getState, PublishState.Obsolete.getState())
|
.eq(ProductModelVideo::getState, PublishState.Obsolete.getState())
|
||||||
.orderByDesc(ProductModelVideo::getPublishTime)
|
.orderByDesc(ProductModelVideo::getPublishTime)
|
||||||
.last("Limit 1")
|
.last("Limit 1")
|
||||||
|
|
|
||||||
|
|
@ -31,8 +31,8 @@ public class TicketCallJoinServiceImpl extends ServiceImpl<TicketCallJoinMapper,
|
||||||
private ITicketCallService ticketCallService;
|
private ITicketCallService ticketCallService;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean isInCall(Integer ticketId, String from, Integer userId) {
|
public boolean isInCall(Integer userId) {
|
||||||
return baseMapper.isInCall(ticketId, from, userId);
|
return baseMapper.isInCall(userId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
|
|
@ -84,14 +84,7 @@ public class TicketCallJoinServiceImpl extends ServiceImpl<TicketCallJoinMapper,
|
||||||
.set(TicketCallJoin::getState, 2)
|
.set(TicketCallJoin::getState, 2)
|
||||||
.set(reject, TicketCallJoin::getHangupTime, LocalDateTime.now())
|
.set(reject, TicketCallJoin::getHangupTime, LocalDateTime.now())
|
||||||
.eq(TicketCallJoin::getCallId, callId)
|
.eq(TicketCallJoin::getCallId, callId)
|
||||||
.update();
|
.ne(TicketCallJoin::getFrom, from)
|
||||||
} else {
|
|
||||||
lambdaUpdate()
|
|
||||||
.set(TicketCallJoin::getState, 2)
|
|
||||||
.set(reject, TicketCallJoin::getHangupTime, LocalDateTime.now())
|
|
||||||
.eq(TicketCallJoin::getCallId, callId)
|
|
||||||
.eq(TicketCallJoin::getUserId, userId)
|
|
||||||
.eq(TicketCallJoin::getFrom, from)
|
|
||||||
.update();
|
.update();
|
||||||
}
|
}
|
||||||
if (!lambdaQuery()
|
if (!lambdaQuery()
|
||||||
|
|
@ -126,4 +119,12 @@ public class TicketCallJoinServiceImpl extends ServiceImpl<TicketCallJoinMapper,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public void hangUpAll(Integer id) {
|
||||||
|
lambdaUpdate()
|
||||||
|
.set(TicketCallJoin::getState, 2)
|
||||||
|
.eq(TicketCallJoin::getCallId, id)
|
||||||
|
.update();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -1,6 +1,8 @@
|
||||||
package com.nflg.mobilebroken.repository.service.impl;
|
package com.nflg.mobilebroken.repository.service.impl;
|
||||||
|
|
||||||
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
|
import com.nflg.mobilebroken.common.constant.Constant;
|
||||||
import com.nflg.mobilebroken.repository.entity.TicketCall;
|
import com.nflg.mobilebroken.repository.entity.TicketCall;
|
||||||
import com.nflg.mobilebroken.repository.entity.TicketCallJoin;
|
import com.nflg.mobilebroken.repository.entity.TicketCallJoin;
|
||||||
import com.nflg.mobilebroken.repository.mapper.TicketCallMapper;
|
import com.nflg.mobilebroken.repository.mapper.TicketCallMapper;
|
||||||
|
|
@ -11,6 +13,7 @@ import org.springframework.transaction.annotation.Transactional;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.time.LocalDateTime;
|
import java.time.LocalDateTime;
|
||||||
|
import java.util.Objects;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <p>
|
* <p>
|
||||||
|
|
@ -26,33 +29,26 @@ public class TicketCallServiceImpl extends ServiceImpl<TicketCallMapper, TicketC
|
||||||
@Resource
|
@Resource
|
||||||
private ITicketCallJoinService ticketCallJoinService;
|
private ITicketCallJoinService ticketCallJoinService;
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
// public boolean isInCall(Integer userId) {
|
public boolean isInCall(Integer userId) {
|
||||||
// return lambdaQuery()
|
return lambdaQuery()
|
||||||
// .eq(TicketCall::getState, 1)
|
.eq(TicketCall::getState, 1)
|
||||||
// .eq(TicketCall::getCallerUserId, userId)
|
.eq(TicketCall::getCallerUserId, userId)
|
||||||
// .exists()
|
.exists()
|
||||||
// ||
|
||
|
||||||
// ticketCallJoinService.isInCall(userId);
|
ticketCallJoinService.isInCall(userId);
|
||||||
// }
|
}
|
||||||
|
|
||||||
@Transactional
|
@Transactional
|
||||||
@Override
|
@Override
|
||||||
public void add(Integer ticketId, Integer callerUserId,String callerUserFrom, Integer calledUserId, String calledUserFrom) {
|
public void add(Integer ticketId, Integer callerUserId,String callerUserFrom, Integer calledUserId, String calledUserFrom) {
|
||||||
TicketCall ticketCall = new TicketCall()
|
TicketCall ticketCall = new TicketCall()
|
||||||
.setTicketId(ticketId)
|
.setTicketId(ticketId)
|
||||||
// .setCallerUserId(callerUserId)
|
.setCallerUserId(callerUserId)
|
||||||
.setState(0)
|
.setState(0)
|
||||||
// .setFrom(callerUserFrom)
|
.setFrom(callerUserFrom)
|
||||||
.setCreateTime(LocalDateTime.now());
|
.setCreateTime(LocalDateTime.now());
|
||||||
save(ticketCall);
|
save(ticketCall);
|
||||||
ticketCallJoinService.save(new TicketCallJoin()
|
|
||||||
.setCallId(ticketCall.getId())
|
|
||||||
.setFrom(callerUserFrom)
|
|
||||||
.setUserId(callerUserId)
|
|
||||||
.setState(0)
|
|
||||||
.setCreateTime(LocalDateTime.now())
|
|
||||||
);
|
|
||||||
ticketCallJoinService.save(new TicketCallJoin()
|
ticketCallJoinService.save(new TicketCallJoin()
|
||||||
.setCallId(ticketCall.getId())
|
.setCallId(ticketCall.getId())
|
||||||
.setFrom(calledUserFrom)
|
.setFrom(calledUserFrom)
|
||||||
|
|
@ -62,24 +58,24 @@ public class TicketCallServiceImpl extends ServiceImpl<TicketCallMapper, TicketC
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
// @Override
|
@Override
|
||||||
// public boolean hangUp(Integer ticketId, Integer userId, String from, boolean reject) {
|
public boolean hangUp(Integer ticketId, Integer userId, String from, boolean reject) {
|
||||||
// TicketCall ticketCall = getLast(ticketId);
|
TicketCall ticketCall = getLast(ticketId);
|
||||||
// boolean flag = false;
|
boolean flag = false;
|
||||||
// if (Objects.nonNull(ticketCall)){
|
if (Objects.nonNull(ticketCall)){
|
||||||
// if ((Objects.equals(ticketCall.getCallerUserId(), userId) && StrUtil.equals(ticketCall.getFrom(), Constant.FROM_APP))
|
if ((Objects.equals(ticketCall.getCallerUserId(), userId) && StrUtil.equals(ticketCall.getFrom(), Constant.FROM_APP))
|
||||||
// || ticketCallJoinService.allIsHangUp(ticketCall.getId())){
|
|| ticketCallJoinService.allIsHangUp(ticketCall.getId())){
|
||||||
// ticketCall.setState(2);
|
ticketCall.setState(2);
|
||||||
// ticketCallJoinService.hangUpAll(ticketCall.getId());
|
ticketCallJoinService.hangUpAll(ticketCall.getId());
|
||||||
// if (reject) {
|
if (reject) {
|
||||||
// ticketCall.setHangupTime(LocalDateTime.now());
|
ticketCall.setHangupTime(LocalDateTime.now());
|
||||||
// }
|
}
|
||||||
// updateById(ticketCall);
|
updateById(ticketCall);
|
||||||
// }
|
}
|
||||||
// flag=ticketCallJoinService.hangUp(ticketCall.getId(), userId, from, reject);
|
flag=ticketCallJoinService.hangUp(ticketCall.getId(), userId, from, reject);
|
||||||
// }
|
}
|
||||||
// return flag;
|
return flag;
|
||||||
// }
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public TicketCall getLast(Integer ticketId) {
|
public TicketCall getLast(Integer ticketId) {
|
||||||
|
|
|
||||||
|
|
@ -28,13 +28,9 @@
|
||||||
SELECT au.id
|
SELECT au.id
|
||||||
FROM t_base_position p
|
FROM t_base_position p
|
||||||
INNER JOIN admin_user au ON au.title_id=p.id
|
INNER JOIN admin_user au ON au.title_id=p.id
|
||||||
WHERE au.state=1 AND au.is_del=0 AND p.ticket_manage
|
WHERE au.state=1 AND au.is_del=0 AND p.position_code IN
|
||||||
</select>
|
<foreach collection="titleCodes" item="titleCode" separator="," open="(" close=")">
|
||||||
|
#{titleCode}
|
||||||
<select id="getCQMIds" resultType="java.lang.Integer">
|
</foreach>
|
||||||
SELECT au.id
|
|
||||||
FROM t_base_position p
|
|
||||||
INNER JOIN admin_user au ON au.title_id=p.id
|
|
||||||
WHERE au.state=1 AND au.is_del=0 AND p.position_code=#{titleCode}
|
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,6 @@
|
||||||
from product_model_file pmf
|
from product_model_file pmf
|
||||||
inner join product_model_file_item pmfi on pmfi.model_file_id=pmf.id
|
inner join product_model_file_item pmfi on pmfi.model_file_id=pmf.id
|
||||||
where pmf.state=1 and pmf.enable=1 and pmf.model_id=#{modelId}
|
where pmf.state=1 and pmf.enable=1 and pmf.model_id=#{modelId}
|
||||||
order by pmfi.language_code,pmfi.show_in_list desc,pmfi.id desc
|
order by pmfi.language_code,pmfi.show_in_list desc
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.nflg.mobilebroken.repository.mapper.ProductModelFileMapper">
|
<mapper namespace="com.nflg.mobilebroken.repository.mapper.ProductModelFileMapper">
|
||||||
<select id="getDefaultByLanguage" resultType="com.nflg.mobilebroken.common.pojo.vo.ProductFileVO">
|
<select id="getDefaultByLanguage" resultType="com.nflg.mobilebroken.common.pojo.vo.ProductFileVO">
|
||||||
SELECT pmfi.name,pmf.*
|
SELECT pmfi.name, pmfi.*
|
||||||
FROM product_model_file pmf
|
FROM product_model_file pmf
|
||||||
INNER JOIN product_model_file_item pmfi ON pmf.id = pmfi.model_file_id
|
INNER JOIN product_model_file_item pmfi ON pmf.id = pmfi.model_file_id
|
||||||
WHERE pmf.`enable` = 1
|
WHERE pmf.`enable` = 1
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,9 @@
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="getList" resultType="com.nflg.mobilebroken.repository.entity.TBasePosition">
|
<select id="getList" resultType="com.nflg.mobilebroken.repository.entity.TBasePosition">
|
||||||
select *
|
select id, position_code, position_name, position_attribute, data_create_user_no,
|
||||||
|
data_create_user_name, data_create_time, data_modify_user_no, data_modify_user_name,
|
||||||
|
data_modify_time
|
||||||
from t_base_position
|
from t_base_position
|
||||||
where data_valid_state=1 <include refid="whr" />
|
where data_valid_state=1 <include refid="whr" />
|
||||||
</select>
|
</select>
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,6 @@
|
||||||
INNER JOIN ticket_call_join tcj ON tc.id = tcj.call_id
|
INNER JOIN ticket_call_join tcj ON tc.id = tcj.call_id
|
||||||
WHERE tc.state = 1
|
WHERE tc.state = 1
|
||||||
AND tcj.state = 1
|
AND tcj.state = 1
|
||||||
AND tcj.user_id = #{userId} and tcj.from = #{from} and tc.ticket_id = #{ticketId}
|
AND tcj.user_id = #{userId}
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue