Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
E
education
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
李丛阳
education
Commits
df440006
Commit
df440006
authored
Nov 26, 2019
by
luzhuang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
17图片管理
parent
7d81f11d
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
279 additions
and
2 deletions
+279
-2
BDefaultPicController.java
...usiness/bdefaultpic/controller/BDefaultPicController.java
+72
-0
BDefaultPicRepository.java
...isoft/business/bdefaultpic/dao/BDefaultPicRepository.java
+31
-0
BDefaultPic.java
.../org/rcisoft/business/bdefaultpic/entity/BDefaultPic.java
+26
-0
BDefaultPicService.java
...soft/business/bdefaultpic/service/BDefaultPicService.java
+46
-0
BDefaultPicServiceImpl.java
...ness/bdefaultpic/service/impl/BDefaultPicServiceImpl.java
+83
-0
BLessonPersonRepository.java
...rcisoft/business/blesson/dao/BLessonPersonRepository.java
+2
-2
BDefaultPicMapper.xml
.../mapper/business/bdefaultpic/mapper/BDefaultPicMapper.xml
+19
-0
No files found.
src/main/java/org/rcisoft/business/bdefaultpic/controller/BDefaultPicController.java
0 → 100644
View file @
df440006
package
org
.
rcisoft
.
business
.
bdefaultpic
.
controller
;
/*固定导入*/
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
org.rcisoft.common.controller.PaginationController
;
import
org.rcisoft.common.model.GridModel
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.springframework.validation.BindingResult
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.rcisoft.core.result.Result
;
import
org.rcisoft.core.result.ResultServiceEnums
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.constant.MessageConstant
;
import
org.rcisoft.core.exception.ServiceException
;
import
javax.validation.Valid
;
import
org.rcisoft.business.bdefaultpic.entity.BDefaultPic
;
import
org.rcisoft.business.bdefaultpic.service.BDefaultPicService
;
import
java.util.List
;
/**
* Created by on 2019-11-26 14:44:48.
*/
@Api
(
tags
=
"17 图片管理"
)
@RestController
@RequestMapping
(
"bdefaultpic"
)
public
class
BDefaultPicController
extends
PaginationController
<
BDefaultPic
>
{
@Autowired
private
BDefaultPicService
bDefaultPicServiceImpl
;
@ApiOperation
(
value
=
"1701 添加"
,
notes
=
"添加"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"pic"
,
value
=
"默认图片链接"
,
required
=
false
,
dataType
=
"varchar"
)})
@PostMapping
(
value
=
"/add"
)
public
Result
add
(
CurUser
curUser
,
String
pic
)
{
PersistModel
data
=
bDefaultPicServiceImpl
.
save
(
pic
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
pic
);
}
@ApiOperation
(
value
=
"1702 逻辑删除"
,
notes
=
"逻辑删除"
)
@ApiImplicitParams
({
@ApiImplicitParam
(
name
=
"businessId"
,
value
=
"主键id"
,
required
=
false
,
dataType
=
"varchar"
)})
@DeleteMapping
(
"/delete"
)
public
Result
delete
(
CurUser
curUser
,
String
businessId
)
{
BDefaultPic
bDefaultPic
=
new
BDefaultPic
();
bDefaultPic
.
setBusinessId
(
businessId
);
PersistModel
data
=
bDefaultPicServiceImpl
.
remove
(
bDefaultPic
);
return
Result
.
builder
(
data
,
MessageConstant
.
MESSAGE_ALERT_SUCCESS
,
MessageConstant
.
MESSAGE_ALERT_ERROR
,
businessId
);
}
@ApiOperation
(
value
=
"1703 分页查询默认图片列表"
,
notes
=
"查看 集合"
)
@GetMapping
(
value
=
"/queryBDefaultPicByPagination"
)
public
GridModel
listByPagination
(
CurUser
curUser
)
{
bDefaultPicServiceImpl
.
findAllByPagination
(
getPaginationUtility
(),
curUser
);
return
getGridModelResponse
();
}
}
src/main/java/org/rcisoft/business/bdefaultpic/dao/BDefaultPicRepository.java
0 → 100644
View file @
df440006
package
org
.
rcisoft
.
business
.
bdefaultpic
.
dao
;
import
org.apache.ibatis.annotations.Param
;
import
org.rcisoft.core.base.BaseMapper
;
import
org.rcisoft.business.bdefaultpic.entity.BDefaultPic
;
import
org.apache.ibatis.annotations.ResultMap
;
import
org.apache.ibatis.annotations.Select
;
import
org.springframework.stereotype.Repository
;
import
java.util.List
;
/**
* Created with on 2019-11-26 14:44:48.
*/
@Repository
public
interface
BDefaultPicRepository
extends
BaseMapper
<
BDefaultPic
>
{
/**
* 分页查询 bDefaultPic
*
*/
@Select
(
"<script>select * from b_default_pic where 1=1 "
+
" and del_flag != 1 "
+
" and flag = 1 "
+
" and corp_id = #{corpId} "
+
"</script>"
)
@ResultMap
(
value
=
"BaseResultMap"
)
List
<
BDefaultPic
>
queryBDefaultPics
(
@Param
(
"corpId"
)
String
corpId
);
}
src/main/java/org/rcisoft/business/bdefaultpic/entity/BDefaultPic.java
0 → 100644
View file @
df440006
package
org
.
rcisoft
.
business
.
bdefaultpic
.
entity
;
import
lombok.*
;
import
org.rcisoft.core.entity.IdEntity
;
import
javax.persistence.*
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.io.Serializable
;
import
java.util.Date
;
import
java.util.List
;
/**
* Created with on 2019-11-26 14:44:48.
*/
@Entity
@Data
@NoArgsConstructor
@AllArgsConstructor
@Table
(
name
=
"b_default_pic"
)
public
class
BDefaultPic
extends
IdEntity
<
BDefaultPic
>
{
private
String
pic
;
}
src/main/java/org/rcisoft/business/bdefaultpic/service/BDefaultPicService.java
0 → 100644
View file @
df440006
package
org
.
rcisoft
.
business
.
bdefaultpic
.
service
;
import
org.rcisoft.business.bdefaultpic.entity.BDefaultPic
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
java.util.List
;
/**
* Created by on 2019-11-26 14:44:48.
*/
public
interface
BDefaultPicService
{
/**
* 保存
* @param pic
* @return
*/
PersistModel
save
(
String
pic
);
/**
* 逻辑删除
* @param bDefaultPic
* @return
*/
PersistModel
remove
(
BDefaultPic
bDefaultPic
);
/**
* 根据id查询
* @param id
* @return
*/
BDefaultPic
findById
(
String
id
);
/**
* 分页查询
* @param curUser
* @return
*/
List
<
BDefaultPic
>
findAllByPagination
(
PageUtil
<
BDefaultPic
>
paginationUtility
,
CurUser
curUser
);
}
src/main/java/org/rcisoft/business/bdefaultpic/service/impl/BDefaultPicServiceImpl.java
0 → 100644
View file @
df440006
package
org
.
rcisoft
.
business
.
bdefaultpic
.
service
.
impl
;
import
org.rcisoft.core.util.UserUtil
;
import
org.rcisoft.core.aop.PageUtil
;
import
org.rcisoft.core.model.PersistModel
;
import
org.rcisoft.business.bdefaultpic.dao.BDefaultPicRepository
;
import
org.rcisoft.business.bdefaultpic.entity.BDefaultPic
;
import
org.rcisoft.business.bdefaultpic.service.BDefaultPicService
;
import
org.rcisoft.sys.user.bean.CurUser
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Isolation
;
import
org.springframework.transaction.annotation.Propagation
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.List
;
import
lombok.extern.slf4j.Slf4j
;
/**
* Created by on 2019-11-26 14:44:48.
*/
@Service
@Transactional
(
readOnly
=
true
,
propagation
=
Propagation
.
NOT_SUPPORTED
)
@Slf4j
public
class
BDefaultPicServiceImpl
implements
BDefaultPicService
{
@Autowired
private
BDefaultPicRepository
bDefaultPicRepository
;
/**
* 保存 bDefaultPic
* @param pic
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
PersistModel
save
(
String
pic
){
//增加操作
BDefaultPic
bDefaultPic
=
new
BDefaultPic
();
bDefaultPic
.
setPic
(
pic
);
UserUtil
.
setCurrentPersistOperation
(
bDefaultPic
);
int
line
=
bDefaultPicRepository
.
insertSelective
(
bDefaultPic
);
return
new
PersistModel
(
line
);
}
/**
* 逻辑删除
* @param bDefaultPic
* @return
*/
@Transactional
(
propagation
=
Propagation
.
REQUIRED
,
isolation
=
Isolation
.
DEFAULT
)
@Override
public
PersistModel
remove
(
BDefaultPic
bDefaultPic
){
UserUtil
.
setCurrentMergeOperation
(
bDefaultPic
);
bDefaultPic
.
setDeleted
();
int
line
=
bDefaultPicRepository
.
logicalDelete
(
bDefaultPic
);
return
new
PersistModel
(
line
);
}
/**
* 根据id查询 bDefaultPic
* @param id
* @return
*/
public
BDefaultPic
findById
(
String
id
){
return
bDefaultPicRepository
.
selectByPrimaryKey
(
id
);
}
/**
* 分页查询 bDefaultPic
* @param curUser
* @return
*/
public
List
<
BDefaultPic
>
findAllByPagination
(
PageUtil
<
BDefaultPic
>
paginationUtility
,
CurUser
curUser
){
return
bDefaultPicRepository
.
queryBDefaultPics
(
curUser
.
getCorpId
());
}
}
src/main/java/org/rcisoft/business/blesson/dao/BLessonPersonRepository.java
View file @
df440006
...
@@ -424,8 +424,8 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
...
@@ -424,8 +424,8 @@ public interface BLessonPersonRepository extends BaseMapper<BLessonPerson> {
"<if test= \" examType != null and examType != '' and examType == '3'.toString()\"> and a.e_status = 0 </if> "
+
"<if test= \" examType != null and examType != '' and examType == '3'.toString()\"> and a.e_status = 0 </if> "
+
"<if test= \" examResult != null and examResult != '' and examResult == '0'.toString() \"> and a.e_score < b.p_pass_score </if> "
+
"<if test= \" examResult != null and examResult != '' and examResult == '0'.toString() \"> and a.e_score < b.p_pass_score </if> "
+
"<if test= \" examResult != null and examResult != '' and examResult == '1'.toString() \"> and a.e_score >= b.p_pass_score </if> "
+
"<if test= \" examResult != null and examResult != '' and examResult == '1'.toString() \"> and a.e_score >= b.p_pass_score </if> "
+
"<if test= \" scoreStart != null and scoreStart != '' \"> and a.e_score >= #{scoreStart} </if> "
+
"<if test= \" scoreStart != null and scoreStart != '' \"> and a.e_score >= #{scoreStart}
and a.e_status = 2
</if> "
+
"<if test= \" scoreEnd != null and scoreEnd != '' \"> and a.e_score <= #{scoreEnd} </if> "
+
"<if test= \" scoreEnd != null and scoreEnd != '' \"> and a.e_score <= #{scoreEnd}
and a.e_status = 2
</if> "
+
"<if test= \" consumeTimeStart != null and consumeTimeStart != '' \"> and TIMESTAMPDIFF(MINUTE, a.e_starttime, a.e_endtime) >= #{consumeTimeStart} </if> "
+
"<if test= \" consumeTimeStart != null and consumeTimeStart != '' \"> and TIMESTAMPDIFF(MINUTE, a.e_starttime, a.e_endtime) >= #{consumeTimeStart} </if> "
+
"<if test= \" consumeTimeEnd != null and consumeTimeEnd != '' \"> and TIMESTAMPDIFF(MINUTE, a.e_starttime, a.e_endtime) <= #{consumeTimeEnd}</if> "
+
"<if test= \" consumeTimeEnd != null and consumeTimeEnd != '' \"> and TIMESTAMPDIFF(MINUTE, a.e_starttime, a.e_endtime) <= #{consumeTimeEnd}</if> "
+
"<if test= \" examTimeStart != null and examTimeStart != '' \"> and a.e_starttime >= #{examTimeStart} </if> "
+
"<if test= \" examTimeStart != null and examTimeStart != '' \"> and a.e_starttime >= #{examTimeStart} </if> "
+
...
...
src/main/resources/mapper/business/bdefaultpic/mapper/BDefaultPicMapper.xml
0 → 100644
View file @
df440006
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"org.rcisoft.business.bdefaultpic.dao.BDefaultPicRepository"
>
<resultMap
id=
"BaseResultMap"
type=
"org.rcisoft.business.bdefaultpic.entity.BDefaultPic"
>
<id
column=
"business_id"
jdbcType=
"VARCHAR"
property=
"businessId"
/>
<result
column=
"pic"
jdbcType=
"VARCHAR"
property=
"pic"
/>
<!-- <result column="lesson_type" jdbcType="VARCHAR" property="lessonType"/>-->
<result
column=
"create_by"
jdbcType=
"VARCHAR"
property=
"createBy"
/>
<result
column=
"create_date"
jdbcType=
"TIMESTAMP"
property=
"createDate"
/>
<result
column=
"update_by"
jdbcType=
"VARCHAR"
property=
"updateBy"
/>
<result
column=
"update_date"
jdbcType=
"TIMESTAMP"
property=
"updateDate"
/>
<result
column=
"del_flag"
jdbcType=
"VARCHAR"
property=
"delFlag"
/>
<result
column=
"flag"
jdbcType=
"VARCHAR"
property=
"flag"
/>
<result
column=
"remarks"
jdbcType=
"VARCHAR"
property=
"remarks"
/>
<result
column=
"corp_id"
jdbcType=
"VARCHAR"
property=
"corpId"
/>
</resultMap>
<!--<cache type="${corePackag!}.util.RedisCache"/>-->
</mapper>
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment