Commit e4b76240 by 涂亚平

凌晨时间限制

1 parent a28c0dbc
...@@ -111,8 +111,9 @@ public class GlobalExceptionHandler { ...@@ -111,8 +111,9 @@ public class GlobalExceptionHandler {
@ExceptionHandler(value = Exception.class) @ExceptionHandler(value = Exception.class)
public ResponseVO<T> serverInternalError(Exception e, HttpServletRequest request) { public ResponseVO<T> serverInternalError(Exception e, HttpServletRequest request) {
String url = request.getRequestURI(); String url = request.getRequestURI();
log.error("path:"+url); // log.error("path:"+url);
log.error("---- error message: ---"+e.toString()); // log.error("---- error message: ---"+e.toString());
e.printStackTrace();
return ResponseData.generateCreatedResponse(Code.SERVER_INTERNAL_ERROR.getCode(), Code.SERVER_INTERNAL_ERROR.getMessage(), url); return ResponseData.generateCreatedResponse(Code.SERVER_INTERNAL_ERROR.getCode(), Code.SERVER_INTERNAL_ERROR.getMessage(), url);
} }
} }
\ No newline at end of file
...@@ -63,7 +63,7 @@ public class AdministerController { ...@@ -63,7 +63,7 @@ public class AdministerController {
@PostMapping("/administers") @PostMapping("/administers")
@ApiOperation("查询所有运营者 { userName pageNum pageSize }") @ApiOperation("查询所有运营者 { userName pageNum pageSize }")
@LoginRequired // @LoginRequired
public ResponseVO operators(@RequestBody OperatorsDTO operatorsDTO){ public ResponseVO operators(@RequestBody OperatorsDTO operatorsDTO){
return ResponseData.generateCreatedResponse(0,administerService.operators(operatorsDTO)); return ResponseData.generateCreatedResponse(0,administerService.operators(operatorsDTO));
} }
......
...@@ -34,14 +34,14 @@ public class CompanyDictController { ...@@ -34,14 +34,14 @@ public class CompanyDictController {
private CompanyDictService companyDictService; private CompanyDictService companyDictService;
@PostMapping("/administers") @PostMapping("/administers")
@ApiOperation("查询所有企业 {id companyName fieldId 行业id pageNum pageSize }") @ApiOperation("查询所有企业 {id companyName fieldId 行业id superviseName 监管第三方名称 pageNum pageSize }")
@LoginRequired @LoginRequired
public ResponseVO operators(@RequestBody OperatorsDTO operatorsDTO){ public ResponseVO operators(@RequestBody OperatorsDTO operatorsDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.operators(operatorsDTO)); return ResponseData.generateCreatedResponse(0,companyDictService.operators(operatorsDTO));
} }
@PostMapping("addCompany") @PostMapping("addCompany")
@ApiOperation("添加企业 {accountName:账号 companyName:企业名称 address 企业所在地 shortName 简称 banner:标语 field[]:领域 role 1:超级管理员 2:普通成员}") @ApiOperation("添加企业 {accountName:账号 superviseName 第三方监管名称 companyName:企业名称 address 企业所在地 shortName 简称 banner:标语 field[]:领域 role 1:超级管理员 2:普通成员}")
@LoginRequired @LoginRequired
public ResponseVO addOperator(@RequestBody AddCompanyDTO addCompanyDTO){ public ResponseVO addOperator(@RequestBody AddCompanyDTO addCompanyDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.addOperator(addCompanyDTO)); return ResponseData.generateCreatedResponse(0,companyDictService.addOperator(addCompanyDTO));
...@@ -55,7 +55,7 @@ public class CompanyDictController { ...@@ -55,7 +55,7 @@ public class CompanyDictController {
} }
@PostMapping("updateCompany") @PostMapping("updateCompany")
@ApiOperation("修改企业 id accountName:账号 logo companyName:企业名称 address 企业所在地 shortName 简称 banner:标语 field[]:领域 role 1:超级管理员 2:普通成员") @ApiOperation("修改企业 id superviseName 第三方监管名称 accountName:账号 logo companyName:企业名称 address 企业所在地 shortName 简称 banner:标语 field[]:领域 role 1:超级管理员 2:普通成员")
@LoginRequired @LoginRequired
public ResponseVO updateAdminister(@RequestBody AddCompanyDTO addCompanyDTO){ public ResponseVO updateAdminister(@RequestBody AddCompanyDTO addCompanyDTO){
return ResponseData.generateCreatedResponse(0,companyDictService.updateAdminister(addCompanyDTO)); return ResponseData.generateCreatedResponse(0,companyDictService.updateAdminister(addCompanyDTO));
......
...@@ -19,4 +19,6 @@ public class OperatorsDTO { ...@@ -19,4 +19,6 @@ public class OperatorsDTO {
private Long id; private Long id;
private String superviseName;
} }
...@@ -24,7 +24,7 @@ public interface CompanyDictMapper extends BaseMapper<CompanyDictDO> { ...@@ -24,7 +24,7 @@ public interface CompanyDictMapper extends BaseMapper<CompanyDictDO> {
* 企业管理--查找所有主账号 、运营者 * 企业管理--查找所有主账号 、运营者
* @return * @return
*/ */
IPage<OperatorsVO> operators(IPage page, String companyName,Long fieldId,Long id,Integer role); IPage<OperatorsVO> operators(IPage page, String companyName,Long fieldId,Long id,Integer role,String superviseName);
/** /**
* 查找所有的公司名称 * 查找所有的公司名称
......
...@@ -55,5 +55,9 @@ public class CompanyDictDO extends BaseModel { ...@@ -55,5 +55,9 @@ public class CompanyDictDO extends BaseModel {
*/ */
private Boolean qxyStatus; private Boolean qxyStatus;
/**
* 第三方监管名称
*/
private String superviseName;
} }
...@@ -333,7 +333,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis ...@@ -333,7 +333,7 @@ public class AdministerServiceImpl extends ServiceImpl<AdministerMapper, Adminis
public IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO) { public IPage<OperatorsVO> operators(OperatorsDTO operatorsDTO) {
Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize()); Page pager = new Page(operatorsDTO.getPageNum(), operatorsDTO.getPageSize());
IPage<OperatorsVO> operatorsVOIPage = companyDictMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(), null, 1); IPage<OperatorsVO> operatorsVOIPage = companyDictMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(), null, 1,null);
List<OperatorsVO> operatorsVOS = operatorsVOIPage.getRecords(); List<OperatorsVO> operatorsVOS = operatorsVOIPage.getRecords();
for (OperatorsVO operatorsVO : operatorsVOS) { for (OperatorsVO operatorsVO : operatorsVOS) {
......
...@@ -102,7 +102,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -102,7 +102,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
if (count > 0){ if (count > 0){
administerDO.setCompanyId(null); administerDO.setCompanyId(null);
} }
IPage page = this.baseMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(),administerDO.getCompanyId(),2); IPage page = this.baseMapper.operators(pager, operatorsDTO.getCompanyName(), operatorsDTO.getFieldId(),administerDO.getCompanyId(),2,operatorsDTO.getSuperviseName());
List<OperatorsVO> operatorsVOS = page.getRecords(); List<OperatorsVO> operatorsVOS = page.getRecords();
for (OperatorsVO operatorsVO : operatorsVOS) { for (OperatorsVO operatorsVO : operatorsVOS) {
//查看公司所在行业 //查看公司所在行业
...@@ -232,7 +232,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -232,7 +232,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
BeanUtils.copyProperties(addCompanyDTO, companyDictDO); BeanUtils.copyProperties(addCompanyDTO, companyDictDO);
this.baseMapper.updateById(companyDictDO); this.baseMapper.updateById(companyDictDO);
if (addCompanyDTO.getField().size() > 0) { if (null != addCompanyDTO.getField() && addCompanyDTO.getField().size() > 0) {
companyFieldMappingMapper.delete(new QueryWrapper<CompanyFieldMappingDO>() companyFieldMappingMapper.delete(new QueryWrapper<CompanyFieldMappingDO>()
.lambda() .lambda()
.eq(CompanyFieldMappingDO::getCompanyId, addCompanyDTO.getId())); .eq(CompanyFieldMappingDO::getCompanyId, addCompanyDTO.getId()));
...@@ -248,7 +248,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -248,7 +248,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
//查找企业管理员 //查找企业管理员
AdministerDO administerDO = roleAdministerMappingMapper.getAdminister(addCompanyDTO.getId()); AdministerDO administerDO = roleAdministerMappingMapper.getAdminister(addCompanyDTO.getId());
if (null !=administerDO){
if (StringUtils.isNotBlank(addCompanyDTO.getAccountName())) { if (StringUtils.isNotBlank(addCompanyDTO.getAccountName())) {
administerDO.setAccountName(addCompanyDTO.getAccountName()); administerDO.setAccountName(addCompanyDTO.getAccountName());
} }
...@@ -256,6 +256,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa ...@@ -256,6 +256,7 @@ public class CompanyDictServiceImpl extends ServiceImpl<CompanyDictMapper, Compa
addCompanyDTO.setPassword(addCompanyDTO.getPassword()); addCompanyDTO.setPassword(addCompanyDTO.getPassword());
} }
administerMapper.updateById(administerDO); administerMapper.updateById(administerDO);
}
return ConstantUtils.SET_SUCCESS; return ConstantUtils.SET_SUCCESS;
} }
......
...@@ -377,6 +377,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -377,6 +377,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
oprMemDictMapper.insert(oprMemDictDO); oprMemDictMapper.insert(oprMemDictDO);
//mongoTemplate.insert(oprMemDictDO); //mongoTemplate.insert(oprMemDictDO);
userRoleVO.setCompanyId(companyDictDO.getId()); userRoleVO.setCompanyId(companyDictDO.getId());
userRoleVO.setSuperviseName(companyDictDO.getSuperviseName());
userRoleVO.setCompanyName(companyDictDO.getCompanyName()); userRoleVO.setCompanyName(companyDictDO.getCompanyName());
userRoleVO.setLogo(companyDictDO.getLogo()); userRoleVO.setLogo(companyDictDO.getLogo());
userRoleVO.setQxyStatus(companyDictDO.getQxyStatus()); userRoleVO.setQxyStatus(companyDictDO.getQxyStatus());
...@@ -429,6 +430,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -429,6 +430,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
//mongoTemplate.insert(oprMemDictDO); //mongoTemplate.insert(oprMemDictDO);
oprMemDictMapper.insert(oprMemDictDO); oprMemDictMapper.insert(oprMemDictDO);
memberVO.setCompanyId(companyDictDO.getId()); memberVO.setCompanyId(companyDictDO.getId());
memberVO.setSuperviseName(companyDictDO.getSuperviseName());
memberVO.setCompanyName(companyDictDO.getCompanyName()); memberVO.setCompanyName(companyDictDO.getCompanyName());
memberVO.setLogo(companyDictDO.getLogo()); memberVO.setLogo(companyDictDO.getLogo());
List<RotationImgDictDO> rotationImgDictDOS = rotationImgDictMapper.selectList(new QueryWrapper<RotationImgDictDO>() List<RotationImgDictDO> rotationImgDictDOS = rotationImgDictMapper.selectList(new QueryWrapper<RotationImgDictDO>()
...@@ -577,6 +579,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -577,6 +579,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
oprMemDictDO.setResult(1); oprMemDictDO.setResult(1);
oprMemDictMapper.insert(oprMemDictDO); oprMemDictMapper.insert(oprMemDictDO);
userRoleVO.setCompanyId(companyDictDO.getId()); userRoleVO.setCompanyId(companyDictDO.getId());
userRoleVO.setSuperviseName(companyDictDO.getSuperviseName());
userRoleVO.setCompanyName(companyDictDO.getCompanyName()); userRoleVO.setCompanyName(companyDictDO.getCompanyName());
userRoleVO.setLogo(companyDictDO.getLogo()); userRoleVO.setLogo(companyDictDO.getLogo());
userRoleVO.setQxyStatus(companyDictDO.getQxyStatus()); userRoleVO.setQxyStatus(companyDictDO.getQxyStatus());
...@@ -663,6 +666,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple ...@@ -663,6 +666,7 @@ public class MemberServiceImpl extends ServiceImpl<MemberMapper, MemberDO> imple
oprMemDictDO.setResult(1); oprMemDictDO.setResult(1);
oprMemDictMapper.insert(oprMemDictDO); oprMemDictMapper.insert(oprMemDictDO);
userRoleVO.setCompanyId(companyDictDO.getId()); userRoleVO.setCompanyId(companyDictDO.getId());
userRoleVO.setSuperviseName(companyDictDO.getSuperviseName());
userRoleVO.setCompanyName(companyDictDO.getCompanyName()); userRoleVO.setCompanyName(companyDictDO.getCompanyName());
userRoleVO.setLogo(companyDictDO.getLogo()); userRoleVO.setLogo(companyDictDO.getLogo());
userRoleVO.setQxyStatus(companyDictDO.getQxyStatus()); userRoleVO.setQxyStatus(companyDictDO.getQxyStatus());
......
...@@ -624,7 +624,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper, ...@@ -624,7 +624,7 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
public List<Long> testPlays(VodPlayHistoryDO vodPlayHistoryDO) { public List<Long> testPlays(VodPlayHistoryDO vodPlayHistoryDO) {
String classIds = "122,150,151,152,153,165,168,195,199,200,202,203,204,205,206,207,209,210,211,212,213,215,227,228,229,233,234,235,240,241,243,244,248,249,250"; String classIds = "254";
// String classIds = "122,150"; // String classIds = "122,150";
List<String> classIdArr = Arrays.asList(classIds.split(",")); List<String> classIdArr = Arrays.asList(classIds.split(","));
...@@ -641,20 +641,19 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper, ...@@ -641,20 +641,19 @@ public class VodPlayHistoryServiceImpl extends ServiceImpl<VodPlayHistoryMapper,
VodPlayStateVO vodPlayStateVO = vodPlayStateVOS.get(k); VodPlayStateVO vodPlayStateVO = vodPlayStateVOS.get(k);
VodPlayStateVO vodPlayStateVO1 = vodPlayStateVOS.get(i); VodPlayStateVO vodPlayStateVO1 = vodPlayStateVOS.get(i);
if (vodPlayStateVO.getStartDate().after(vodPlayStateVO1.getStartDate()) && vodPlayStateVO.getStartDate().before(vodPlayStateVO1.getEndDate())) { if (vodPlayStateVO.getStartDate().after(vodPlayStateVO1.getStartDate()) && vodPlayStateVO.getStartDate().before(vodPlayStateVO1.getEndDate())) {
// System.out.println(vodPlayStateVO); System.out.println("111111111"+vodPlayStateVO);
//这一条数据有问题 //这一条数据有问题
//查看这个人 这个课程 当天的全部数据 按照createDate升序排序 //查看这个人 这个课程 当天的全部数据 按照createDate升序排序
List<VodPlayHistoryDO> vodPlayHistoryDOS = this.baseMapper.getVodPlayDay(Long.valueOf(classId), vodPlayStateVO.getMemberId(), vodPlayStateVO.getEndDate()); // List<VodPlayHistoryDO> vodPlayHistoryDOS = this.baseMapper.getVodPlayDay(Long.valueOf(classId), vodPlayStateVO.getMemberId(), vodPlayStateVO.getEndDate());
//从第一条开始看,顺延减去第二条的playlength得到第二条的create_date 以此类推 //从第一条开始看,顺延减去第二条的playlength得到第二条的create_date 以此类推
for (int l = 0; l < vodPlayHistoryDOS.size() - 1; l++) { // for (int l = 0; l < vodPlayHistoryDOS.size() - 1; l++) {
VodPlayHistoryDO vph1 = vodPlayHistoryDOS.get(l); // VodPlayHistoryDO vph1 = vodPlayHistoryDOS.get(l);
VodPlayHistoryDO vph2 = vodPlayHistoryDOS.get(l + 1); // VodPlayHistoryDO vph2 = vodPlayHistoryDOS.get(l + 1);
// playLength += vph2.getPlayLength(); // LocalDateTime dateTmp = vph1.getCreateDate().minusSeconds(-vph2.getPlayLength() - getRandom1_2());
LocalDateTime dateTmp = vph1.getCreateDate().minusSeconds(-vph2.getPlayLength() - getRandom1_2()); // vph2.setCreateDate(dateTmp);
vph2.setCreateDate(dateTmp); // this.baseMapper.updateById(vph2);
this.baseMapper.updateById(vph2);
// result.add(vodPlayStateVO.getId()); // result.add(vodPlayStateVO.getId());
} // }
} }
} }
} }
......
...@@ -16,7 +16,7 @@ public abstract class BaseModel { ...@@ -16,7 +16,7 @@ public abstract class BaseModel {
* 创建时间 * 创建时间
*/ */
@JsonIgnore @JsonIgnore
// @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER, value = "create_date", fill = FieldFill.INSERT) @TableField(insertStrategy = FieldStrategy.NEVER, updateStrategy = FieldStrategy.NEVER, value = "create_date", fill = FieldFill.INSERT)
private LocalDateTime createDate; private LocalDateTime createDate;
/** /**
......
...@@ -154,6 +154,6 @@ public class SecretUtils { ...@@ -154,6 +154,6 @@ public class SecretUtils {
String uuid = UUID.randomUUID().toString(); String uuid = UUID.randomUUID().toString();
System.out.println(uuid.replace("-","")); System.out.println(uuid.replace("-",""));
// System.out.println(hash(uuid+"ixihs")); // System.out.println(hash(uuid+"ixihs"));
System.out.println(System.currentTimeMillis()); // System.out.println(System.currentTimeMillis());
} }
} }
\ No newline at end of file
...@@ -31,4 +31,6 @@ public class OperatorsVO { ...@@ -31,4 +31,6 @@ public class OperatorsVO {
private Long companyId; private Long companyId;
private String logo; private String logo;
private String superviseName;
} }
...@@ -14,14 +14,14 @@ public class UserRoleVO { ...@@ -14,14 +14,14 @@ public class UserRoleVO {
private String userName; private String userName;
private String accountName;
private String image; private String image;
private String status; private String status;
private Integer firstLogin; private Integer firstLogin;
private String password;
private String companyName; private String companyName;
private Boolean qxyStatus; private Boolean qxyStatus;
...@@ -34,4 +34,6 @@ public class UserRoleVO { ...@@ -34,4 +34,6 @@ public class UserRoleVO {
private String token; private String token;
private String superviseName;
} }
...@@ -16,6 +16,8 @@ public class MemberVO { ...@@ -16,6 +16,8 @@ public class MemberVO {
private String userName; private String userName;
private String accountName;
private String image; private String image;
private Integer firstLogin; private Integer firstLogin;
...@@ -31,4 +33,6 @@ public class MemberVO { ...@@ -31,4 +33,6 @@ public class MemberVO {
private List<RotationImgDictDO> rotationImgDictDOS; private List<RotationImgDictDO> rotationImgDictDOS;
private String token; private String token;
private String superviseName;
} }
# 本地环境配置 # 本地环境配置
spring.server.port=23457
# 数据源配置 # 数据源配置
spring.datasource.url=jdbc:mysql://47.97.19.66:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 spring.datasource.url=jdbc:mysql://47.97.19.66:3306/subsidy_test?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
......
# 生产环境配置 # 生产环境配置
spring.server.port=23459
# 数据源配置 # 数据源配置
spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 spring.datasource.url=jdbc:mysql://rm-uf69w46mo6agw0ahao.mysql.rds.aliyuncs.com:3306/subsidy?autoReconnect=true&useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8
......
# 环境配置 # 环境配置
spring.profiles.active=prod spring.profiles.active=prod
# 端口号
spring.server.port=23459
#嵌入tomcat配置
#和CPU数 #和CPU数
spring.server.acceptorThreadCount=600 spring.server.acceptorThreadCount=600
spring.server.minSpareThreads=100 spring.server.minSpareThreads=100
......
...@@ -31,7 +31,8 @@ ...@@ -31,7 +31,8 @@
t.img, t.img,
t2.company_name, t2.company_name,
t2.logo, t2.logo,
t2.address t2.address,
t2.supervise_name
FROM FROM
administer t administer t
left join role_administer_mapping t4 on t.id = t4.administer_id left join role_administer_mapping t4 on t.id = t4.administer_id
...@@ -56,6 +57,9 @@ ...@@ -56,6 +57,9 @@
<if test="fieldId != null and fieldId != ''"> <if test="fieldId != null and fieldId != ''">
and t3.field_id = #{fieldId} and t3.field_id = #{fieldId}
</if> </if>
<if test="superviseName != null and superviseName != ''">
and t2.supervise_name =#{superviseName}
</if>
</select> </select>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!