Merge remote-tracking branch 'origin/feature/promote' into feature/promote

master
zhengchanglong 5 years ago
commit 37bdcc60c8

@ -337,4 +337,9 @@ class SpendRepository
$items = M('spend', 'tab_')->field('count(DISTINCT user_id) as count, game_id')->where($conditions)->group('game_id')->find();
return $this->assembleRecords($items, $gameIds, 'count', 'game_id');
}
public function getCommonQuery($params, $columns = '*')
{
// return M('spend', 'tab_')->field($columns)->where($map);
}
}

@ -184,10 +184,10 @@ class PromoteService {
$shiftIds = json_decode($task['shift_ids'], true) ?? [];
if (count($shiftIds) > 0) {
$firstMap['id'] = ['in', $shiftIds];
$secondMap['id'] = ['in', $shiftIds];
$secondMap['parent_id'] = ['in', $shiftIds];
}
$status = M('promote', 'tab_')->where($firstMap)->save(['parent_id' => $toPromote['id']]);
$status = M('promote', 'tab_')->where($firstMap)->save(['parent_id' => $toPromote['id'], 'parent_name' => $toPromote['account']]);
if (!$status) {
$model->rollback();
return ['status' => false, 'msg' => '系统异常,修改推广员上级失败'];

@ -376,7 +376,9 @@ $(function(){
$('.cancel-shift-btn').on({
click: function() {
var id = $(this).parents('tr').eq(0).attr('data-id')
var tr = $(this).parents('tr').eq(0)
var id = tr.attr('data-id')
var parentId = tr.attr('data-parent-id')
var shiftType = $(this).attr('data-promote-shift-type')
var shiftTypeName = getShiftTypeName(shiftType)
layer.confirm('是否要取消' + shiftTypeName, {icon: 3, title:'提示'}, function(index){

Loading…
Cancel
Save